1. The Language of Evolution: Translating Biology to Algorithms
To understand how a Genetic Algorithm works, it’s helpful to first understand the language it borrows directly from genetics. The core concepts of biology have direct counterparts in the computational world of GAs.
| Biological Concept | Genetic Algorithm Term & Meaning |
| Population | Population: A collection of all the candidate solutions being tested in the current generation. |
| Individual Creature / DNA | Chromosome: A single candidate solution to the problem, represented as a data structure (like DNA). |
| Gene | Gene: A single element or position within a chromosome, representing one part of the overall solution. |
| Trait | Allele: The specific value a gene holds (e.g., if a gene is a color, the allele might be “blue”). |
| Environment’s Test | Fitness Function: A function that measures how “good” a candidate solution is at solving the problem. |
These components work together in a cycle that mimics the process of evolution over many generations.