pub struct Parameters<T: FitnessEvaluator> {
pub population_size: usize,
pub genetic_code_length: usize,
pub keep_threshold: f64,
pub mutation_chance_percent: f64,
pub emit_result_every: usize,
pub fitness_evaluator: T,
}Expand description
Parameters of a simulation.
Fields§
§population_size: usizeSize 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: usizeThe 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: usizeHow 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: TThe fitness evaluator to use for this simulation.