Trait ge::Genome [] [src]

pub trait Genome {
    fn genesis<R>(rng: &mut R) -> Self
    where
        R: Rng
;
fn mutate<R>(&self, rate: f32, rng: &mut R) -> Self
    where
        R: Rng
;
fn cross<R>(&self, other: &Self, rng: &mut R) -> Self
    where
        R: Rng
;
fn fitness<T>(&self) -> T
    where
        T: Ord
; }

Interface for randomly mutating, crossing over, and creating a genome used in genetic algorithms

Required Methods

Create an entirely random Genome

Randomly mutate a single "gene" in the genome

Cross this orgnanism with another

Arguments

  • other: the "mate" of this organism that will cross genomes

Get the fitness of the organism

Implementors