X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=d6571a140f36b1e9ab5293895aff192df271a785;hb=f0556dcbe3ba2fc804ab26d4552446602a75f064;hp=fcdb8d67545fd302ed782f743bc41b9cc6d53912;hpb=5c75c1c2fbb7bb4f0bf7c44fb855c415b788cbf7;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index fcdb8d67..d6571a14 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -601,7 +601,6 @@ namespace { assert(0 <= ss->ply && ss->ply < MAX_PLY); - (ss+1)->ttPv = false; (ss+1)->excludedMove = bestMove = MOVE_NONE; (ss+2)->killers[0] = (ss+2)->killers[1] = MOVE_NONE; (ss+2)->cutoffCnt = 0; @@ -1071,11 +1070,10 @@ moves_loop: // When in check, search starts here && (tte->bound() & BOUND_LOWER) && tte->depth() >= depth - 3) { - Value singularBeta = ttValue - (2 + (ss->ttPv && !PvNode)) * depth; + Value singularBeta = ttValue - (3 + 2 * (ss->ttPv && !PvNode)) * depth / 2; Depth singularDepth = (depth - 1) / 2; ss->excludedMove = move; - // the search with excludedMove will update ss->staticEval value = search(pos, ss, singularBeta - 1, singularBeta, singularDepth, cutNode); ss->excludedMove = MOVE_NONE; @@ -1104,11 +1102,15 @@ moves_loop: // When in check, search starts here // If the eval of ttMove is greater than beta, we reduce it (negative extension) else if (ttValue >= beta) - extension = -2; + extension = -2 - !PvNode; // If the eval of ttMove is less than value, we reduce it (negative extension) else if (ttValue <= value) extension = -1; + + // If the eval of ttMove is less than alpha, we reduce it (negative extension) + else if (ttValue <= alpha) + extension = -1; } // Check extensions (~1 Elo)