Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Hash collisions and a little maths

Author: Vincent Diepeveen

Date: 05:21:38 02/25/99

Go up one level in this thread


On February 24, 1999 at 15:24:30, Don Dailey wrote:

>On February 24, 1999 at 13:06:33, Ed Schröder wrote:
>
>>>Posted by Vincent Diepeveen on February 24, 1999 at 11:53:39:
>>
>>>>>I know however that i must have had wrong collisions, probably the fact
>>>>>that i don't store true values hides collision probs from me, as i
>>>>>cannot have true values in my program; if a score is true then alfa
>>>>>gets improved and then score is again <= alfa, so i use only 1 bit
>>>>>to see whether it's >= beta or <= alfa.
>>>>
>>>>I don't understand the above. You say,  "i cannot have true values in
>>>>my program" and then "if a score is true then..." which I interpret as
>>>>you use true score after all?
>>>>
>>>>My best guess is you only use alpha (and not beta) to mark the
>>>>score in the hash table. Correct view?
>>>>
>>>>Can you tell why Diep can't use "true scores" in the hash table?
>>>
>>>This is something theoretical Ed,
>>>ASSUME we have true scores in search.
>>>Now try to prove that to false.
>>>
>>>We assume that we have true scores.
>>>then alfa becomes the true score,
>>>however score <= alfa, so
>>>conclusion is falsum.
>>>
>>>so the score is <= alfa, which is a bound.
>>>therefore i only store using 1 bit in hashtable.
>>>a score is either <= alfa or >= beta, but never alfa < score < beta,
>>>that cannot happen in DIEP as i improve alfa with the result of the search.
>>
>>Here is how I do things. As far as I know it should work for every program.
>>
>>Store_in_Hash:
>>flag=REAL;
>>if (score >= beta) flag = UPPER;
>>if (score <= alpha) flag = LOWER;
>>Store flag in hash table
>>
>>Search_in_Hash:
>>if (flag==REAL) return 1;		// transposition
>>if (flag==LOWER && score <= alpha) return 1;
>>if (flag==UPPER && score >= beta) return 1;
>>return 0;		                // no transposition
>>
>>Ed
>
>I don't understand the Vincent "proof" at all.  I thought at first
>he was saying all scores are speculative, but I don't think
>he is saying this either.  Draws and Mates are not speculative
>anyway.  But I essentially do what you are doing and I think many
>people do too.   But I think there are some who just store all scores
>as a bound and evidently this is ok.  But I've never tried it.
>
>In the current Cilkchess,  I really cannot have a true score
>in my hash table since I use mtd(f) (unless I store the root position
>as determined by the mtd wrapper.) so my flag will never be REAL.
>But I have other search based programs (go, checkers, pousse and
>other several other chess programs) that do exactly what you do.

Indeed, to simplify things i forgot to mention mates and draws. I do
those different. Nevertheless they are also both either upperbound
or lower bound. Very rudely i simply don't give a cutoff if
score == 0. In DIEP i can only get score == 0 when it is repetition or
50 move rule. Positional draw is 0.01 or -0.01

What i mean is: how can Ed and a few others get a 'real' value in search?
I can't get a real value in search,
as my score is always <= alfa OR >= beta

One can of course backup alfa first, but that doesn't work for me.
It must still be used as a bound then, as i later search with this bound,
as being the <= alfa bound.

>- Don



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.