Struct calco::Universe [] [src]

pub struct Universe<T: Clone + Mutable + Reproducible + Evaluable> { /* fields omitted */ }

Methods

impl<T: Clone + Mutable + Reproducible + Evaluable> Universe<T>
[src]

create new populate universe

call the evaluate method of each individual of the population

for each individual in the population, check if it will mutate. then it call mutate on each.

will choose two individuals in the population and call the reproduce method of the first with the second in parameter. Put the new childrens in a new population (don't evaluate them). It will keep the first half of the precedent population by fitness-proportinal-popping or minus if the new population exceed population_max value.