Struct rustneat::organism::Organism
[−]
[src]
pub struct Organism { pub genome: Genome, pub fitness: f64, }
An organism is a Genome with fitness. Also maitain a fitenss measure of the organism
Fields
genome: Genome
fitness: f64
Methods
impl Organism
[src]
pub fn new(genome: Genome) -> Organism
[src]
Create a new organmism form a single genome.
pub fn mutate(&self) -> Organism
[src]
Return a new Orgnaism by mutating this Genome and fitness of zero
pub fn mate(&self, other: &Organism) -> Organism
[src]
Mate this organism with another
pub fn activate(&mut self, sensors: &[f64], outputs: &mut Vec<f64>)
[src]
Activate this organism in the NN
Trait Implementations
impl Debug for Organism
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more