↪ Program documentation
- Overall description
- How to execute Evolife (+ download)
- Evolife source files
- Evolife classes and functions
- How Evolife works
- Create your own Evolife scenario
- Use Evolife’s components separately (graphics, ecology, genetic algorithm)
6. How Evolife works
is launched by executing Starter.bat (or starter.sh)and then by clicking on the [Run] button (see How to execute Evolife
reads a configuration file exported from the Configuration Editor, EvolifeEvolife
.evo by default (note that configuration files are perfectly readable and can be edited by hand, but the Configuration Editor is much more convenient).
is executed from the Configuration Editor, it imports the scenario it is supposed to simulate. The name of the scenario, e.g. ‘Beehive’, is retrieved from the configuration file which contains a line starting with S_Beehive. The scenario is supposed to be written in a file like S_Beehive.py in the directory Scenarii (see Create your own Evolife
first creates an ‘observer’, which contains a few global constants and performs statistics as the simulation runs.
then creates a population of individuals. The population is structured in groups. Individuals interact and procreate within groups, and migrate between groups. Each individual is characterized by its genotype (class Genome), its phenotype (class Phenome) and its social network (class Alliances) (see Evolife
then starts the main window, defined in Evolife_Window.py (see Evolife source files
button is clicked on (or the key R
is pressed), Evolife
starts the simulation.
The function stored in self.OneStep
is the function called from the application (in basic Evolife
) that executes one step of the simulation (typically, one complete year, with interactions, reproduction, selection and migration). Then control is given to the function self.ReturnFromThread
(defined in Evolife_Window.py
), which interprets the results produced by the simulation and plots curves. If self.OneStep
, then the simulation stops, otherwise it resumes.
window provides various buttons and keyboard shortcuts, as defined in the Help file.
quits, it creates various files. See How to execute Evolife