Crossover / crossover operator: Difference between revisions
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
[[File:TwoPointCrossover.svg.png]] | [[File:TwoPointCrossover.svg.png]] | ||
== Video == | |||
<html> | |||
<iframe width="560" height="315" src="https://www.youtube.com/embed/DJ-yBmEEkgA" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | |||
</html> | |||
== References == | == References == |
Latest revision as of 07:12, 1 December 2021
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.
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.
Video