When to clear the Transposition table?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27896
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: When to clear the Transposition table?

Post by hgm »

I never measured how much Elo not clearing the TT is worth, but we can make an educated guess. Assume the branching ratio is 3, and that consecutive moves of the game are searched equally deep (N ply). Having the tree from 2 ply before brings you to N-2 ply instantly. To do that search from scratch would have taken you 1/9 of the time the N-ply search takes. So you save 11% of the time. That would be worth about 11 Elo (using the scaling Rating = 100*ln(T) + constant, where each doubling is 70 Elo). But that would only be true after the opponent plays the expected move. If not, the root of the new search would not have been on the PV of the previous search, and a large part of the tree you need to make it a PV node would be missing (even if the score is nearly the same). Say half of it. So then you anly save about 5%. Say that this happens for half the moves, then on average you ave 8% of the time, which translates to 8 Elo.
User avatar
j.t.
Posts: 242
Joined: Wed Jun 16, 2021 2:08 am
Location: Berlin
Full name: Jost Triller

Re: When to clear the Transposition table?

Post by j.t. »

lithander wrote: Tue Jun 29, 2021 9:44 pm How much ELO would you expect a typical engine would lose if you are clearing the TT between searches? In other words: what do you sacrifice for curing the headache once and for all? (And of course temporarily disabling it for debugging purposes is always possible but still...)
Okay, I did a quick test, and it seems for Nalwald clearing between moves translates into a loss of almost 100 Elo in self-play. But this was 60s + 0.5s, so in long time control this might be a smaller difference, but probably still significant.