Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Interesting mate test for hashing

Author: Robert Hyatt

Date: 21:23:15 09/10/99

Go up one level in this thread


On September 10, 1999 at 18:44:33, Steffen Jakob wrote:

>Hi Bob!
>
>On September 10, 1999 at 00:19:37, Robert Hyatt wrote:
>
>[...]
>
>>left them alone.  Wrong answer.  To fix this mate in 4 problem, I decided to
>>adjust the bounds as well, but I now set any bound value that is larger than
>>MATE-300, by reducing it to exactly MATE-300, but still using the "LOWER"
>>flag to say that this is the lowest value this position could have.  For bound
>>values < -MATE+300, I set them to exactly -MATE+300 and leave the flag as is.
>
>[...]
>
>I had a look at your new hash.c from the 16.18 source code. You are
>doing this:
>
>--------------------------------------------------------------
>if (type == EXACT) {
>   if (value > MATE-300) value=value+ply-1;
>   else if (value < -MATE+300) value=value-ply+1;
>   if ((int) tree->pv[ply].pathl >= ply)
>     word1l|=tree->pv[ply].path[ply];
>}
>else if (type == LOWER) {
>   word1l|=tree->current_move[ply];
>   value=Min(value,MATE-300);
>}
>else {
>   value=Max(value,-MATE+300);
>}
>--------------------------------------------------------------
>
>For lower scores you compute the minimum of "value" and
>"MATE-300". But what if "value" is a negative mate score which can
>also be a lower bound?
>
>You have the same problem with the upper bound.


I ignore those cases.  IE of what use is a bound that is greater than
-MATE+300, or a bound that says lower than MATE-300?  So for those
cases, I just totally ignore them as they aren't going to affect the
tree in any way that I can see.  But for scores >= MATE-300, that is
important, ditto for scores <= -MATE+300.



>
>Therefore I think the following is correct:
>
>--------------------------------------------------------------
>if(abs(value > MATE-300))
>{
>   if(value > 0)
>     {
>	switch(mode)
>	  {
>	   case EXACT:
>	     value = value + (ply-1);
>	     break;
>	   case LOWER:
>	   case UPPER:
>	     value = MATE-300;
>	     break;
>	  }
>     }
>   else
>     {
>	switch(mode)
>	  {
>	   case EXACT:
>	     value = value - (ply-1);
>	     break;
>	   case LOWER:
>	   case UPPER:
>	     value = -(MATE-300);
>	     break;
>	  }
>     }
>}
>--------------------------------------------------------------
>
>Greetings,
>Steffen.

You can do that.  I even tried it.  It made no difference in any mate
situation I tested, and I ran about 500 positions from 1001 brilliant ways
to checkmate, just to test...

I removed that type of test because it made a difference in speed, but didn't
change a single mate announcement in the test I ran..

Bob



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.