X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=da20f15e3352964a596137a7f581e2e885b9e6ed;hb=4502917665d50394ead903d0b82c6e7b4777b99d;hp=6d332c5ecc24fd867654679ae070267abf07d899;hpb=55df3fa2d7631ed67e46f9433aa7f3a71c18e5e7;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 6d332c5e..da20f15e 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -893,7 +893,7 @@ split_point_start: // At split points actual search starts from here } // Check for legality only before to do the move - if (!pos.pl_move_is_legal(move, ci.pinned)) + if (!RootNode && !SpNode && !pos.pl_move_is_legal(move, ci.pinned)) { moveCount--; continue; @@ -1217,9 +1217,7 @@ split_point_start: // At split points actual search starts from here if (futilityValue < beta) { - if (futilityValue > bestValue) - bestValue = futilityValue; - + bestValue = std::max(bestValue, futilityValue); continue; } @@ -1227,7 +1225,10 @@ split_point_start: // At split points actual search starts from here if ( futilityBase < beta && depth < DEPTH_ZERO && pos.see(move) <= 0) + { + bestValue = std::max(bestValue, futilityBase); continue; + } } // Detect non-capture evasions that are candidate to be pruned