TT's fool

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

TT's fool

Post by Henk »

If you calculate position value depending on some parameters other than position or depth you get fooled when using transposition table.
For instance if you do other reductions when calculating PV then you can't use TT for looking up the value because you might have stored the result of this position when not in PV.

Maybe this is obvious but I forget and always getting fooled by TT.
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: TT's fool

Post by hgm »

The TT should record a measure for the quality of the stored result, to see whether it is usable in the current situation, or should be improved upon. In a simple search the depth would suffice for that. If you have complex reduction / extension schemes (e.g. dependent on the path to the position) you might to store other info to describe the quality.

Note that the result of the search of a non-PV node would normally be an upper or lower bound, not an exact score. As such it would never be usable in a PV node, irrespective of its depth. If the score bound would ly on the proper side of the search window, this would mean the node is not a PV node after all, even if you expected it to be one. So if a PV node would have a search that is upward compatible with that of a non-PV node of equal depth, there should be no problem to use it.
Henk
Posts: 7218
Joined: Mon May 27, 2013 10:31 am

Re: TT's fool

Post by Henk »

"If the score bound would ly on the proper side of the search window, this would mean the node is not a PV node after all, even if you expected it to be one"

Don't know if I understand.

You mean for instance when calculating PV and TT contains an upperbound less than alpha it returns alpha (when using fail hard strategy) so in that case it was not a pv node.
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: TT's fool

Post by hgm »

Indeed. If the TT has an upper bound below the current alpha, or a lower bound above beta, it disqualifies the node as PV, and makes the move in the node between it and the root that was responsible for the creation of this value of alpha or beta (by increasing the alpha there) the new PV. So all the node itself has to do is prove that the bound also holds (as non-PV) for the currently requested depth. Which is exactly what the search that provided the result in the TT already has done, if the stored depth is sufficient.