X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=ac4d85b69996eb7abadda3cf61fcd9d50ec39cf7;hp=39ed624c9ecc2408234b63c8518c843d3610fe77;hb=7c55b0e880b68c0242d27a0471f8d535f02703f0;hpb=c81010a8780d998d0d9a8bd28fd83402736f563b diff --git a/src/search.cpp b/src/search.cpp index 39ed624c..ac4d85b6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1540,14 +1540,10 @@ namespace { // Use the cached evaluation score if possible assert(ei.futilityMargin == Value(0)); - staticValue = tte->value(); + staticValue = tte->value() + ply; } else - { - staticValue = evaluate(pos, ei, threadID); - if (!value_is_mate(staticValue + Value(ply))) - staticValue += Value(ply); - } + staticValue = evaluate(pos, ei, threadID) + ply; if (ply == PLY_MAX - 1) return evaluate(pos, ei, threadID);