[][src]Struct radiate_matrix_tree::matrix_tree::evenv::TreeEnvionment

pub struct TreeEnvionment {
    pub input_size: Option<i32>,
    pub outputs: Option<Vec<i32>>,
    pub start_height: Option<i32>,
    pub max_height: Option<i32>,
    pub network_mutation_rate: Option<f32>,
    pub node_add_rate: Option<f32>,
    pub gut_rate: Option<f32>,
    pub shuffle_rate: Option<f32>,
    pub layer_mutate_rate: Option<f32>,
    pub weight_mutate_rate: Option<f32>,
    pub weight_transform_rate: Option<f32>,

unique mutations: start_height height of the starting tree to generate max height the maximum height of a tree network mutation rate the probability of mutating the neural network inside a node node add rate the probability of adding a node to a crossovered tree gut rate the probability of re-initalizing a neural network for a tree and changing the node's output shuffle rate the probability of randomly mixing up the tree and rebalancing it - results in a balanced tree layer mutate the probability of randomly mutating the weights and biases of the current layer of the neural network weight rate the probability of either editing the current weight, or reinitalizing it with a new random number weight transform if the generated random number is less than weight_rate, edit that number in the layer of the neural network by multiplying it by +/- weight_transform

Unique mutation options for a tree object including options for mutation individual nodes and their owned neural networks as well


input_size: Option<i32>outputs: Option<Vec<i32>>start_height: Option<i32>max_height: Option<i32>network_mutation_rate: Option<f32>node_add_rate: Option<f32>gut_rate: Option<f32>shuffle_rate: Option<f32>layer_mutate_rate: Option<f32>weight_mutate_rate: Option<f32>weight_transform_rate: Option<f32>


impl TreeEnvionment[src]

implement the Settings

pub fn new() -> Self[src]

create a new Settings struct that is completely empty

Note: this is initiated with everything being none, however the algorithm will panic! at several places if these options are not set The only reason this is set like this is to avoid confusion by creating a constructor with like 10 different arguments which have to be placed at the correct place within it.

pub fn set_input_size(self, size: i32) -> Self[src]

pub fn get_input_size(&self) -> i32[src]

pub fn set_outputs(self, outs: Vec<i32>) -> Self[src]

pub fn get_outputs(&self) -> &Vec<i32>[src]

pub fn set_start_height(self, height: i32) -> Self[src]

pub fn get_start_height(&self) -> i32[src]

pub fn set_max_height(self, m: i32) -> Self[src]

pub fn get_max_height(&self) -> i32[src]

pub fn set_network_mutation_rate(self, rate: f32) -> Self[src]

pub fn get_network_mutation_rate(&self) -> f32[src]

pub fn set_node_add_rate(self, rate: f32) -> Self[src]

pub fn get_node_add_rate(&self) -> f32[src]

pub fn set_gut_rate(self, rate: f32) -> Self[src]

pub fn get_gut_rate(&self) -> f32[src]

pub fn set_shuffle_rate(self, rate: f32) -> Self[src]

pub fn get_shuffle_rate(&self) -> f32[src]

pub fn set_layer_mutate_rate(self, rate: f32) -> Self[src]

pub fn get_layer_mutate_rate(&self) -> f32[src]

pub fn set_weight_mutate_rate(self, rate: f32) -> Self[src]

pub fn get_weight_mutate_rate(&self) -> f32[src]

pub fn set_weight_transform_rate(self, rate: f32) -> Self[src]

pub fn get_weight_transform_rate(&self) -> f32[src]

Trait Implementations

impl Clone for TreeEnvionment[src]

impl Debug for TreeEnvionment[src]

impl Default for TreeEnvionment[src]

impl Envionment for TreeEnvionment[src]

impl Genome<Evtree, TreeEnvionment> for Evtree[src]

fn crossover(
    one: &Evtree,
    two: &Evtree,
    settings: &Arc<RwLock<TreeEnvionment>>,
    crossover_rate: f32
) -> Option<Evtree>

one should be the more fit Evtree and two should be the less fit Evtree. This function should attemp to produce a Evtree which is no higher than the specified max height of a Evtree.

fn base(settings: &mut TreeEnvionment) -> Evtree[src]

Implement the base trait for the tree This provides a generic way to get a base tree for starting the evolution process Get the base tree type and return a randomly generated base tree created through the tree settings given to it at its new() call

fn distance(
    one: &Evtree,
    two: &Evtree,
    _settings: &Arc<RwLock<TreeEnvionment>>
) -> f32

takes in a Rc<RefCell<Self in order to make it simpler for the Generation to throw types it already has inside the function by simplmy cloing them. This function will drop the references to the Self traits at the end of this function's scope

impl PartialEq<TreeEnvionment> for TreeEnvionment[src]

impl Send for TreeEnvionment[src]

impl StructuralPartialEq for TreeEnvionment[src]

impl Sync for TreeEnvionment[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,