Planning & Search in Rust
Esc

Loading…

↑↓ move ↵ open Esc close
Colour theme
All algorithms

Iterative deepening alpha-beta

Also known as Iterative deepening (game-tree search)

adversarial game-tree-search

Iterative deepening searches the root with alpha-beta, PVS or MTD(f) to depth 1, 2, 3 and so on, until a node or time budget runs out. It returns the deepest iteration that finished and discards one the budget stopped; the first iteration ignores the budget, so a move is always found. Each iteration tries the last principal variation first, and MTD(f) starts from the last score. Deepening stops early once an iteration is proven, because no line reached the depth limit. Use it whenever a move must be ready by a deadline.

Pseudocode

algorithm Iterative-deepening(p, D, budget, search)input: root position p, maximum depth D, budget, root search (alpha-beta, PVS or MTD(f))output: the result of the deepest iteration that finishedr ← search(p, min(D, 1), hint ⟨⟩, guess nil)    ▷ ignores the budget, so a move is always foundfor d in 2, …, D doif proven(r) or exhausted(budget) or not proceed(r) thenbreaka ← 0repeatW ← window(r, a)                         ▷ aspiration; (−∞, +∞) by default, after 8 attempts and for MTD(f)r′ ← search(p, d, W, hint pv(r), guess score(r))   ▷ stops when the budget runs outa ← a + 1until stopped or r′ is exact or W = (−∞, +∞)if stopped thenbreak                                    ▷ discard the unfinished iterationr ← r′return r

In the crates

  • game-tree-search

    Alpha-beta, PVS or MTD(f) one ply deeper at a time under a node or time budget, each iteration trying the last principal variation first.

    deepen

Lineage

Comes from

builds on Alpha-beta pruning

Led to

Lazy SMP builds on it

Papers

  1. CHESS 4.5—The Northwestern University chess program David J. Slate, Lawrence R. Atkin · 1977· Chess Skill in Man and Machine introduces doi 10.1007/978-3-662-06239-5_4