X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=7bc90b143d10b85a94ff0a4cbf9f214e9d0b3525;hb=77ac1e795340275a38cfbfdfddada0077cdbb672;hp=31aea4668e1dc622fb08bf2a1072f907e8da68e2;hpb=03d6a86900044c8b4a512c7e53464fd0a67866fc;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 31aea466..7bc90b14 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -916,7 +916,7 @@ namespace { else { if ( newDepth >= 3*OnePly - && i >= MultiPV + LMRPVMoves - 2 // Remove -2 and decrease LMRPVMoves instead ? + && i >= MultiPV + LMRPVMoves && !dangerous && !moveIsCapture && !move_is_promotion(move) @@ -1540,10 +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); + staticValue = evaluate(pos, ei, threadID) + ply; if (ply == PLY_MAX - 1) return evaluate(pos, ei, threadID); @@ -1556,7 +1556,7 @@ namespace { { // Store the score to avoid a future costly evaluation() call if (!isCheck && !tte && ei.futilityMargin == 0) - TT.store(pos.get_key(), value_to_tt(bestValue, ply), VALUE_TYPE_EVAL, Depth(-127*OnePly), MOVE_NONE); + TT.store(pos.get_key(), bestValue - ply, VALUE_TYPE_EVAL, Depth(-127*OnePly), MOVE_NONE); return bestValue; }