→ summary
******************************************************************************************
Module Evolife.Ecology.Individual:
=================================
EVOLIFE: Module Individual:
An Individual has a genome, several genes, a score and behaviours
******************************************************************************************
**************************************************************************************
Class Individual:
================
class Individual: basic individual.
Just sets ID and age.
**************************************************************************************
----------------------------------------------------------------------------------
Method Individual.__init__
----------------------------------------------------------------------------------
Arguments:
. Scenario
. ID
. Newborn
----------------------------------------------------------------------------------
Method Individual.aging:
=======================
Increments the individual’s age
----------------------------------------------------------------------------------
Arguments:
. step
----------------------------------------------------------------------------------
Method Individual.accident:
==========================
The victim suffers from a loss of life points
----------------------------------------------------------------------------------
Arguments:
. loss
----------------------------------------------------------------------------------
Method Individual.dead:
======================
An individual is dead if it is too old or has lost all its ‘LifePoints’
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
Method Individual.dies:
======================
Action to be performed when dying
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
Method Individual.score:
=======================
Sets score or adds points to score, depending on FlagSet - Returns score value
----------------------------------------------------------------------------------
Arguments:
. bonus
. FlagSet
----------------------------------------------------------------------------------
Method Individual.signature:
===========================
returns age and score
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
Method Individual.observation:
=============================
stores individual’s signature in ‘GroupExaminer’
----------------------------------------------------------------------------------
Arguments:
. GroupExaminer
----------------------------------------------------------------------------------
Method Individual.display:
=========================
can be used to display individuals
----------------------------------------------------------------------------------
Arguments:
. erase
**************************************************************************************
Class EvolifeIndividual: inherits from Evolife.Ecology.Individual.Individual, Evolife.Genetics.Genome.Genome, Evolife.Ecology.Phenotype.Phenome, Evolife.Social.Alliances.Follower
=======================
Individual + genome + phenome + social links
**************************************************************************************
----------------------------------------------------------------------------------
Method EvolifeIndividual.__init__:
=================================
Merely calls parent classes’ constructors
----------------------------------------------------------------------------------
Arguments:
. Scenario
. ID
. Newborn
. MaxFriends
----------------------------------------------------------------------------------
Method EvolifeIndividual.observation:
====================================
stores genome, phenome, social links and location into GroupExaminer
----------------------------------------------------------------------------------
Arguments:
. GroupExaminer
----------------------------------------------------------------------------------
Method EvolifeIndividual.dies:
=============================
Action to be performed when dying
----------------------------------------------------------------------------------
Back to Evolife