Computer Chess Club Archives




Subject: Re: mate threat extension/null move

Author: Stuart Cracraft

Date: 13:35:05 09/25/04

Go up one level in this thread

On September 25, 2004 at 16:02:08, Andrew Platt wrote:

>On September 25, 2004 at 10:30:52, Rick Bischoff wrote:
>>I am confused about the mate threat extension.  I have the following code:
>>search ( depth, alpha, beta )
>>->check extension
>>->else pawn extension
>>->if depth <= 0 do the queiscent
>>->if checkReps return draw
>>->if insufficnetMaterial return draw
>>->Probe the hash table and return if good
>>->if not in check and depth>3 and last move was not null and material is ok:
>>->-> do null move
>>->-> x = -search(depth - 3, -beta, -beta +1 )
>>->-> undo null move
>>->-> if ( x >= beta ) return beta
>>->-> if ( x < (-MATE+MAXPLY) ) cout << "found mate"
>>->normal alpha/beta stuff
>>end search
>>"found mate" never gets printed out in WAC141 unless I change the null move to a
>>full width search... Why?  Well, I shouldn't say never, but I let it run to ply
>if (x >= beta) return beta
>means that you don't return the actual scores, just the cutoff. This is fine
>until you try to detect threats. Then you need to return the actual scores
>because only those will have the mate in them.
>In WAC 141 you should hit a bunch of mate threat extensions on the way to the
>lowest ply because each time your Rooks take a pawn, and then the bishop, you
>should trigger one. In my search it still isn't enough to counteract the drop
>into qsearch where I don't consider checks. I've given up on generating the mate
>score in a short time right now (I have plenty of other problems!). It's enough
>that the first few plies in the PV are correct so if it actually hit it, it
>would find it. Of course that only works here because it turns out that the
>Queen sacrifice is good more material as well as mate!

So do you solve WAC 141 in a reasonable amount of time?
I don't and my code returns all values, does a null move
with -beta,-alpha, checks if the returning value is
equal to -MATE+ply+2 to extend (but doesn't extend it if
already in check), and I return -MATE+ply when in check
in the main search. In quiescence, I pass back to the main
search if in check, but I don't search checking moves unless
they are captures.

Anyway, with the above, WAC 141 is out of reach and no one
has been able to help it!

This page took 0.14 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.