// Decrease/increase reduction for moves with a good/bad history (~30 Elo)
r -= ss->statScore / 16434;
}
-
- // Increase reduction for captures/promotions if late move and at low depth
- else if (depth < 8 && moveCount > 2)
- r++;
+ else
+ {
+ // Increase reduction for captures/promotions if late move and at low depth
+ if (depth < 8 && moveCount > 2)
+ r++;
+
+ // Unless giving check, this capture is likely bad
+ if ( !givesCheck
+ && ss->staticEval + PieceValue[EG][pos.captured_piece()] + 200 * depth <= alpha)
+ r++;
+ }
Depth d = Utility::clamp(newDepth - r, 1, newDepth);