? ss->staticEval > (ss-4)->staticEval || (ss-4)->staticEval == VALUE_NONE
: ss->staticEval > (ss-2)->staticEval;
- // Step 7. Futility pruning: child node (~50 Elo)
+ // Step 7. Futility pruning: child node (~50 Elo).
+ // The depth condition is important for mate finding.
if ( !PvNode
+ && depth < 9
&& eval - futility_margin(depth, improving) >= beta
&& eval < VALUE_KNOWN_WIN) // Do not return unproven wins
return eval;
// Calculate new depth for this move
newDepth = depth - 1;
- // Step 13. Pruning at shallow depth (~200 Elo)
+ // Step 13. Pruning at shallow depth (~200 Elo). Depth conditions are important for mate finding.
if ( !rootNode
&& pos.non_pawn_material(us)
&& bestValue > VALUE_TB_LOSS_IN_MAX_PLY)
// Futility pruning: parent node (~5 Elo)
if ( !ss->inCheck
+ && lmrDepth < 7
&& ss->staticEval + 174 + 157 * lmrDepth <= alpha)
continue;