Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: crafty and mate threats question

Author: Tord Romstad

Date: 03:13:10 01/26/04

Go up one level in this thread


On January 25, 2004 at 17:55:13, Robert Hyatt wrote:

>On January 25, 2004 at 13:58:24, Uri Blass wrote:
>
>>I see in Crafty's code that Crafty extends mate threats but how can it know
>>usually about mate threats when it is using fail hard and not fail soft?
>>
>>I do not see in crafty's code a special search after null move(even to reduced
>>depth) in order to find if there is a mate threat.
>
>This is done _in_ the null-move search.  It simply says "If I do nothing (play a
>null-move) and my opponent mates me instantly, then this position has a threat
>and should be searched deeper...
>
>I detect the threat when doing the null-move score and getting a mate score
>backed
>up.  Crafty is not really "fail hard".  It just is not fail-soft...

I think you didn't quite understand Uri's question.  I also don't understand
how you can use the null-move search to detect mate threats.  Let me try
to explain why:

After making the null move and calling search(), I don't necessarily search
all moves.  I stop searching as soon as I find a move which fails high
(just like in all other nodes of the tree, of course).  It is obviously
possible that there exists a mate-in-one in the position, but this mate
might not be found because the mating move is not searched first and one
of the earlier moves fails high.  What am I missing?

Instead of using the null-move search to find mate threats, I try to
detect them in the evaluation function.  This is very cheap and works
reasonably well, but it's not perfect.  It happens that a mate threat
is not found, and it happens (not often) that the evaluation function
detects a mate threat which isn't there.

While writing this post, I got an idea which perhaps could work.
Before the ordinary null-move search, do a null-move search with the
depth reduced to zero (or one, if you don't search checks in the qsearch),
and beta lowered to -MATE_VALUE+Ply+2.  This search should terminate
very quickly, and should also reliably detect all threats of mate in
one.  If a mate is found, you extend and disable the ordinary null move
search.

Tord



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.