mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 15:37:47 +00:00
Refresh TT entry after a cut-off to avoid aging
Re-save the same TT entry if value is usable and allow us to cut-off, it means that entry is valuable and we want to keep it fresh updating the 'generation' parameter up to the current value. Patch suggested by J. Wesley Cleveland and better clarified by Miguel A. Ballicora. After 999 games at 1+0 64MB hash size Mod vs Orig +167 =677 -155 +4 ELO Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user