liveBook · Manning

Selection

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

A selection operator chooses individuals from a population for reproduction or survival according to their fitness.

Selection is the genetic-algorithm operation that chooses individuals to reproduce. Fitness supplies the basis for that choice: individuals that score well can pass their traits into later generations. It works alongside crossover, mutation, and evaluation, turning a population’s measured performance into the parent pool for the next generation. section 2.6 section 2.4.1

A simple implementation evaluates every individual, sorts the population by fitness, and retains the top half as parents. Each child then draws two parents at random from that retained group; its traits can be averaged before mutation introduces random changes. This is an example of selection, not the only possible rule. section 2.4.1

Elite selection in a simple GA

For a binary population, compute fitness as the sum of each individual’s genes, select elite parents, create children through crossover, and mutate them. Repeating generations while plotting the fitness histogram exposes maximum, minimum, mean, and spread across the whole population rather than treating one high-scoring individual as the complete result. section 2.5.8

Selection changes the trade-off between rapid optimization and adaptability. Best or elite selection can find solutions quickly, but may reduce diversity enough that the population cannot get past sticking points. Tournament selection favors winners through repeated random tournaments while retaining some diversity. Random selection can be useful when a population specializes too quickly or appears stuck at a local maximum or minimum. section 3.4 section 2.5.8

Useful selection experiments include:

  • Choose tournament, random, or best selection and rerun a simplified traveling-salesperson setup. section 3.4
  • Change population size, crossover rate, mutation rate, and selection choice; inspect the effect on genealogy and evolution. section 3.4.1
  • Alter a target function or remove operators, then rerun to observe how the evolutionary result changes. section 4.1.2
Figure 3.7 A comparison of selection operators on population diversity

Compare selection operators through their effect on population diversity, a practical check against optimizing too aggressively for short-term fitness. section 3.4

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

How deep it goes
Implements fitness sorting and elite parent choice, then compares operator behavior without deriving selection theory.
Examples
Uses a trait-based cell simulation, a binary One Max population, and a simplified traveling-salesperson problem.
What you can do after
Apply it via Colab forms by swapping selection operators and inspecting diversity and genealogy changes.
How it connects
Connects selection to fitness evaluation, crossover, mutation, population diversity, and genetic algorithms.

Also explained in

Compare how 5 books explain selection →

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.