Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Mate in 80

Author: Mathieu Pagé

Date: 15:42:28 08/15/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? :-(

Well you have a bug :)

But fortunately there is an easy workaround for this problem.

Let say you're at depth=2 and you are about to return a score of mate in 8 you
should not store mate in 8 in the hash table, but mate in (8-2).

If you do this when you will retrieve a mate score from the Transposition Table
(TT) it will always be relative to the node you are searching, so you will have
to add it the depth of that node. As an example, suppose you are searching a
node at depth 5 and you retrieve from the TT the mate score we did add to the
transposition table sooner (The 8-2). what the TT said is that this node as a
value of mate in 6, but you are at depth 5 so you return a score of mate in
(6+5).

Hope this help.

Mathieu Pagé



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.