Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Subtle Hash Table Bug -- Help for others

Author: Pat King

Date: 14:50:18 03/30/99

Go up one level in this thread


On March 30, 1999 at 00:17:24, William Bryant wrote:

>I found a subtle hash table bug present, it turns out, in the last 8 builds of
>Screamer.  I have followed with interest the hash table and other implementation
>discussions, I haven't seen this one discussed.  If this is old news, sorry.
>
>When storing a mate score, store the score in the table as MATE (a predefined
>constant for mate), not MATE - ply (or a mate in n score).
I do it very slightly differently... MATE - plys_from_start_of_game. Thus, the
score doesn't change from ply to ply along the same variation. While this does
not directly address the problem of transpositions, it does seem to work.
>The score can be
>converted to mate in n when extracted from the table.  The result of storing
>mate in n in the hash table is that the score may report a incorrect distance
>to mate, leading the engine to follow the wrong PV.
I can't say I know I've been in the same situation, but I believe that my scheme
will result in a wrong score, but one that still yields the same PV

>I was getting Mate in 4
>changing to Mate in 2 but the PV totally lost the opportunity to checkmate the
>king.
>
>It wish to note, that it was reviewing an older version of Crafty source code
>that I discovered that Bob was converting his mate scores after extraction.  I
>asked why, (since I was storing the distance to mate as well), then Bob's
>comments sprang to mind "The hash table stores postions, not pathways to
>positions".  The distance to mate dependes on the depth at the time the position
>is encountered again, not the depth when it was stored.
>
>Anyway, if any other amature is storing mate in n positions in their hash table,
>I hope this helps.
>
>BTW, Thanks Bob.
>
>William Bryant
>wbryant@ix.netcom.com

Pat
p_m_king@mindspring.com (ignore whatever CCC tells you)



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.