Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Was Hashing and Mate Score problems

Author: Dieter Buerssner

Date: 09:29:02 06/29/03

Go up one level in this thread


On June 28, 2003 at 18:18:02, Geoff wrote:

>Hello
>
>Thanks to everyone for the replies to help me on this infernal mate score hash
>problem.
>I changed the code as per the suggestion to adjust mate scores for all
>checkmates either exact or upper or lower bounds. Unfortunately this didn't fix
>the problem.
>
>I am still puzzled by the fact that at hashInsert time the adjustment as it
>currently is can adjust a mate score to be greater than +CHECKMATE or less than
>-CHECKMATE. My checkmate score is 10,000, from debug I can see that it sometimes
>stores in the hash table an adjusted score of 10,002  10,005 etc. I was
>expecting numbers such as 9,990, 9,997, 9,9993 etc.
>
>This is puzzling me, can anyone confirm that this is a bug or OK ?

This must be a bug then. At least when you do things similar to the usual way.
You might also want to look at the search code, where you assign the matescore.
It probably will be something like

  if (no_legal_moves && I am in check)
    score = -CHECK_MATE+ply;

Could also be ply-1, or ply/2.

All, what parent nodes will do, is change the sign. Because ply >= 1 (or perhaps
0), never a bigger value than CHECKMATE can happen. When you store this in HTS,
and do the adjustment, you can never adjust to something with abs(score) >=
checkmate, because those parent nodes will always have a smaller value for ply,
that that value, where you detected, that you are mated.

Perhaps you also have an error in incrementing/decrementing the ply variable
while traversing the search (don't forget the place where you do null moves).

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.