Module inanis::engine::qsearch

source ·

Constants

Functions

  • Assigns scores for moves by filling move_scores array with moves_count length, based on current context. 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 the stand_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 and beta are provided by the leaf of the regular search. If DIAG 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.