liveBook · Manning

Stagnation

Stagnation is a search condition in which successive iterations or generations produce little or no meaningful improvement toward a better solution.

How 2 Manning books explain it

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

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.