return (r + 503) / 1024 + (!i && r > 915);
}
- constexpr int futility_move_count(bool improving, Depth depth) {
- return (3 + depth * depth) / (2 - improving);
+ int futility_move_count(bool improving, Depth depth, const Position& pos) {
+ return (3 + depth * depth + 2 * pos.blast_on_capture()) / (2 - improving + pos.blast_on_capture());
}
// History and stats update bonus, based on depth
&& bestValue > VALUE_TB_LOSS_IN_MAX_PLY)
{
// Skip quiet moves if movecount exceeds our FutilityMoveCount threshold
- moveCountPruning = moveCount >= futility_move_count(improving, depth);
+ moveCountPruning = moveCount >= futility_move_count(improving, depth, pos);
// Reduced depth of the next LMR search
int lmrDepth = std::max(newDepth - reduction(improving, depth, moveCount), 0);