Skip to content

Commit 7734212

Browse files
VoyagerOnezamar
authored andcommitted
Increase reduction if tt-move is a capture
The idea is that chances are the tt-move is best and will be difficult to raise alpha when playing a quiet move. STC: LLR: 2.95 (-2.94,2.94) [0.00,5.00] Total: 7582 W: 1415 L: 1259 D: 4908 LTC: LLR: 2.97 (-2.94,2.94) [0.00,5.00] Total: 59553 W: 7885 L: 7573 D: 44095 Bench: 5725676 Closes #1147
1 parent 612d932 commit 7734212

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/search.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ namespace {
554554
Depth extension, newDepth;
555555
Value bestValue, value, ttValue, eval;
556556
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
557-
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, skipQuiets;
557+
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, skipQuiets, ttCapture;
558558
Piece moved_piece;
559559
int moveCount, quietCount;
560560

@@ -842,6 +842,7 @@ namespace {
842842
&& (tte->bound() & BOUND_LOWER)
843843
&& tte->depth() >= depth - 3 * ONE_PLY;
844844
skipQuiets = false;
845+
ttCapture = false;
845846

846847
// Step 11. Loop through moves
847848
// Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs
@@ -959,6 +960,9 @@ namespace {
959960
ss->moveCount = --moveCount;
960961
continue;
961962
}
963+
964+
if (move == ttMove && captureOrPromotion)
965+
ttCapture = true;
962966

963967
// Update the current move (this must be done after singular extension search)
964968
ss->currentMove = move;
@@ -979,6 +983,11 @@ namespace {
979983
r -= r ? ONE_PLY : DEPTH_ZERO;
980984
else
981985
{
986+
987+
// Increase reduction if ttMove is a capture
988+
if (ttCapture)
989+
r += ONE_PLY;
990+
982991
// Increase reduction for cut nodes
983992
if (cutNode)
984993
r += 2 * ONE_PLY;

0 commit comments

Comments
 (0)