Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question for Chess Programmers

Author: Roberto Waldteufel

Date: 09:54:50 12/22/98

Go up one level in this thread



On December 22, 1998 at 03:04:52, Sylvain Lacombe wrote:

>>
>>This isn't quite true.  One point is that you may find the mate in your
>>Q-search.  So for example, after a depth 4 search you might have a score
>>indicating mate in 7ply but after a depth 5 search you might find a mate in 5
>>ply.  This could happen because the move to deliver mate at depth 5 wasn't
>>looked at by the Q-search (ie. its not a capture or pawn promotion).
>>
>>I think this sort of thing can only happen if you don't allow standing pat when
>>in check in the Q-search.
>>
>>Another factor is null move pruning.  A deeper search may allow a quicker mate
>>to be exposed that hadn't been seen earlier due to nullmove pruning.
>>
>>>
>>>The only thing i can think of for not implementing the PV play is the extra code
>>>it takes.
>>>
>>>Sylvain.
>
>Huh! Then there's something i don't get. My q-search cannot return a mate
>position. The reason is mate = check and no more moves. Since q-search evaluate
>only captures and promotion it cannot say if the position is mate or not or can
>it? My q-search returns Eval and in the alpha-beta i check for mate and
>stalemate. If that isn't the way to do, then i guess you're right!
>
>Sylvain.

Hi Sylvain,

Many programmers (myself included) treat positions where the side to move is in
check differently from other positions in the q-search. If the side to move is
not in check, we do just as you say, captures and promotions (sometimes a few
other "threatening" moves eg pawn pushes to the 7th rank), together with the
"stand pat" option. However, if the side to move is in check, we treat the node
in the same way as in the main search: no standing pat, and all legal replies
are searched (not just captures). This way mate can be detected in the q-search,
although often the side being mated can just stand pat a move earlier. However,
standing pat a move earlier often changes the terminal evaluation dramatically!

Hope this makes sense,
Roberto



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.