Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: hash messed up

Author: Robert Hyatt

Date: 18:39:01 10/08/99

Go up one level in this thread


On October 08, 1999 at 19:40:37, Scott Gasch wrote:

>Hi,
>
>I think my hash table is messed up... I was talking with another programmer
>about a test position (Fine 70: 8/k7/3p4/p2P1p2/P2P1P2/8/8/K7 w - - bm Kb1).  At
>19 ply my program had searched nearly a million tree nodes but his was at like
>40k or something.  It became apparent that this was because his hash was hitting
>like 99%... mine hits about 30%.
>
>My hash is about 500k positions large and I replace positions if the new one has
>an equal or greater depth than the one in the hash already.  I've been over my
>hashing code carefully and I cannot explain this problem.  However I normally do
>not see anywhere near even a 30% rate -- it's usually more like 2%.
>
>My questions are: 1) what kind of hash hit rate (hits / tries * 100) do other
>programs see in this position and 2) what could affect a hash in this manner?
>Poor key generation is one but I don't think so... too small is another but I
>don't think so either...  I am at a loss.
>
>Thanks again,
>Scott


key distribution is one issue.  If your random numbers aren't good, you can
end up using only 5% of your hash table or less, and overwriting everything
in sight.

However, it sounds like something more involved is going on, as in a real
bug, as maybe you are not handling the bounds right, or whatever...



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.