Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Mate in 80

Author: Robert Hyatt

Date: 13:25:21 08/16/04

Go up one level in this thread


On August 15, 2004 at 17:33:08, Alessandro Scotti wrote:

>Today I was quite surprised to see my program proudly announcing a mate in 80,
>especially considering that only a few days ago it missed a mate in one.
>Anyway after a lot of debugging I *think* I have an idea about what's happening.
>Suppose a position is stored as "mate in 5" in the hash table. If I transpose to
>this position at depth=3 during the search, I have now a "mate in 8", which if I
>transpose to at depth=7 becomes a "mate in 15" and so on...
>I start to get in trouble if the position is very open and has a lot of
>transpositions, in my case it was simply a KBB vs. K ending.
>The most annoying effect is: mate scores don't mean a thing... even on the last
>mate it returns a score of "mate in 12"!!!
>I have checked against other programs and they don't seem to suffer from this
>problem... am I doing something wrong? :-(


Yes.  You are storing mate scores wrong.  A mate score means "mate in N plies
from the root".  You need to adjust it to be "mate in X plies from the current
node."  You do this when you store a score in the transposition table and notice
it is a mate score.  When you do a lookup and notice it is a mate score, you
adjust it again to be mate in N from the current root depth, rather than the
stored mate in X from the current position.  Then this problem will go away
forever. :)

You will have the same problem with EGTB mates except that if you don't fix it,
you will be seeing mate in 5000 or something. :)



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.