View Source Genetix.Evolution.CrossOver (Genetix v0.4.0)

Contain functions with different aproaches / strategies to make the crossover. In genetic algorithms and evolutionary computation, crossover, also called recombination, is a genetic operator used to combine the genetic information of two parents to generate new offspring.

Possibles strategies:

  • Single-point
  • Order-one
  • Uniform
  • Whole arithmetic Recombination (TODO)

More information

Link to this section Summary

Functions

Single-point crossover is the most basic crossover strategy. It works like this

Order-one crossover, sometimes called "Davis order" crossover, is a crossover strategy on ordered list or permutations. Order-one is part of a unique set of crossover strategies that will preserve the integrity of a permutation without the need for chromosome repair. It works like this

Genes in the parent chromosome are treated separately (individually). Uniform crossover works by paaring corresponding genes in a chromosome an swapping them according to a rate defined by the crossover_rate hyperparameter. By default 0.5 (50% or probability to swap both genes).

Link to this section Functions

Link to this function

crossover_cx_one_point(parent_1, parent_2, opts \\ [])

View Source

Single-point crossover is the most basic crossover strategy. It works like this:

  1. Choose a random number k between 0..n-1 where n is the length of the parten chromosomes. Works on blocks of genes.
  2. Split both parents at k to rpdocue four slices of genes.
  3. Swap the tails of each parent at k produce two new children.
Link to this function

order_one_crossover(parent_1, parent_2, opts \\ [])

View Source

Order-one crossover, sometimes called "Davis order" crossover, is a crossover strategy on ordered list or permutations. Order-one is part of a unique set of crossover strategies that will preserve the integrity of a permutation without the need for chromosome repair. It works like this:

  1. Select a random slice of genes from Parent 1.
  2. Remove the values from the slice of Parent 1 from Parent 2.
  3. Insert the slice from Parten 1 into the same position in Parent 2.
  4. Repeat with a random slice from Parten 2.
Link to this function

uniform(parent_1, parent_2, opts \\ [])

View Source

Genes in the parent chromosome are treated separately (individually). Uniform crossover works by paaring corresponding genes in a chromosome an swapping them according to a rate defined by the crossover_rate hyperparameter. By default 0.5 (50% or probability to swap both genes).