Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Puzzled by my hashtable

Author: David Rasmussen

Date: 09:35:14 01/08/03

Go up one level in this thread


On January 08, 2003 at 11:58:35, JW de Kort wrote:

>Hi Friends,
>
>I'am puzzled by the behaviour of my hashtable. I use 0x88 and at a certain piont
>the move B6-I3 is retrieved from this table. The strange thing is that this move
>cannot be generated and is also never stored in the table (i have checked this).
>Still it is retrieved. I'am completely puzzled by this.
>
>I know it is impossible to solve this kind problems without further information,
>but i know the hashtable is notorious for it's debugging so i hoped that some of
>you guys could give me a hint at what to look for.
>
>any help appreacited.
>
>Jan Willem

If you have a reproducible test case, it should not be too hard.
If you already know a position where a wrong move is retrieved, then insert code
in your program to catch whenever this move is written to the hash-slot in
question. If you have already done this, and found that this move is never
written to the slot in question, something else must be writing it, that is, you
are writing out of bounds or to the wrong memory in any case from somewhere else
in the program. This can be harder to trap, but most debuggers let you make a
"breakpoint" that is activated whenever a variable is changed, for instance when
hashTable[0xfea0572].bestMove changes. You can usually specify a conditional
with the breakpoint that the value written has to be xxx, where xxx is the value
that represents the move that is retrieved. Then you will know exactly what is
writing to that slot. If you find that nothing writes to that slot, then your
retrieve code is wrong.

/David



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.