Skip to content

Organisms

Clifford Bohm edited this page Jan 24, 2018 · 8 revisions

An organism is a container. Organisms contain one or more genome and one or more brain along with methods to produce offspring and track lineages.

Organisms contain:

  • ID - a unique identifier
  • Brains - a list of brains belonging to this organism
  • Genomes - a list of genomes belonging to this organism
  • dataMap - a DataMap used to store data for output
  • timeOfBrith - when was this organism created
  • timeOfDeath - when did this organism die?
  • alive - is this organism currently alive
  • ancestors - list of the IDs belonging to ancestors of this organism (which ancestors exactly is determined by the optimizer)
  • parents - a list pointing to this organisms parent(s)

Coding with Organisms

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.

Genetic Markers

We plan to add genetic markers (currently under development in SexyOptimizer) to organisms at some point.
Clone this wiki locally