Function inanis::engine::search::static_null_move_pruning_can_be_applied
source · fn static_null_move_pruning_can_be_applied<const PV: bool>(
depth: i8,
beta: i16,
friendly_king_checked: bool
) -> bool
Expand description
The main idea of the static null move pruning (also called as reverse futility pruning) is to prune all nodes, which (based on lazy evaluation) are too good compared to the current beta, and will very likely be a cut-node. To save time, we skip move loop entirely and return beta + some margin score. The concept is very similar to null move pruning, but without performing any search.
Conditions:
- only non-PV nodes
- depth >= STATIC_NULL_MOVE_PRUNING_MIN_DEPTH
- depth <= STATIC_NULL_MOVE_PRUNING_MAX_DEPTH
- beta is not a mate score
- friendly king is not checked