Simplify TT Replacement Strategy

Passed Non-regression STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 50528 W: 13160 L: 12958 D: 24410
Ptnml(0-2): 132, 5681, 13439, 5877, 135
https://tests.stockfishchess.org/tests/view/682a8b296ec7634154f9a785

Passed Non-regression STC w/ High Hash Pressure:
LLR: 2.98 (-2.94,2.94) <-1.75,0.25>
Total: 30048 W: 7849 L: 7621 D: 14578
Ptnml(0-2): 75, 3390, 7884, 3582, 93
https://tests.stockfishchess.org/tests/view/682a9caf6ec7634154f9a7ae

Passed Non-regression LTC w/ High Hash Pressure:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 17610 W: 4584 L: 4362 D: 8664
Ptnml(0-2): 7, 1799, 4974, 2015, 10
https://tests.stockfishchess.org/tests/view/682ab3966ec7634154f9a8c8

closes https://github.com/official-stockfish/Stockfish/pull/6079

Bench: 2422771
This commit is contained in:
Shawn Xu
2025-05-18 18:36:06 -07:00
committed by Joost VandeVondele
parent 56ea1fadf1
commit 347e328fdb

View File

@@ -234,8 +234,8 @@ std::tuple<bool, TTData, TTWriter> TranspositionTable::probe(const Key key) cons
// Find an entry to be replaced according to the replacement strategy // Find an entry to be replaced according to the replacement strategy
TTEntry* replace = tte; TTEntry* replace = tte;
for (int i = 1; i < ClusterSize; ++i) for (int i = 1; i < ClusterSize; ++i)
if (replace->depth8 - replace->relative_age(generation8) * 2 if (replace->depth8 - replace->relative_age(generation8)
> tte[i].depth8 - tte[i].relative_age(generation8) * 2) > tte[i].depth8 - tte[i].relative_age(generation8))
replace = &tte[i]; replace = &tte[i];
return {false, return {false,