Stagnation
Stagnation is a search condition in which successive iterations or generations produce little or no meaningful improvement toward a better solution.
AI Agents in Action, Second Edition
Stagnation detection is the identification of repeated iterations whose outputs do not meaningfully change.
- How it is used
- Detects diminishing returns in agent loops so repeated findings trigger termination or a change of strategy.
- How deep it goes
- Shows summary comparison, overlap thresholds, and a Python detector that checks findings and confidence trends; it does not specify a universal threshold.
- Examples
- Tests two identical findings, an 80% word-overlap stopping rule, and a detector that checks recent findings and confidence scores.
- What you can do after
- Build it from scratch by comparing consecutive findings and using the result to stop a loop or request replanning.
Read how AI Agents in Action, Second Edition explains stagnation →
Evolutionary Deep Learning: Genetic algorithms and neural networks
Stagnation is a period during which an evolutionary species shows no discernible improvement in fitness.
- How it is used
- Uses stagnation to decide when an evolutionary species should be checked for extinction.
- How deep it goes
- Defines stagnation and exposes max_stagnation as a configuration interval, without detailing the extinction procedure.
- Examples
- Uses max_stagnation = 25 in a NEAT circles-classification configuration.
- What you can do after
- Operate NEAT by configuring the generations allowed before species-extinction checks.
Read how Evolutionary Deep Learning: Genetic algorithms and neural networks explains stagnation →
Related concepts
- aspiration criterionaddressed by · An aspiration criterion is a rule that permits a tabu move when it meets a specified exception condition, such as producing an especially good solution.
- species extinctionproduces · Species extinction is the removal of an evolutionary species from the population when it no longer persists or remains viable.
- optimal solutionuses · An optimal solution is a feasible solution that achieves the best objective value among the alternatives considered.
- metacognitionpart of · Metacognition is the capacity to monitor, evaluate, or regulate one's own cognitive processes.
- iteration limitcontrasts with · An iteration limit is a configured maximum number of repeated cycles or updates an iterative process may perform before stopping.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

