- Overall description
- How to execute Evolife (+ download)
- Evolife source files
- Evolife classes
- Evolife functions
- How Evolife works
- Create your own Evolife scenario
- Use Evolife’s components separately (graphics, ecology, genetic algorithm)
1. Overall description
Evolife has been developed by Jean-Louis Dessalles for scientific and didactic purposes. Initially written in C++, it has been entirely rewritten in Python to improve readability.
The core of Evolife is a genetic algorithm (GA). In a GA, ‘individuals’ represent variant tentative solutions to a problem. Individuals’ behaviour is controlled by a binary vector called genome or DNA. They live, and reproduce ‘sexually’ (though sexes are usually not differentiated). Reproduction is achieved by hybridizing genomes through crossover. Each ‘year’, best individuals are selected for reproduction. Evolife implements two modes of selection:
The first method is more in line with typical GA, whereas the second one looks more ecological.
- ranking: individuals are ranked according to their score, and are granted a number of potential children that is an increasing (non-linear) function of their rank.
- differential death: individuals get life points (generally in relation to their score) that protect them from life hazards, and thus increase their life expectancy (and their opportunities to reproduce).
Scores depend on a ‘problem’ to be solved. A few problems are already coded in the package, such as:
- the binary sum: the (somewhat trivial) problem is to maximize the number of 1 in the genome. This problem is given for didactic purposes, to demonstrate the respective roles of mutation and crossover in speeding evolution toward the optimum.
- the labyrinth: the GA’s job is to go out of a maze. Users can control the evaluation function. The labyrinth can be displayed with the current best trajectory.
- the favourable mutation: very Darwinian in its spirit, this scenario allows to understand the conditions under which favourable mutation spread in an evolving population.
Evolife is modular, which means that its code can be understood locally without full understanding of the whole programme.