X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=2b58eda81891fb2c2709e5096fdd1e4889adae91;hb=3d2aab11d89493311e0908a9ee1a8288b9ff9b42;hp=fedad43241050a6c33007a5b269501f33bf48264;hpb=bcbab1937670ca39ddb0a216ff9a787e56b79b3a;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index fedad432..2b58eda8 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -322,18 +322,22 @@ namespace { // re-search, otherwise exit the loop. if (bestValue <= alpha) { + beta = (alpha + beta) / 2; alpha = std::max(bestValue - delta, -VALUE_INFINITE); Signals.failedLowAtRoot = true; Signals.stopOnPonderhit = false; } else if (bestValue >= beta) + { + alpha = (alpha + beta) / 2; beta = std::min(bestValue + delta, VALUE_INFINITE); + } else break; - delta += 3 * delta / 8; + delta += delta / 2; assert(alpha >= -VALUE_INFINITE && beta <= VALUE_INFINITE); } @@ -747,7 +751,6 @@ moves_loop: // When in check and at SpNode search starts from here && !captureOrPromotion && !inCheck && !dangerous - /* && move != ttMove Already implicit in the next condition */ && bestValue > VALUE_MATED_IN_MAX_PLY) { // Move count based pruning @@ -813,9 +816,8 @@ moves_loop: // When in check and at SpNode search starts from here // Step 15. Reduced depth search (LMR). If the move fails high it will be // re-searched at full depth. if ( depth >= 3 * ONE_PLY - && !pvMove + && moveCount > 1 && !captureOrPromotion - && move != ttMove && move != ss->killers[0] && move != ss->killers[1]) { @@ -1111,7 +1113,6 @@ moves_loop: // When in check and at SpNode search starts from here if ( !PvNode && !InCheck && !givesCheck - && move != ttMove && futilityBase > -VALUE_KNOWN_WIN && !pos.advanced_pawn_push(move)) { @@ -1141,7 +1142,6 @@ moves_loop: // When in check and at SpNode search starts from here // Don't search moves with negative SEE values if ( !PvNode && (!InCheck || evasionPrunable) - && move != ttMove && type_of(move) != PROMOTION && pos.see_sign(move) < VALUE_ZERO) continue;