Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
|
Determines how individuals acquire their score, either by themselves or through interactions. More...
Classes | |
class | Default_Scenario |
All functions defined here can be overloaded in specific scenarii (see module doc) More... | |
Determines how individuals acquire their score, either by themselves or through interactions.
Evolife scenarii may rewrite several functions defined here : (those marked with '+' are called from 'Group.py') (those marked with 'o' are called from 'Observer.py') - initialization(self): allows to define local variables - genemap(self): initialises the genes on the gene map (see 'Genetic_map.py') - phenemap(self): defines a list of phenotypic character names (see 'Phenotype.py') + season(self, year, members): makes periodic actions like resetting parameters + behaviour(self, BestIndiv, AvgIndiv): defines a behaviour to be displayed + life_game(self, members): defines a round of interactions - calls the five following functions - start_game(self, members): group-level initialization before starting interactions - prepare(self, indiv): individual initialization before starting interactions - interaction(self, Indiv, Partner): defines a single interaction - partner(self, Indiv, members): select a partner among 'members' that will interact with 'Indiv' - end_game(self, members): an occasion for a closing round after all interactions - evaluation(self, Indiv): defines how the score of an individual is computed - lives(self, members): converts scores into life points + couples(self, members): returns a list of couples for procreation (individuals may appear in several couples!)- Calls the following functions: - parenthood(self, RankedCandidates, Def_Nb_Children): Determines the number of children depending on rank - parents(self, candidates): selects two parents from a list of candidates (candidate = (indiv, NbOfPotentialChildren)) + new_agent(self, child, parents): initializes newborns + remove_agent(self, agent): action to be performed when an agent dies + update_positions(self, members, groupID): assigns a position to agents o default_view(self): says which windows should be open at start up o legends(self): returns a string to be displayed at the bottom ot the Legend window. o display_(self): says which statistics are displayed each year o def Field_grid(self): initial draw in the Field window o def Trajectory_grid(self): initial draw in the Trajectory window o wallpaper(self, Window): if one wants to display different backgrounds in windows ************