Module genetic_algorithm::crossover
source · [−]Expand description
The crossover phase where every two parent chromosomes create two children chromosomes. The competition phase determines the order of the parent pairing (overall with fitter first). If you choose to keep the parents, the parents will compete with their own children and the population is temporarily overbooked and half of it will be discarded in the competition phase.
Structs
Crossover with 50% probability for each gene to come from one of the two parents. Optionally keep parents around to compete with children later on.
Children are clones of the parents, effectively doubling the population if you keep the parents. Acts as no-op if the parents are not kept.
Wrapper for use in meta analysis
Crossover with a single gene position from which on the rest of the genes are taken from the other parent. The gene position is chosen with uniform probability. Optionally keep parents around to compete with children later on.
Crossover starting with clones of the parents, with a single gene taken from the other parent. The single gene is chosen with uniform probability. Optionally keep parents around to compete with children later on.