pub fn run(context: &mut SearchContext, ply: u16, alpha: i16, beta: i16) -> i16
Expand description
Entry point of the quiescence search. The main idea here is to reduce the horizon effect by processing capture sequences and eventually
make a quiet position suitable for final evaluation. context
, ply
, alpha
and beta
are provided by the leaf of the regular search.
Search steps:
- test if the friendly king was not captured earlier
- calculate stand-pat score and process initial pruning/alpha update
- main loop:
- score pruning
- futility pruning (https://www.chessprogramming.org/Delta_Pruning)