[][src]Trait radiate::engine::genome::Genome

pub trait Genome<T: ?Sized, E: ?Sized> where
    T: Send + Sync,
    E: Send + Sync
{ fn crossover(
        one: &T,
        two: &T,
        env: Arc<RwLock<E>>,
        crossover_rate: f32
    ) -> Option<T>
    where
        T: Sized,
        E: Envionment + Sized
;
fn distance(one: &T, two: &T, env: Arc<RwLock<E>>) -> f32; fn base(_: &mut E) -> T
    where
        T: Sized
, { ... } }

Required methods

fn crossover(
    one: &T,
    two: &T,
    env: Arc<RwLock<E>>,
    crossover_rate: f32
) -> Option<T> where
    T: Sized,
    E: Envionment + Sized

Crossover is the process of taking two types (T) and returning a new type, this is done through some defined form of mutation using the config type, or through crossover where parts of one type are given to parts of the other and that resulting type is returned

fn distance(one: &T, two: &T, env: Arc<RwLock<E>>) -> f32

This is a measure of an evolutionary type's structure or topology - depending on what is being evolved. This is needed to split the members in their respective species - essentially it is a measure of how far away two types are from each other in a genetic sense. Think of something like how similar humans are to dolphins, this is a way to quantify that.

Loading content...

Provided methods

fn base(_: &mut E) -> T where
    T: Sized

Genome needs to have a base implementation in order for one of the population options to be satisfied

This can probably be implemented in a generic way for default if the user doesn't want to implement it for their problem.

Loading content...

Implementors

impl Genome<Dense, NeatEnvironment> for Dense where
    Dense: Layer
[src]

impl Genome<GRU, NeatEnvironment> for GRU where
    GRU: Layer
[src]

in order for the GRU layer to be evolved along with the rest of the network, Genome must be implemented so that the layer can be crossed over and measured along with other GRU layers

fn crossover(
    child: &GRU,
    parent_two: &GRU,
    env: Arc<RwLock<NeatEnvironment>>,
    crossover_rate: f32
) -> Option<GRU>
[src]

implement how to crossover two GRU layers

fn distance(one: &GRU, two: &GRU, env: Arc<RwLock<NeatEnvironment>>) -> f32[src]

get the distance between two GRU layers of the network

impl Genome<LSTM, NeatEnvironment> for LSTM where
    LSTM: Layer
[src]

in order for the lstm layer to be evolved along with the rest of the network, Genome must be implemented so that the layer can be crossed over and measured along with other lstm layers

fn crossover(
    child: &LSTM,
    parent_two: &LSTM,
    env: Arc<RwLock<NeatEnvironment>>,
    crossover_rate: f32
) -> Option<LSTM>
[src]

implement how to crossover two LSTM layers

fn distance(one: &LSTM, two: &LSTM, env: Arc<RwLock<NeatEnvironment>>) -> f32[src]

get the distance between two LSTM layers of the network

impl Genome<Neat, NeatEnvironment> for Neat[src]

implement genome for a neat network

Loading content...