Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Is it optional to detect check in qsearch?

Author: James Swafford

Date: 05:45:00 05/04/05

Go up one level in this thread


On May 04, 2005 at 07:27:02, Kevin K wrote:

>int Quies(int alpha, int beta)
>
>{
>
>    if (InCheck())  // check detection part
>        return AlphaBeta(1, alpha, beta);
>    val = Evaluate();
>    if (val >= beta)
>        return beta;
>    if (val > alpha)
>        alpha = val;
>    GenerateGoodCaptures();
>    while (CapturesLeft()) {
>        MakeNextCapture();
>        val = -Quies(-beta, -alpha);
>        UnmakeMove();
>        if (val >= beta)
>            return beta;
>        if (val > alpha)
>            alpha = val;
>    }
>    return alpha;
>
>}
>This code came from http://www.seanet.com/~brucemo/topics/quiescent.htm
>He said that "This version will find mates in quiescence if they involve
>captures.  Which version to use is a matter of taste and testing."
>I thought check detection is compulsory not optional.
>How does it work without check detection in qsearch?


If you think about it, every move you do in your quiescence search
is optional.  (Every move in your full width search is optional,
for that matter!)

The purpose of the quiescence search is to ensure you are evaluating
quiescent positions.  Exactly what that means is open to
interpretation.  You could do "all captures", or "some captures",
or "some captures and checks", or "captures and pawn pushes
past the 5th rank"....

You may find it tempting to do all kinds of things in your
quiescence search, but keep in mind that doing so is typically
a trade-off.  You may find yourself search less deeply overall...

--
James



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.