Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Programmers Question: Hashing and Alpha/Beta bounds

Author: Paul Clarke

Date: 10:33:52 06/06/05

Go up one level in this thread


On June 06, 2005 at 13:10:20, Johannes wrote:

>Hello!
>
>While working on my chess engine I've come across two problems which I dont know
>how to deal with correctly:
>
>1. After retrieving a hash entry, can I do the following:
>
>    if (tt_flag == UBOUND) beta = MIN(beta, tt_merit);
>
>It has worked for me fine, but is in my opinion theoretically unsound.

I think this is safe if _and only if_ you have no search instability. However,
if you do null move pruning, futility cutoffs, lazy evaluation etc. then you
will have instability. You then run the risk of returning a score >= tt_merit
but < original beta when there's a beta cutoff, which the caller will interpret
as an exact score.

>2. How to deal with a result from a node where alpha and beta have collided? Ths
>happens rarely, but can happen due to altering of bounds because of a hash
>entry. What can I do if i want to store the result from such a node? It is
>neither a LBOUND nor a UBOUND, right?

I don't believe that this should happen even if you are altering bounds based on
the hash table entries. In the case you mention above, where you reduce beta,
beta can only collide with alpha if tt_merit <= alpha. In that case, however,
you should just fail low anyway. Similarly, if tt_flag == LBOUND and tt_merit >
alpha, you can only hit the problem if tt_merit is also >= beta, and in that
case you'd fail high.




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.