Genetic Algorythm Part2
The genetic feature was added in the version, and it uses three new classes; Env class, GeneticWorld class and GeneticBug class. A GeneticWorld class creates a graph upper on the stage how much bugs fit a world. It has a Env object that refers to four elements; temperature, water, food and predator, can be changed with sliders right below on the stage. A GeneticBug class also has a Env object. A bug has its own elements in it, and they will be estimated for which bug should weed out when it evolve. As timećis going by in the world, the least fit bug will weed out, and the fitness of bugs will be more suitable for a circumstance of the world.
The change of fitness of any bugs caused by mutations at age will appear with a red vertical line. You can download the source.