⚡ Infographic · Tactical Horizon

Explain Chess Engine
Quiescence Search

Main search stops at depth 0 — but evaluating mid-capture is wrong. Q-search extends the tree with forcing moves until the position is quiet.

📅 June 29, 2026 ⏱ 11 min read 🏷️ Horizon Effect · Captures · Stand Pat
Quiescence search (qsearch) runs when the main alpha-beta tree hits depth 0. Instead of returning a static evaluation immediately, the engine asks: is something tactically loud still hanging? It generates noisy moves — typically captures, checks, and promotions — and searches them recursively until no such move improves the score. Only then does it evaluate. This fixes the horizon effect: seeing +300 cp before your queen gets taken next ply.

Problem

The Horizon Effect

Main search depth 6 — queen "safe" at the leaf, captured in qsearch

d1
d2
d3
d4
d5
d6 leaf
recap
quiet
← main search (all moves) qsearch extension →

Without qsearch: eval +300 at d6 (queen still on board). With qsearch: sees Q× and returns −700.

Static eval at depth 0

Material + piece-square tables look fine. Engine plays a move that hangs a piece — the capture happens just beyond the search horizon.

Quiescence search

Extend with captures/checks until "quiet." Eval reflects the resolved tactical line. Prevents blunders from shallow trees.

d=0Q-search entry point
8–20Typical max qsearch plies
SEEPrunes losing captures
Stand patSkip moves, keep eval

Moves

What Gets Extended in Q-Search?

⚔️
Captures

Always searched (often MVV-LVA ordered). Core of every qsearch implementation.

👑
Promotions

Pawn to queen (or underpromo) — treated as captures even on quiet squares.

Checks

Many engines extend checks in qsearch (or 1–2 ply of check evasions). Optional but helps mating nets.

Quiet moves

Not generated in basic qsearch — that is main search's job. Keeps the q-tree narrow and fast.

Algorithm

Q-Search Loop

1
Main search hits depth 0
Call qsearch(α, β) instead of returning eval() immediately.
2
Stand pat
Compute static eval. If eval ≥ β, return β (fail-high cutoff). Set α = max(α, eval) — you can always choose not to capture.
3
Generate noisy moves
Captures (and checks/promos). Order by MVV-LVA or SEE. Skip captures that fail SEE (obviously losing).
4
Recursive qsearch
For each move: make → −qsearch(−β, −α) → unmake. Track best score. Stop on β cutoff.
5
Return best or stand pat
If no capture beats stand pat, position is quiet enough — return α (best achievable score).

Stand Pat Principle

You are not forced to capture. Static eval is a valid lower bound — if you're winning without moving, α starts at eval and only captures that beat it are searched.

int qsearch(int alpha, int beta) { int standPat = eval(); if (standPat >= beta) return beta; if (alpha < standPat) alpha = standPat; for (move : noisyMoves()) { if (see(move) < 0) continue; // delta / SEE prune make(move); int score = -qsearch(-beta, -alpha); unmake(move); if (score >= beta) return beta; if (score > alpha) alpha = score; } return alpha; }

Pruning

Keeping Q-Search Fast

SEE
Static Exchange Evaluation

Simulate capture sequence on one square. If SEE < 0, skip the move — it loses material on that square. Cheap filter before recursive qsearch.

Δ
Delta pruning

If standPat + margin < α, skip captures — even winning the queen cannot raise score enough. Margin ≈ piece values (900 for queen, etc.).

Mate scores in qsearch

Return mate bounds immediately. Check extensions help find mates; avoid searching qnodes when already mated or stalemated.

Depth / node limits

Cap qsearch plies (e.g. 16) or total q-nodes to avoid explosion in wild tactical positions. Some engines use selective extensions only.

Reference

Q-Search vs Main Search

AspectMain searchQuiescence search
EntryRoot, depth > 0Leaf nodes, depth = 0
MovesAll legal (ordered)Captures, checks, promos only
Null moveOften enabledNever (would miss captures)
Stand patN/ACore — eval without moving
Depth limitIterative deepeningUntil quiet or cap
TT usageHeavyLight or separate q-TT slot

Implementation tips

See the full search stack

Quiescence sits at the leaves of alpha-beta — explore iterative deepening, TT, and aspiration windows next.

Related: Search Algorithm · Transposition Table · Move Generation · All Blogs