Utilities
Parameters
Experiment ━━ Genus ━━ Species ━━ Organism ━━ Genotype ━━ Chromosome ━━ Node
┗━━━━ Phenotype
┗━━━━━ Link
A Phenotype
embodies the artificial neural network encoded by an Organism
's Genotype
.
Organism* organism
Points to the Phenotype
's associated Organism
.
std::vector<double> output
The Phenotype
's latest output.
Phenotype(Organism* organism_)
Constructs a Phenotype
, associating it to the referenced input Organism
.
void assemble()
Assembles the Phenotype
by ensuring all Link
s and Node
s are properly connected. The disassemble()
method is always called prior to assemblage in order to ensure that the artificial neural network's topology is correctly represented.
void disassemble()
Disassembles the Phenotype
by undoing all existing connections between Link
s and Node
s. The deactivate()
method is always called prior to disassemblage so as to guarantee that the artificial neural network can be promptly activated once re-assembled.
void activate(std::vector<double> inputs_)
Propagates the input_
signal through the artificial neural network, storing its outcome in the Phenotype
's output
.
void deactivate();
Disengages all ENABLED
Node
s and clears the Phenotype
's output
, allowing the artificial neural network to be activated once again.
void discontinue()
Clears the output
of each HIDDEN
and OUTPUT
Node
, effectively erasing the artificial neural network's memory of past activations.