Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: a question about recording exact scores in the hash tables

Author: Dieter Buerssner

Date: 13:48:32 07/29/02

Go up one level in this thread


On July 29, 2002 at 13:16:36, Uri Blass wrote:

>I think that the information in bruce's site
>is misleading
>
>I see the following in
>http://www.seanet.com/~brucemo/topics/hashing.htm
>
>if (depth == 0) {
>
>        val = Evaluate();
>
>        RecordHash(depth, val, hashfEXACT);
>
>        return val;
>
>    }

I did not look (at the moment) at Bruce's page. But at least until here,
everything looks totally correct to me - assuming that this a code snippet from
the start (just after probing HTs) of a "normal" alpha-beta search without
qsearch, and depth was not changed between the probing and the RecordHash.

>Today it is not used in movei and I use recordhash
>only when the score is above beta.
>
>In that case recordhash is done only after unmakemove
>and Record hash use the zobrist key of the position
>that is on the board.
>
>I think that in the case that the score is exact score
>I also need to calculate the previous
>hash key before I do RecordHash or maybe
>it is better simply to have an array to remember the
>hash key and in that case I do not need to update
>the hash key incremently after unmaking moves.
>
>I think that a better explanation of recordhash
>could be:
>
>void RecordHash(int depth, int val, int hashf)
>{
>  if (hashf==hashfEXACT)
>    zob=zobrist(position one ply earlier);

This seems very strange to me. Perhaps I do not understand your post. To me the
one ply earlier looks wrong.

>  else
>    zob=zobrist(position);
>    HASHE * phashe = &hash_table[Zob % TableSize()];

BTW. This is not valid C89 (The ISO C Standard from 1989. Perhaps it is valid
C99, I forgot. It is valid C++. In C89, you cannot declare variables at any
place).

Regards,
Dieter




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.