The Game of Evolution was designed to study evolution and the laws of "survival of the fittest".
The game starts off with four animals - two carnivores and two herbivores. These animals each make their move in turn and try to survive and reproduce in this harsh world. The animals decide which move to make each turn according to their genome. It is interesting to see which genomes manage to survive and prosper and which die out.
The world is made up of a 10 by 10 grid. Each element in the grid can hold up to one animal. Each element can also either contain vegetation or can be dry. In each turn the vegetation in the world grows and places that were dry in the previous round can become vegetated.
Each animal begins with an initial amount of energy. Actions performed in the world can either cost energy or give energy. For example - eating and sleeping give energy, whereas moving, reproducing and even living for a turn costs energy. An animal that does not have sufficient energy to finish a turn dies. There is also a maximum to the amount of energy an animal can have. The animals in the world belong to two species: herbivores and carnivores. Herbivores eat vegetation, start off with less energy, and need less energy to move around. Carnivores eat herbivores, start off with more energy, and need more energy to reproduce.
Animal MovesEach animal in turn must decide which move to make. There are a limited number of possibilities:
- Move - The animals can move one step in any direction (including diagonal)
- Sleep - The animals can sleep for a certain number of turns. This recharges the animal's energy.
- Reproduce - The animals can reproduce (on their own) and create an offspring of the same species. The offspring has the same genome as the parent up to a random mutation
When a herbivore moves onto a space with vegetation, it automatically eats the vegetation there. When a carnivore moves onto a space with a herbivore, it automatically eats the herbivore and that herbivore dies.
Each animal has a "genome" according to which all its decisions are made. In each turn the animal extracts the next action from its genome. The genome contains numbers representing the different possible actions. To make things more complicated, each action can take any number of parameters. These parameters are also taken from the genome.
- Moving - moving is represented by the number 0. The moving action takes two parameters - the amount to move in the x axis and the amount to move in the y axis. So the moving action reads 3 numbers from the genome.
- Sleeping - sleeping is represented by the number 1. The sleeping actino takes one parameter - the number of turns to sleep. So the sleeping action is represented by two numbers in the genome.
- Reproducing - reproducing is represented by the number 2. Reproduction requires no additional parameters and is thus represented by one number in the genome.
Each species has a genome of a different length. Herbivores have a genome containing 10 numbers. Carnivores have a genome containing 20 numbers. Numbers are read from the genome for each action that the animal performs. When the end of the genome is reached - numbers are read again from the beginning over and over again.
Clicking the "Show Game Settings" button will display a list of game settings that can be manipulated by the user. These parameters determine the characteristics of the world in which the animals must survive. They have a huge effect on which genomes are "fittest". For example: increasing the amount of energy gained by sleeping will give an advantage to genomes which cause the animal to sleep often.
Clicking the "Hide Game Settings" button will apply the new settings on the world (even in mid-play). Note that until "Hide Game Settings" is clicked, the edited settings will not be applied. If any of the settings is invalid, the settings will remnain unchanged.