X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=a4b17d9de6ea565439d08fb87bbae1a7516acb87;hb=30fdbf43283eb0d2f8e5ca325877d3e514758804;hp=6affa5107b0cfe6544c60ac4ab66b128be0c7d73;hpb=c31fc8d163ed2c5ff5697206f8a5eef65efa0044;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 6affa510..a4b17d9d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -903,12 +903,17 @@ namespace { ss->ttPv = ttPv; } - // Step 10. If the position is not in TT, decrease depth by 2 + // Step 10. If the position is not in TT, decrease depth by 2 or 1 depending on node type if ( PvNode && depth >= 6 && !ttMove) depth -= 2; + if ( cutNode + && depth >= 9 + && !ttMove) + depth--; + moves_loop: // When in check, search starts here ttCapture = ttMove && pos.capture_or_promotion(ttMove); @@ -1325,7 +1330,7 @@ moves_loop: // When in check, search starts here // Bonus for prior countermove that caused the fail low else if ( (depth >= 3 || PvNode) && !priorCapture) - update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth + (PvNode || cutNode))); + update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + (PvNode || cutNode))); if (PvNode) bestValue = std::min(bestValue, maxValue);