Function inanis::engine::search::late_move_reduction_can_be_applied
source · fn late_move_reduction_can_be_applied(
depth: i8,
move: Move,
move_index: usize,
move_score: i16,
friendly_king_checked: bool,
enemy_king_checked: bool
) -> bool
Expand description
The main idea of the late move reduction is to reduce search depth of all quiet moves, which aren’t promising and with high chance won’t improve score. This is the least risky type of pruning (used inside PVS framework which cares about re-search when the move is better than expected), so it’s also applied in PV nodes.
Conditions:
- depth >= LATE_MOVE_REDUCTION_MIN_DEPTH
- move index >= LATE_MOVE_REDUCTION_MIN_MOVE_INDEX
- move score <= LATE_MOVE_REDUCTION_MAX_SCORE
- move is quiet
- friendly king is not checked
- enemy king is not checked