liveBook · Manning

Crossover

As explained in Evolutionary Deep Learning: Genetic algorithms and neural networks

A crossover operator combines genetic sequences from parent individuals to produce offspring in an evolutionary algorithm.

Crossover is a genetic-algorithm reproduction operator: two selected parents share portions of their genetic sequences to create offspring. It models the recombination of aligned chromosome pairs during meiosis, then uses the recombined sequences as new individuals. section 2.5.1 section 2.6

In a simple one-point implementation, copy both parents, use a crossover rate to decide whether recombination occurs, choose a split point, and exchange the sequence tails. If crossover does not occur, the copied parents remain the children. The rate controls how frequently genetic material is shared. section 2.5.6 section 2.6

Figure 2.11 A crossover operation applied to parents to produce offspring

Inspect the parent split point and the two recombined offspring before translating the operation into code. section 2.5.6

Choose crossover to fit the encoding rather than treating every sequence as interchangeable:

  • Use simple one-point or two-point crossover when splitting and recombining positions is acceptable. section 2.5.6 section 12.1
  • Use partially matched or uniform partially matched crossover for index sequences when preserving useful sequence structure matters. section 3.4
  • Use ordered crossover for sequence problems such as the traveling salesperson problem, where preserving order while rotating a sequence can help. section 3.4
  • Build custom mating operators for structured encodings, such as neural-network architectures, so required layer relationships remain valid. section 8.3 section 7.6

Crossover sits after selection and before mutation in a generation loop. Fitness identifies parents; crossover creates children; mutation randomizes offspring; evaluation scores the new population. Population-wide fitness, not only the best individual, indicates whether evolution is progressing. section 2.5.8 section 2.6

Binary one-max population

For binary gene sequences, select two parents, recombine them at a random point with a rate such as 0.5, mutate one child, and reevaluate the population each generation. Track maximum, minimum, mean, and standard deviation of fitness across 100 generations rather than relying on one result. section 2.5.6 section 2.5.8

Random split points are deliberately simple. Longer or more demanding runs may need balanced strategies, and naive recombination can reduce offspring quality when sequences are mismatched or misaligned. Compare operators and rates experimentally against the constraints of the problem. section 2.5.6 section 3.4 section 3.4.1

How Evolutionary Deep Learning: Genetic algorithms and neural networks covers it

How deep it goes
Walks through one-point recombination, rate gating, and split-point code, then surveys encoding-specific operator choices.
Examples
Uses binary one-max evolution, index-sequence operators, traveling salesperson sequences, and autoencoder architectures.
What it assumes
Introduces crossover from biological meiosis while assuming familiarity with genetic sequences and selected parents.
What you can do after
Apply it via Python or DEAP by selecting an operator and tuning crossover rates for an encoded population.
How it connects
Connects crossover with meiosis, selection, mutation, fitness evaluation, genetic algorithms, and neuroevolution.

Also explained in

Compare how 7 books explain crossover →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Evolutionary Deep Learning: Genetic algorithms and neural networks. The section links point to the parts of the book it draws on.