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



2. How to execute Evolife and download

Installation

Download the latest version of Evolife from: Evolife.zip

Evolife is written in Python (http://www.python.org/) and should therefore run on various platforms. You should install Python first. The current version of Evolife should run without too much trouble with old versions of Python (Python 2.6 or 2.7). It is however designed to run with Python 3 (tested up to Python 3.6) (please report any problem you may notice).

Evolife’s graphics requires the PyQT library. It is compatible with PyQt5 and with PyQt6.

Summary


Execution

Starter shows a configuration editor that allows you to choose a scenario and to modify parameters, before running Evolife by clicking the [Run] button.

TreeExplore.jpg

The Evolife Configuration Editor

The configuration editor provides a short description of each parameter at the bottom of the window.
The [Load] button loads an existing scenario. You may modify any parameter value. It is recommended to start from an existing scenario when creating a new one. If you need to add new parameters or modify the names of existing ones, simply edit the EvolifeConfigTree.xml file before executing Stater.bat.
The [Run] button executes Evolife. To do so, parameter values are stored in Evolife.evo, and Main.py is executed (or any program specified as Target in the Run Settings section of Starter). If you execute Main.py directly (sometimes useful to display an error when you customize Evolife), it will read Evolife.evo.
Configuration files (.evo files) are text files containing parameter-value pairs (one pair per line, separated by tab).

PuceRouge.jpg You may modify any Python source under Evolife’s directory, but you will most probably start by modifying the scenarios (see below).
    If you experience difficulties with tabs in your Python editor, you may execute ./Detabify.py (located in Evolife’s directory) to replace all tabs by four spaces in all Python source files.

PuceRouge.jpg Predefined scenarios are located in the Scenarii directory. You may choose to add your own scenario in this directory. Alternatively, you may rename and modify S_Void.py. When writing your scenario, you can redefine any of the functions found in Default_Scenario.py. To do so, you may cut and paste functions from various scenarios in the Scenarii directory into your scenario.

PuceRouge.jpg As it stands, Main.py gives control to the Evolife main window and the simulation is run from there. However, the simulation is kept separate from the window system. For specific applications or tests, you may prefer to run the simulation without any graphic visualization. To do so, set the BatchMode parameter in the Configuration Editor (Starter). In that case, no display takes place and results are stored in unique files in the directory ___Results.

PuceRouge.jpg Output results of Evolife are stored in the following files, placed by default in the ___Results directory:

When not in batch mode, running several instances of Evolife simultaneously will cause these output files to be overwritten by the last terminating instance.

You may visualize a stored curve file (.csv or _081016235225.csv) using the Plot.py program (on the Evolife directory).
Type Plot.py from the Evolife directory to redisplay the last experiment.

The file Evolife_.evo (on the Evolife directory) contains the values of parameters actually used in the simulation (note the trailing underscore).

PuceRouge.jpg Buttons

PuceRouge.jpg Shortcuts (These shortcuts are available from any window of the application.)