diff --git a/src/search.cpp b/src/search.cpp index b2b2414a..1f980fbb 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1301,6 +1301,9 @@ namespace { if (tte && ok_to_use_TT(tte, depth, beta, ply)) { + // Refresh tte entry to avoid aging + TT.store(posKey, tte->value(), tte->type(), tte->depth(), ttMove); + ss[ply].currentMove = ttMove; // Can be MOVE_NONE return value_from_tt(tte->value(), ply); } @@ -1624,6 +1627,9 @@ namespace { { assert(tte->type() != VALUE_TYPE_EVAL); + // Refresh tte entry to avoid aging + TT.store(pos.get_key(), tte->value(), tte->type(), tte->depth(), ttMove); + ss[ply].currentMove = ttMove; // Can be MOVE_NONE return value_from_tt(tte->value(), ply); }