Author: Uri Blass
Date: 14:39:53 07/29/02
Go up one level in this thread
On July 29, 2002 at 16:48:32, Dieter Buerssner wrote:
>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.
You may be right and I think that my mistake was that I wanted to get the best
move too soon and I do not need to worry because I can get it later after I undo
the move.
In bruce's code there is no mentioning of remebering move after the score is
above alpha and below beta and recordhash is used again only before returning
alpha or beta.
I think now that the pv may give the best move before returning alpha but I
still do not sure at this moment if I am right.
>
>> 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
It was not supposed to be valid C
Part of this was copied from bruce's site.
I am going to write it in valid C but first I need to understand what I need to
store in the hash tables when the depth is 0 and when to store moves that lead
to exact scores and how to do it.
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.