Exploring Crossover

Learn about crossover and how to implement single-point crossover strategy.

What is crossover?

With the N-queens problem, we saw how much choosing the correct crossover strategy can affect our algorithms. Now, we need to develop an understanding of what crossover is and how it works.

Crossover is the process of combining the genes of two chromosomes to create new chromosomes. The idea is that solutions will combine to create even better solutions, like how evolution slowly optimizes organisms to adapt and become stronger in their environment.

While the parallels between biological reproduction and crossover are neither perfect nor sound, we can better understand crossover if we have a general understanding of biology. In biology, traits are passed down to children from parents. These traits, for example, include hair color, eye color, and muscle composition. If both parents possess the same traits, the child is more likely to inherit those traits from their parents.

Get hands-on with 1200+ tech skills courses.