liveBook · Manning

Offspring

As explained in Grokking AI Algorithms, Second Edition

Offspring are new candidate solutions generated from existing individuals by an evolutionary algorithm's reproduction operation.

Offspring are new candidate solutions produced from existing individuals in an evolutionary algorithm. Like biological offspring, they inherit a mix of traits from parents and can have small random changes. These variations give the algorithm new possibilities to test. section 4.1 section 4.11

In a genetic algorithm, offspring enter the search through a repeating life cycle:

  • Score candidate solutions with a fitness function, then select parents based on fitness. section 4.3
  • Combine parts of the parents through crossover, then introduce small random changes through mutation. section 4.11
  • Select individuals and offspring to survive into the next generation, then repeat the process. section 4.3

Two-point crossover

Suppose two binary parents are split after their second and fourth positions: 11 | 00 | 11 and 00 | 11 | 00. Taking the first and last parts from the first parent and the middle part from the second produces 11 | 11 | 11. Reversing the choices produces a second offspring, 00 | 00 | 00. Mutation can then change offspring to introduce further variation. section 4.13 section 4.11

Figure 4.21 Two-point crossover
04_21

The diagram shows how two crossover points divide the parents into parts for creating offspring. section 4.13

The number of offspring is a configurable trade-off. More offspring can increase diversity, but in a fixed-size population they can displace good solutions. Crossover and mutation must also produce valid solutions for the problem. In a steady-state model, offspring replace only part of the population; in a generational model, they replace the whole population. section 4.20 section 4.9

How Grokking AI Algorithms, Second Edition covers it

How deep it goes
Explains parent selection, crossover, mutation, and replacement, including offspring-count and validity trade-offs.
Examples
Illustrates two-point crossover and compares partial and complete replacement in populations of 100 individuals.
What you can do after
Evaluate/understand how offspring are generated and how their number affects population diversity and replacement.
How it connects
Connects offspring to fitness, parent selection, crossover, mutation, and population models.

Also explained in

Compare how 2 books explain offspring →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Algorithms, Second Edition. The section links point to the parts of the book it draws on.