Question on TT

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Question on TT

Postby geko » 06 Jan 2012, 11:26

Values ​​stored in hashtable refer to a window (alpha,beta) that could be different to alpha beta values ​​during the search
eg:

TEMPO 1
alpha = 10
beta = 20
val = 11
as val > alpha --> tt_record(11,TT_EXACT)

TEMPO 2
alpha = 22
beta = 30

(of course the zobristKey is the same of TEMPO 1 and depth is <=)

probe hashtable:

Code: Select all
        ....   
        phashe = hash[zobristKey % HASH_SIZE];
        if ( phashe.key == key AND phashe.depth >= depth )
             if (phashe.flags == TT_EXACT)
                  return phashe.val
        ....


in this case the search returns the value stored in hashtable (11) which is out the window 22-30
is that correct or would need to store the values ​​alpha beta in hashtable ?
Many thanks
g.
geko
 
Posts: 11
Joined: 03 Sep 2008, 23:14

Re: Question on TT

Postby H.G.Muller » 06 Jan 2012, 11:48

Your example is no problem, because an exact value is also valid as an upper or lower bound. The problem would be if these events occur in the revers order. You store 11, from a search with window {22,30}. So the search failed low, and 11 is only an upper bound, and the true score could be -100 or worse. So if you later get a hit when the window is {10, 20}, the 11 is not acceptable, as it would not fail low, but propagate to the root, and perhaps would cause selection of this branch (if nothing better was found later) leading in reality to a disastrous -100 score.

But storing the entry with a TT_UPPER flag fully takes care of that. You don't have to store the value of alpha itself, because the only thing that is important is whether alpha was above the stored score or not.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 21 guests