In this project I hoped to conceptually represent the principles defined by Charles Darwin in his book, On the Origin of Species, in an artificial java-based environment.
On The Origin is my first run in with genetic algorithms. I took the entire text from On the Origin of Species and created an environment where random sentences “reproduce” with each other to eventually evolve an “ideal” sentence. I embedded these sentences into each particle, so when two sentences bump into each other, they mix their “dna” (words) and create a new sentence that floats around as a new particle. The fitness function that determines how likely a sentence will reproduce is loosely based on the Golden Ratio (I compare the lengths of all the words in a sentence where an ideal pair will conform to the Golden Ratio - i.e. 1:1.618…). The sentences with the highest fitness score are more likely to survive and pass on their genetic information.