I’m posting this older code example of a simple evolutionary algorithm to get it off my hard drive :)
I’ve been interested in evolutionary algorithms for a while now with an idea of using them to solve some interesting puzzles (more of that in a later post, honest).
This is the canonical example provided by Richard Dawkins in his book The Blind Watchmaker which attempts to start with a random series of letters of the right length and by random mutation, generates a quote from Act 3 Scene 2 of Hamlet:
Do you see yonder cloud that’s almost in shape of a camel?
By th' mass, and ’tis like a camel indeed.
Methinks it is like a weasel.
Using as many interfaces as I have and using generic types may seem a little like overkill but as I said, I am hoping to complete a project using some alternate implementations for a more interesting purpose. Stay tuned :)