## TT's fool

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Henk
Posts: 5799
Joined: Mon May 27, 2013 8:31 am

### TT's fool

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.

hgm
Posts: 23615
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

### Re: TT's fool

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: 5799
Joined: Mon May 27, 2013 8:31 am

### Re: TT's fool

"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.

hgm
Posts: 23615
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

### Re: TT's fool

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.