[−][src]Struct heredity::Parameters
Parameters of a simulation.
Fields
population_size: usize
Size of the population for every generation. (default = 100)
Increasing this value might improve results (because of a larger gene pool), but will drastically increase time to convergence.
genetic_code_length: usize
The length of the genetic code for all cells (default = 10)
This value will most likely need to be changed in accordance with the problem you're trying to solve.
keep_threshold: f64
mutation_chance_percent: f64
emit_result_every: usize
How many generations between result samples (default = 1000)
Since observing results are expensive (a result contains a copy of the genetic code of the current best cell), this parameter allows fine-grained control on exactly when progress is observed. Lower values will decrease performance but increase observability, and vice-versa.
fitness_evaluator: T
The fitness evaluator to use for this simulation.
Implementations
impl<T> Parameters<T> where
T: FitnessEvaluator,
[src]
T: FitnessEvaluator,
pub fn new(evaluator: T) -> Parameters<T>
[src]
pub fn with_population_size(self, population_size: usize) -> Self
[src]
pub fn with_genetic_code_length(self, length: usize) -> Self
[src]
pub fn with_keep_threshold(self, threshold: f64) -> Self
[src]
pub fn with_mutation_chance_percent(self, mutation_chance: f64) -> Self
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Parameters<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Parameters<T> where
T: Send,
T: Send,
impl<T> Sync for Parameters<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Parameters<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Parameters<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,