Skip to main content

quiescence

Function quiescence 

Source
pub fn quiescence(
    position: &mut Position,
    alpha: Cp,
    beta: Cp,
    ply: PlyKind,
    nodes: &mut u64,
) -> Cp
Expand description

notes: Quiescence search returns a score relative to active player. It can be given any max depth to limit its search. A depth of 0 is the same as the stand pat evaluation. Quiescence is guaranteed to have a short runtime because it only evaluates captures, and there are a limited number of captures to be had for any position.

Quiescence is implemented as a fail-soft negamax.

example: leaf(Queen x Pawn) -> +100 next(Pawn x Queen) -> -800 actual -> -800 A search would normally return a static evaluation. This can be an over or underestimate.

Quiescence needs pruning. Can aggressive pruning cause inaccurate scores?

Initial Call to Quiescence: Negamax: if node is leaf and non-terminal, return quiescence(position, alpha, beta)