Crossover / crossover operator: Difference between revisions
(Created page with "right|frame|Advanced programming<ref>http://www.flaticon.com/</ref> In genetic algorithms and evolutionary computation, crossover, also called recomb...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
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 '''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. | ||
[[File: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. | |||
[[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