Crossover / crossover operator

From Computer Science Wiki
Advanced programming[1]

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. It is one way to stochastically generate new solutions from an existing population, and is analogous to the crossover that happens during sexual reproduction in biology. Solutions can also be generated by cloning an existing solution, which is analogous to asexual reproduction. Newly generated solutions are typically mutated before being added to the population.[2]


In one point crossover a point is chosen in the first parents array, the first child will have the first parents data on the left of that point and the right side of the point will have the second parents data. The second child will have the second parents data on the left of that point and the right side of the point will have the first parents data.

OnePointCrossover.svg.png

In two point crossover the same happens except two points are chosen and now the left and right gets the other parents data, and the center between the two keeps the same parents data.

TwoPointCrossover.svg.png


Video

References