liveBook · Manning

Generation

As explained in Advanced Algorithms and Data Structures

A generation is one successive stage of a population in an evolutionary process.

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

How Advanced Algorithms and Data Structures covers it

How deep it goes
Defines generations and explains their population transition, but defers detailed operator implementations beyond selection pseudocode.
Examples
Uses knapsack food selections and population-transition diagrams to illustrate generations.
What it assumes
Assumes basic genetic-algorithm terms while grounding the idea in populations, organisms, chromosomes, and natural selection.
What you can do after
Apply generations to interpret how genetic algorithms repeatedly replace candidate populations with newly created solutions.
How it connects
Connects generations with genetic algorithms, populations, chromosomes, fitness, natural selection, crossover, and mutation.

Also explained in

Compare how 3 books explain generation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Advanced Algorithms and Data Structures. The section links point to the parts of the book it draws on.