X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=c0b6507ce9ecddeffac44bc2bea2df64ed7d2de7;hb=d8e7ce1863d234f585193125b328e18668bd1e71;hp=3b5cae4541eecec487b02bb3cb72c7233492e453;hpb=8ee0842c81ba41482d3373d4174bfed53b1bc9fc;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 3b5cae45..c0b6507c 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -199,7 +199,7 @@ namespace { Depth ThreatDepth; // heavy SMP read access // Last seconds noise filtering (LSN) - const bool UseLSNFiltering = false; + const bool UseLSNFiltering = true; const int LSNTime = 4000; // In milliseconds const Value LSNValue = value_from_centipawns(200); bool loseOnTime = false; @@ -1048,7 +1048,7 @@ namespace { EvalInfo ei; if (ply >= PLY_MAX - 1) - return evaluate(pos, ei, threadID); + return pos.is_check() ? quick_evaluate(pos) : evaluate(pos, ei, threadID); // Mate distance pruning Value oldAlpha = alpha; @@ -1238,7 +1238,7 @@ namespace { EvalInfo ei; if (ply >= PLY_MAX - 1) - return evaluate(pos, ei, threadID); + return pos.is_check() ? quick_evaluate(pos) : evaluate(pos, ei, threadID); // Mate distance pruning if (value_mated_in(ply) >= beta) @@ -1529,8 +1529,8 @@ namespace { else staticValue = evaluate(pos, ei, threadID); - if (ply == PLY_MAX - 1) - return evaluate(pos, ei, threadID); + if (ply >= PLY_MAX - 1) + return pos.is_check() ? quick_evaluate(pos) : evaluate(pos, ei, threadID); // Initialize "stand pat score", and return it immediately if it is // at least beta.