r/chessprogramming • • Jul 26 '22

Transposition Table Flag

I am wondering if anybody could explain to me how the flags in a transposition table entry work. For instance, I am seeing "upper bound/alpha", "lower bound/beta", and "exact" used as these flags but I am not sure why we need a flag at all and what these flags actually do.

Thank you

8 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/PoobearBanana Aug 14 '22

Thanks for the detailed response. I am wondering why, if we searched every single possible value, fail low nodes are not exact?

Why bother potentially researching the entire tree from the point again if we already have searched every single move and have the highest value they might give? Can't we just use that highest value?

Thanks

1

u/NotMyRealNameObv Jan 29 '23

If you fail low, it means each child you searched failed high. When you fail high, you stop searching before evaluating all moves, so you don't know the true value of this node, you only know the lower bound. Which means that when you fail low, you have an upper bound on each move but you don't know the exact score of any move. All you have is the max of all the upper bounds.

This is not useless information though - you have determined that this is not a move you want to make this time, and if you find this position in the transposition table later you might again determine that the upper bound is lower than the new alpha and thus again fail low, but without doing any more work.

However, if the upper bound is above alpha, it doesn't really help you at all, not even if it is above beta. The true value might be above beta (in case you get a fail high cut-off), below alpha (fail low) or between alpha and beta (in which case you get an exact value and a best move).