A generation is one successive stage in an evolutionary process. In a genetic algorithm, it is a complete population of candidate solutions before the population transitions to a new set. section 18.1.1
Each individual represents a solution encoded by a chromosome. Natural selection evaluates the current population, favors individuals with useful fitness, and produces the next generation through selection, crossover, and mutation. section 18.1.1 section 18.1.5
A generation participates in the optimization loop by:
- Starting with a fully formed population whose size is determined during initialization. section 18.1.5
- Evaluating individual fitness to distinguish stronger candidate solutions from weaker ones. section 18.1.5
- Carrying selected individuals into a new population and creating additional individuals from parent pairs. section 18.1.5
Knapsack optimization
In a knapsack problem, each generation contains alternative food selections. Solutions with favorable calories-per-weight features have higher fitness and are more likely to influence later generations. section 18.1.5
Figure 18.2 An example of how genetic algorithms would tackle the scenario in figure 18.1. At a generic iteration (in the figure, we assume we are at the i-th iteration), which could indifferently be toward the beginning or the end of the simulation, the algorithm maintains a pool of possible solutions. At the next iteration, the pool (as a whole) will transition to a new set of candidate solutions (based on the current ones—we’ll see how later in this section). Usually the new solutions can be anywhere in the domain.
Use the population-transition figure to compare one generation’s pool of candidate solutions with the next iteration’s pool. section 18.1.1


