Diversity is variation within a group. In genetic algorithms, it means keeping candidate solutions genetically different enough to explore many possibilities instead of settling too early on one merely good solution. section 4.3
Diversity is useful when search could become trapped in a local best. A genetic algorithm begins with widely varying candidates, then gradually favors better solutions across generations. section 4.3
Genetic algorithms preserve or increase diversity through several operations:
- Uniform crossover randomly chooses genes from two parents, producing offspring whose attributes can differ substantially from either parent. section 4.14
- Mutation makes small random changes to offspring; increasing the mutation rate generally increases diversity, although excessive mutation can damage good solutions. section 4.14
- Population design, fitness measurement, parent selection, reproduction, and survival determine how diversity develops from one generation to the next. section 4.3
Figure 4.8 Diversity to convergence
Use the diversity-to-convergence visual to see why broad variation is valuable early and narrower, better solutions become preferable later. section 4.3
Diversity in image training data
A model trained only on chest X-rays may become highly capable in that narrow domain but cannot reasonably generate a dog in a sunflower field. A dataset combining paintings, photographs, doodles, diagrams, people, animals, and other scenes gives the model a broader visual vocabulary and improves generalization. section 12.27 section 12.4






