egttools.numerical.structure.AbstractStructure¶
- class AbstractStructure¶
Bases:
pybind11_objectAbstract base class for population structures.
This class defines the common interface for structures that contain a population and update the behavior of individuals over time.
Subclasses must implement at least the following methods:
initialize()
update_population()
mean_population_state()
nb_strategies()
Methods
Initialize the population.
Return the current aggregate population state.
Return the maximum number of strategies that can be present in the population.
Update the population by one generation.
- __init__()¶
- __new__(**kwargs)¶
- initialize()¶
Initialize the population.
In evolutionary games, this usually means assigning an initial strategy to each individual.
- mean_population_state()¶
Return the current aggregate population state.
- Returns:
Total counts of each strategy in the population.
- Return type:
- nb_strategies()¶
Return the maximum number of strategies that can be present in the population.
- Returns:
Number of strategies.
- Return type:
- update_population()¶
Update the population by one generation.
- __annotations__ = {}¶