Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
|
Implement a scenario here, by instantiating Default_Scenario. More...
Public Member Functions | |
def | __init__ (self) |
Loads parameters, sets gene map and calls local initialization. More... | |
def | genemap (self) |
Defines the name of genes and their position on the DNA. More... | |
def | display_ (self) |
Defines what is to be displayed. More... | |
Public Member Functions inherited from Evolife.Scenarii.Default_Scenario.Default_Scenario | |
def | __init__ (self, Name='Default scenario', CfgFile='') |
Loads parameters, sets gene map and calls local initialization. More... | |
def | initialization (self) |
local initialization, to be overloaded More... | |
def | genemap (self) |
Defines the name of genes and their position on the DNA. More... | |
def | phenemap (self) |
Defines the set of non inheritable characteristics. More... | |
def | behaviour (self, best_individual, avg_individual) |
returns information about the phenotype of a given individual (best individual or fictitious individual with average genome) for display purposes (e.g. More... | |
def | prepare (self, indiv) |
The following functions are used # internally, called from 'life_game' #. More... | |
def | start_game (self, members) |
defines what is to be done at the group level each year before interactions occur - Used in 'life_game' More... | |
def | evaluation (self, indiv) |
Implements the computation of individuals' scores - - Used in 'life_game'. More... | |
def | partner (self, indiv, members) |
Decides whom to interact with - Used in 'life_game'. More... | |
def | interaction (self, indiv, partner) |
Nothing by default - Used in 'life_game'. More... | |
def | end_game (self, members) |
defines what to do at the group level once all interactions have occurred - Used in 'life_game' More... | |
def | life_game (self, members) |
Life games (or their components) are defined in specific scenarii life_games calls: More... | |
def | lives (self, members) |
converts scores into life points More... | |
def | season (self, year, members) |
This function is called at the beginning of each year. More... | |
def | parenthood (self, RankedCandidates, Def_Nb_Children) |
Determines the number of children that would-be parents may have depending on their rank. More... | |
def | parents (self, candidates) |
Selects one couple from candidates. More... | |
def | couples (self, members, nb_children=-1) |
Returns a set of couples that will beget newborns. More... | |
def | new_agent (self, child, parents) |
initializes newborns - parents==None when the population is created More... | |
def | remove_agent (self, agent) |
action to be performed when an agent dies More... | |
def | update_positions (self, members, groupLocation) |
Allows to define spatial coordinates for individuals. More... | |
def | default_view (self) |
Defines which windows should be open when the program starts Example: ['Genomes', 'Field', ('Trajectories', 320), ('Network', 500, 200)] optional numbers provide width and height. More... | |
def | legends (self) |
The returned string will be displayed at the bottom ot the Legend window. More... | |
def | display_ (self) |
Defines what is to be displayed. More... | |
def | wallpaper (self, Window) |
Displays background image or colour when the window is created. More... | |
def | Field_grid (self) |
returns a list of graphic orders for initial display on the Field window More... | |
def | Trajectory_grid (self) |
returns a list of graphic orders for initial display on the Trajectory window More... | |
Public Member Functions inherited from Evolife.Genetics.Genetic_map.Genetic_map | |
def | __init__ (self, GeneMap) |
just calls init_genes More... | |
def | init_genes (self, gene_list) |
creates genes and puts them into 'GeneMap' Accepted syntax: ['genename1', 'genename2',...]: lengths and coding are retrieved from configuration. More... | |
def | get_gene (self, locus) |
returns GeneMap[locus] More... | |
def | get_locus (self, gene_name) |
returns the gene's locus More... | |
def | get_gene_name (self, locus) |
finds the name of the gene at locus More... | |
def | get_gene_names (self) |
returns genes' names as a list More... | |
def | get_gene_boundaries (self, locus) |
finds the gene's boundaries on the DNA More... | |
def | get_coding (self, locus) |
returns the gene's coding type (weighted, unweighted, ...) More... | |
def | gene_boundaries (self, gene_name) |
finds the gene's boundaries on the DNA More... | |
def | geneMap_length (self) |
location of the end of the last gene on Genemap More... | |
def | locus_range (self, Locus) |
returns the maximal amplitude of the gene at Locus More... | |
def | gene_range (self, gene_name) |
returns the maximal amplitude of the gene More... | |
def | gene_pattern (self) |
returns a binary mask showing gene alternation on DNA More... | |
Additional Inherited Members | |
Public Attributes inherited from Evolife.Scenarii.Default_Scenario.Default_Scenario | |
Name | |
ALocalQuantity | |
Public Attributes inherited from Evolife.Genetics.Genetic_map.Genetic_map | |
GeneMap | |
Implement a scenario here, by instantiating Default_Scenario.
See documentation in Default_Scenario.py to see how.
Definition at line 35 of file CustomScenario.py.
def Evolife.Scenarii.CustomScenario.Scenario.__init__ | ( | self | ) |
Loads parameters, sets gene map and calls local initialization.
Reimplemented from Evolife.Scenarii.Default_Scenario.Default_Scenario.
Definition at line 40 of file CustomScenario.py.
def Evolife.Scenarii.CustomScenario.Scenario.display_ | ( | self | ) |
Defines what is to be displayed.
It offers the possibility of plotting the evolution through time of the best score, the average score, any locally defined value, and the average value of the various genes and phenes. It should return a list of pairs (C, X) or triples (C, X, L) where C is the curve colour (colour name or number) and X can be 'best', 'average', 'ALocalQuantity' (where ALocalQuantity is a local variable) or any gene name defined in genemap or any phene defined in phenemap. L (optional) is a legend string
Reimplemented from Evolife.Scenarii.Default_Scenario.Default_Scenario.
Definition at line 46 of file CustomScenario.py.
def Evolife.Scenarii.CustomScenario.Scenario.genemap | ( | self | ) |
Defines the name of genes and their position on the DNA.
Accepted syntax:
Reimplemented from Evolife.Scenarii.Default_Scenario.Default_Scenario.
Definition at line 43 of file CustomScenario.py.