- if (!captureOrPromotion)
- {
- // Increase reduction if ttMove is a capture (~5 Elo)
- if (ttCapture)
- r++;
-
- // Increase reduction for cut nodes (~10 Elo)
- if (cutNode)
- r += 2;
-
- // Decrease reduction for moves that escape a capture. Filter out
- // castling moves, because they are coded as "king captures rook" and
- // hence break make_move(). (~2 Elo)
- else if ( type_of(move) == NORMAL
- && !pos.see_ge(reverse_move(move)))
- r -= 2 + ss->ttPv - (type_of(movedPiece) == PAWN);
-
- ss->statScore = thisThread->mainHistory[us][from_to(move)]
- + (*contHist[0])[movedPiece][to_sq(move)]
- + (*contHist[1])[movedPiece][to_sq(move)]
- + (*contHist[3])[movedPiece][to_sq(move)]
- - 5287;
-
- // Decrease/increase reduction by comparing opponent's stat score (~10 Elo)
- if (ss->statScore >= -106 && (ss-1)->statScore < -104)
- r--;
-
- else if ((ss-1)->statScore >= -119 && ss->statScore < -140)
- r++;
-
- // Decrease/increase reduction for moves with a good/bad history (~30 Elo)
- r -= ss->statScore / 14884;
- }
- 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()] + 213 * depth <= alpha)
- r++;
- }
+ // Increase reduction for cut nodes (~3 Elo)
+ if (cutNode && move != ss->killers[0])
+ r += 2;
+
+ // Increase reduction if ttMove is a capture (~3 Elo)
+ if (ttCapture)
+ r++;
+
+ ss->statScore = thisThread->mainHistory[us][from_to(move)]
+ + (*contHist[0])[movedPiece][to_sq(move)]
+ + (*contHist[1])[movedPiece][to_sq(move)]
+ + (*contHist[3])[movedPiece][to_sq(move)]
+ - 4923;