Skip to content

Organisms

Clifford Bohm edited this page Jul 27, 2017 · 8 revisions

An organism is a container for a genome and a brain along with methods to produce offspring and track lineage.

Organism Variables:

  • ID - a unique identifier
  • dataMap - a DataMap used to store data for output
  • timeOfBrith and timeOfDeath
  • alive - is this organism currently alive
  • ancestors - list of the IDs of organisms in the last intervals data files who are ancestors of this organism
  • parents - a list of pointers to this organism's parent(s)

Organism interface

shared_ptr<Organism> makeMutatedOffspringFrom(shared_ptr<Organism> parent)
creates an new organism by copying the parents genome and then applying mutations.
shared_ptr<Organism> makeMutatedOffspringFromMany(vector<shared_ptr<Organism>> from)
creates a new organism by combining features from the parents and applying mutations.
Clone this wiki locally