Selection chooses candidate solutions for continuation or reproduction according to fitness. It chooses parents before reproduction and survivors after reproduction, usually while keeping population size fixed. section 4.17 section 4.3
Selection has two closely related jobs in a genetic algorithm:
- Parent selection chooses fit individuals to produce offspring through crossover and mutation. section 4.3
- Generation selection chooses individuals and offspring that survive into the next generation. section 4.17
- Elitism keeps the highest-ranked individuals, but similar survivors can reduce genetic diversity and cause stagnation. section 4.17
- Selection methods balance exploration of varied solutions against exploitation of solutions that already perform well. section 4.20 section 5.2
A constrained knapsack population
Imagine candidate knapsacks scored by the total value they carry without exceeding the weight limit. A valid high-value individual receives a strong fitness score and becomes a better candidate for selection; an overweight individual receives 0, making it effectively worthless despite its contents. The chosen parents produce offspring, and selection then decides which individuals remain in the fixed-size next generation. section 4.7 section 4.3
Figure 4.9 Genetic algorithm life cycle
Trace selection alongside population creation, fitness measurement, reproduction, and next-generation replacement. section 4.3




