Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Extending Checks

Author: Richard Pijl

Date: 02:34:37 09/11/04

Go up one level in this thread


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 do this in two steps: extend 1 move for giving check, extend 1 move for a
single reply, so in fact that is extending 2 moves on the single reply on check.
Because I've spread it out over two moves, no other extensions can fire during
these two moves (the move giving check, and the move out of check). If you
extend 2 ply on one move you might extend the next move for e.g. recaptures or
threats. I also limit the extensions when the tree is getting too deep.
>
>How do people get around the cost
>of determining that there is only
>1 legal move?
>
>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.

It is not really expensive. In a semi-legal move generator you will have to
iterate over every move in the regular search loop anyway. When in check, I loop
over every move in the movelist and remove the illegal ones, and determine the
number of legal replies. When I start the search loop only the legal moves are
left, that are usually not many.
Besides determining the number of replies, some other thinks can be done as well
while determining the number of replies (e.g. ETC, or perhaps also repetition
checks (when beta < 0 so a repetition would give a beta cutoff))
Richard.

>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.