Explanation
Iterative deepening makes a search first with a small limit and then repeat the analysis with progressively larger limits. In chess, depth is commonly measured in plies, where one ply is one move by one side.
This initially looks wasteful because positions near the start are visited repeatedly. Earlier iterations, however, produce valuable information: a provisional best move, the principal variation, meaning the line currently considered best, stored results, and evidence for . Searching promising choices first in the next iteration often lets more branches stop early and offsets much of the repeated work.
Its clearest practical benefit is time control. If the clock forces the engine to stop during a deeper iteration, it still has the complete result from the previous one. It does not have to risk everything on a search that may remain unfinished.
Iterative deepening does not mean extending only one favored line. Each iteration revisits the starting position with a larger limit, although selective techniques may assign different local depths inside the tree. It also moves the outward without eliminating it.
Usage and context
Interfaces often display the depth of the current iteration, but a larger number alone does not prove that two different engines performed comparable work.
Common confusions
Pointless repetition
Previous work supplies move order, a principal variation, and stored search information, so the next iteration does not truly start from nothing.
Deepening and selective extension
Iterative deepening raises the overall limit between passes; an extension adds local search to particular lines.
Sources
- 1.Depth-first iterative-deepening: An optimal admissible tree search, Artificial Intelligence / Elsevier
- 2.Iterative Deepening, Chess Programming Wiki
- 3.search.cpp, Stockfish
