Constants
Functions
- Assigns scores for
moves
by fillingmove_scores
array withmoves_count
length, based on currentcontext
. Move ordering in quiescence search is mainly based on SEE and works as follows: - Checks if the futility pruning can be applied for
move_score
. The main idea here is similar to score pruning, but instead of checking if the specified capture sequence loses some material or not, it checks if the final result added to thestand_pat
and FUTILITY_PRUNING_MARGIN will be below alpha - if yes, then we can safely assume that this move is not enough good to be relevant for the search. - 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
andbeta
are provided by the leaf of the regular search. IfDIAG
is set to true, additional statistics will be gathered (with a small performance penalty). - Checks if the score pruning can be applied for
move_score
. The main idea here is to omit all capture sequances, which are clearly loosing material (move_score
is less than SCORE_PRUNING_THRESHOLD) and with high probability won’t improve alpha.