Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Extending Checks

Author: Scott Gasch

Date: 22:38:29 09/11/04

Go up one level in this thread


On September 11, 2004 at 11:47:35, José Carlos wrote:

>On September 10, 2004 at 21:35:58, Stuart Cracraft wrote:
>
>>I read, somewhere, and I forget who, about
>>if 1 legal move, extend 2 ply,
>>2 or more legal moves, then 1 ply.
>>Anyone have any stats on the effects
>>on play of the above instead of
>>always extend 1 legal move. Does it
>>blow up?
>
>
>  I guess you read it in Ed's programming page about Rebel. He does that in
>qsearch, and regarding checking moves generation.
>  I tried his idea in my private program and it didn't work for me. It generated
>too many nodes, but I probably did something wrong.
>
>

I thought this is what he was talking about too.  My take on Ed's page is that
he extends the depth in qsearch at which he will consider checking moves by 2
ply when a side in check only has 1 legal way out.  This is _way_ different than
extending by 2 ply in the main search -- that would cause a node explosion
especially if you also extend on the checking move!

I tried Ed's idea in qsearch too and found the same thing as you, José.  Then I
decided to try to restrict where I did it... 1. to only do it when the guy in
check's king safety score indicated that he was in some danger and 2. to only do
it when the side in check has not had a chance to stand pat yet.  Oh and 3. I
don't do it past a certain number of plies from the root... something like
iterate_depth * 3 or so.  This keeps it under control but it doesn't solve Ed's
tricky mate in 30 by checking a million times with the knight position (Note:
Stuart: that is the position you posted last week, so you're on the right track
for solving it!)

>>How do people get around the cost
>>of determining that there is only
>>1 legal move?
>
>
>  If you're in check (you know it before generating moves) you can use a special
>move generator that generates only escapes from check (capturing checking piece,
>moving the king, putting a piece in between...). In that case, you know in
>advance the number of legal moves.
>
>  José C.

This is what I do too.  Write a legal move generator and only do it when you're
in check.  Then you can detect stuff like: 1. One legal move, 2. In check by
more than one piece, 3. No legal king moves etc...  I extend to some degree on
all of these.

>
>>For me, that's an expensive operation
>>involving usually dozens of makemove/unmakemove's
>>with a test to see if the king is attacked,
>>at every single node, before doing the search
>>of the 1 move with the increased depth.
>>
>>Only rarely is it just 1 legal move to get
>>out of check. But the determination of that
>>is not rare. It has to be done for every
>>sweep of the moves at each node.
>>
>>Thanks,
>>
>>Stuart



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.