X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsearch.cpp;h=08b2c00686cd21de07c440a7e616dcc155dd0e22;hb=3701a8e57ded0876bd34ba1bc1afafc631ee059b;hp=58b60c878d872f986157e84a823386a40b33a0d5;hpb=98c8a83bb8aefe52d2ca7fe0299a740250ee09dd;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 58b60c87..08b2c006 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -489,9 +489,9 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move, { Value v = id_loop(pos, searchMoves); loseOnTime = ( UseLSNFiltering - && myTime < LSNTime - && myIncrement == 0 - && v < -LSNValue); + && myTime < LSNTime + && myIncrement == 0 + && v < -LSNValue); } else { @@ -1333,6 +1333,10 @@ namespace { bool useFutilityPruning = depth < SelectiveDepth && !isCheck; + // Avoid calling evaluate() if we already have the score in TT + if (tte && (tte->type() & VALUE_TYPE_EVAL)) + futilityValue = value_from_tt(tte->value(), ply) + FutilityMargins[int(depth) - 2]; + // Loop through all legal moves until no moves remain or a beta cutoff // occurs. while ( bestValue < beta