Evolife

Jean-Louis Dessalles


Courbes.jpg
  1. Overall description
  2. How to execute Evolife (+ download)
  3. Evolife source files
  4. Evolife classes and functions
  5. How Evolife works
  6. Create your own Evolife scenario
  7. Use Evolife’s components separately (graphics, ecology, genetic algorithm)

    ↪    Program documentation


6. How Evolife works

Evolife is launched by executing Starter.bat (or starter.sh)and then by clicking on the [Run] button (see How to execute Evolife).

First, 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).
When Evolife 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 scenario).

Evolife first creates an ‘observer’, which contains a few global constants and performs statistics as the simulation runs.
Evolife 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 classes).
Evolife then starts the main window, defined in Evolife_Window.py (see Evolife source files).

Curves.png

When the Run.png 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: Population.py) 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 returns False, then the simulation stops, otherwise it resumes.

The Evolife window provides various buttons and keyboard shortcuts, as defined in the Help file.

When Evolife quits, it creates various files. See How to execute Evolife.