Computer Chess Club Archives


Search

Terms

Messages

Subject: Is it optional to detect check in qsearch?

Author: Kevin K

Date: 04:27:02 05/04/05


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?



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.