Project: atomswarm / Class: AtomGenetic
Processing swarm classes with genetic and metabolic extensions.
Subclass of Atom.
Adds a virtual genome and hormone set, and modulates these hormones over time as per the system's specifications.
- float gene - array of genetic values ranging [0..1], with indices G_XXXX defined in AtomGenConst.
- float hormone - array of hormonal values ranging [-1..1], with indices H_XXXX defined in AtomGenConst.
- AtomGenetic parent - reference to the peer that gave birth to this agent (or null)
w_gene_variation(default 0.1), and mutated to a uniformly random value with probability
Calculates the agent's current hormonal levels based on its previous levels, its age and genome, and the time within the swarm. Destroys agent if its hormonal levels reach fatal values (see specifications).
Called each frame by the agent's move() method.