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 created from existing individuals in an evolutionary algorithm. Like biological offspring, they are not necessarily copies of their parents: they can inherit a mix of traits and acquire small random changes. This gives the algorithm new possibilities to test. section 4.1 section 4.11

A genetic algorithm creates offspring as part of a repeating cycle:

  • Score the current candidates with a fitness function, then select parents. section 4.3
  • Use crossover to mix parts of the parents’ chromosomes; use mutation to change offspring slightly. section 4.11
  • Choose which existing individuals and offspring enter the next generation. section 4.3

Mixing two parents

In two-point crossover, choose two positions in the parents’ chromosomes. An offspring takes the first and last parts from one parent and the middle part from the other—like splicing arrays. Another offspring can take the inverse mix. Each result must still represent a valid solution. section 4.13 section 4.20

Figure 4.19 Reproduce offspring.
04_19

Shows how reproduction combines parents and then introduces variation in their offspring. section 4.11

How many offspring to create is a design choice. More can increase diversity, but in a fixed-size population they also require more individuals to be removed, potentially including good solutions. A steady-state model might keep 80 of 100 individuals and add 20 offspring; a generational model could replace all 100. Offspring are possibilities to evaluate, not guaranteed improvements. section 4.20 section 4.9

How Grokking AI Algorithms, Second Edition covers it

How deep it goes
Explains creation through crossover and mutation, then discusses offspring count, validity, and population replacement without detailing code.
Examples
Illustrates chromosome mixing with two-point crossover and population replacement with 80 retained individuals plus 20 offspring.
What it assumes
Introduces the genetic-algorithm life cycle and defines crossover and mutation as the steps that create offspring.
What you can do after
Evaluate/understand how offspring creation and replacement choices affect diversity, solution validity, and retention of good candidates.
How it connects
Links offspring to fitness-based parent selection, crossover, mutation, population diversity, and generational replacement.

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.