pub trait MutationOp<G>: GeneticOperator where
    G: Genotype
{ fn mutate<R>(&self, genome: G, rng: &mut R) -> G
    where
        R: Rng + Sized
; }
Expand description

A MutationOp defines a function of how a genetic::Genotype mutates. It is used to maintain genetic diversity from one generation of a population of genetic algorithm genotypes to the next. It is analogous to biological mutation. Mutation alters one or more gene values in a chromosome from its initial state. In mutation, the solution may change entirely from the previous solution. Hence GA can come to a better solution by using mutation. Mutation occurs during evolution according to a user-definable mutation probability. This probability should be set low. If it is set too high, the search will turn into a primitive random search.

Required methods

Mutates the given ‘Genotype’ and returns it as a new ‘Genotype’.

Implementors