X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=12cbffe020b25f7bf92921dc860e23e83eb3d919;hp=9f4ba00d1b9cd3ea5155ca63dc77564cf8dde335;hb=77342126d8417469bd6a398cfc6c0594b1f02f82;hpb=336901fdb02dcd473e99be1e13df5725895616b0 diff --git a/src/search.cpp b/src/search.cpp index 9f4ba00d..12cbffe0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -554,7 +554,7 @@ namespace { Depth extension, newDepth; Value bestValue, value, ttValue, eval; bool ttHit, inCheck, givesCheck, singularExtensionNode, improving; - bool captureOrPromotion, doFullDepthSearch, moveCountPruning, skipQuiets; + bool captureOrPromotion, doFullDepthSearch, moveCountPruning, skipQuiets, ttCapture; Piece moved_piece; int moveCount, quietCount; @@ -842,6 +842,7 @@ moves_loop: // When in check search starts from here && (tte->bound() & BOUND_LOWER) && tte->depth() >= depth - 3 * ONE_PLY; skipQuiets = false; + ttCapture = false; // Step 11. Loop through moves // Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs @@ -959,6 +960,9 @@ moves_loop: // When in check search starts from here ss->moveCount = --moveCount; continue; } + + if (move == ttMove && captureOrPromotion) + ttCapture = true; // Update the current move (this must be done after singular extension search) ss->currentMove = move; @@ -979,6 +983,11 @@ moves_loop: // When in check search starts from here r -= r ? ONE_PLY : DEPTH_ZERO; else { + + // Increase reduction if ttMove is a capture + if (ttCapture) + r += ONE_PLY; + // Increase reduction for cut nodes if (cutNode) r += 2 * ONE_PLY;