Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Hash table and best move

Author: Uri Blass

Date: 01:09:11 02/18/04

Go up one level in this thread


On February 18, 2004 at 02:55:48, milix wrote:

>Hi to everyone!
>In my amateur engine I encounter a really nasty
>hash table related bug. A hash element contained a
>position and a best move, say Ra8-a4. When this
>position occured again in a search, the rook was not
>on a8 but on a2.

Impossible.

If the rook was not on a8 then the same position did not happen again in a
search but a different position.

It is possible that you have hash collision and your program have the same hash
key for 2 different positions but the probability to have hash collision is
small if you use 64 bits for hash so I assume that it is not the problem.



 So the right best move should be
>Ra2-a4.
If you store in the hash
 So, I added a routine to check for such
>'corrupted' hash moves. I currently solve the above
>mentioned problem by looking at legal moves in the position
>that had a move with the best's move 'to' square and is moving
>the best's move piece. This correction is only done when I retrieve
>the PV from the hash table, so it is practically cheap.
>
>I have one question about the above concept:
>Is this happen to every hash table

No.

 or I have a pathological
>situation which may (or may already have) introduce
>other bugs? My hash table uses the replace always scheme
>and is cleared only at the start of a new game.

I do not know what you have because your descreption was illogical.

Uri



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.