Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
|
class Individual: basic individual. More...
Public Member Functions | |
def | __init__ (self, Scenario, ID=None, Newborn=True) |
def | aging (self, step=1) |
Increments the individual's age. More... | |
def | accident (self, loss=1) |
The victim suffers from a loss of life points. More... | |
def | dead (self) |
An individual is dead if it is too old or has lost all its 'LifePoints'. More... | |
def | dies (self) |
Action to be performed when dying More... | |
def | score (self, bonus=0, FlagSet=False) |
Sets score or adds points to score, depending on FlagSet - Returns score value. More... | |
def | signature (self) |
returns age and score More... | |
def | observation (self, GroupExaminer) |
stores individual's signature in 'GroupExaminer' More... | |
def | display (self, erase=False) |
can be used to display individuals More... | |
def | __bool__ (self) |
Public Attributes | |
Scenario | |
age | |
ID | |
location | |
LifePoints | |
class Individual: basic individual.
Just sets ID and age.
Definition at line 32 of file Individual.py.
def Evolife.Ecology.Individual.Individual.__init__ | ( | self, | |
Scenario, | |||
ID = None , |
|||
Newborn = True |
|||
) |
Reimplemented in Evolife.Ecology.Individual.EvolifeIndividual.
Definition at line 37 of file Individual.py.
def Evolife.Ecology.Individual.Individual.__bool__ | ( | self | ) |
Definition at line 98 of file Individual.py.
def Evolife.Ecology.Individual.Individual.accident | ( | self, | |
loss = 1 |
|||
) |
The victim suffers from a loss of life points.
Definition at line 58 of file Individual.py.
def Evolife.Ecology.Individual.Individual.aging | ( | self, | |
step = 1 |
|||
) |
Increments the individual's age.
Definition at line 52 of file Individual.py.
def Evolife.Ecology.Individual.Individual.dead | ( | self | ) |
An individual is dead if it is too old or has lost all its 'LifePoints'.
Definition at line 63 of file Individual.py.
def Evolife.Ecology.Individual.Individual.dies | ( | self | ) |
Action to be performed when dying
Reimplemented in Evolife.Ecology.Individual.EvolifeIndividual.
Definition at line 71 of file Individual.py.
def Evolife.Ecology.Individual.Individual.display | ( | self, | |
erase = False |
|||
) |
can be used to display individuals
Definition at line 93 of file Individual.py.
def Evolife.Ecology.Individual.Individual.observation | ( | self, | |
GroupExaminer | |||
) |
stores individual's signature in 'GroupExaminer'
Reimplemented in Evolife.Ecology.Individual.EvolifeIndividual.
Definition at line 88 of file Individual.py.
def Evolife.Ecology.Individual.Individual.score | ( | self, | |
bonus = 0 , |
|||
FlagSet = False |
|||
) |
Sets score or adds points to score, depending on FlagSet - Returns score value.
Definition at line 76 of file Individual.py.
def Evolife.Ecology.Individual.Individual.signature | ( | self | ) |
returns age and score
Definition at line 83 of file Individual.py.
Evolife.Ecology.Individual.Individual.age |
Definition at line 42 of file Individual.py.
Evolife.Ecology.Individual.Individual.ID |
Definition at line 45 of file Individual.py.
Evolife.Ecology.Individual.Individual.LifePoints |
Definition at line 50 of file Individual.py.
Evolife.Ecology.Individual.Individual.location |
Definition at line 48 of file Individual.py.
Evolife.Ecology.Individual.Individual.Scenario |
Definition at line 38 of file Individual.py.