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
Compare selection operators through their effect on population diversity, a practical check against optimizing too aggressively for short-term fitness. section 3.4




