Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to create a set of random integers for hashing?

Author: Roland Pfister

Date: 23:41:35 10/18/98

Go up one level in this thread


On October 18, 1998 at 10:55:45, Ed Schröder wrote:

>
>I check for hash-errors in 2 ways:
>
>#1. The "best-move" in the HT must be a legal move.
>
>#2. The "to-square" and "piece-type" leading to the current position must be
>found in the history till the root. This in steps of 2 plies of course. If it
>does not exist you for 99.9% have a hash-error.
>
>Example:
>
>1.e4 e5 2.f4
>
>When 2.f4 is stored in the HT I store square "f4" and piece-type "pawn" too.
>
>1.f4 e5 2.e4
>
>Since this position occurs in the HT the square "f4" and piece-type "pawn"
>MUST be found in the history. It fits with 1.f4 searching back 2 plies in this
>particular case.
>
>If it not fits (f4 and pawn are not found) I do not reward the transposition.
>
>There is one weird exception to this rule where for instance 2 knights
>exchange squares in the tree. But so what. It's very rare and not
>rewarding a transposition does no harm.
>
>- Ed -

Why do you check the history and not the board position? Wouldn't that
be easier and avoid an error like this:

last move for hashcode was bishop f1-c4.
you look up the hashcode and find in your history Bf1-c4, but there is
also Bc4-b3 in the history.

If you just would check if there is a bishop on c4, you would avoid
that error.

Did I miss something?

Roland



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.