Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: And a few additional questions.

Author: Bruce Moreland

Date: 10:03:49 11/26/00

Go up one level in this thread


On November 26, 2000 at 11:13:31, Severi Salminen wrote:

>Hi!
>
>I forgor to mention that I use the "stand pat" beta cutoffs in qsearch:
>
>if(static_eval>=beta)
>   return static_eval);
>
>I'd like to know should I test any mate or stalemate situations before returning
>(in those cases the score is totally wrong). Or do I allways make the assumption
>that there is at least one legal non capture move available (which is not
>obviously tested)?
>
>And is there any idea to try nullmoves in qsearch? Has anyone tried that and
>what was the result?
>
>Severi

The quiescent search included at the end of this does null-moves implicitly.  If
the score returned after a null-move is better than the score returned after any
capture, it will return the null-move score.

It doesn't use null-move for threat detection, but there is some use of it in
there.

If you want, you can see if the side to move is in check, and if that's the
case, you can call your regular search routine with a depth of 1 (one ply of
full-width search), which will allow you to figure out if the side to move is
mated.  It might be a little harder to detect stalemates.

If you don't detect checks, you'll miss some mates that occur at the tips.  That
may or may not matter to you.

bruce

int qsearch(int alpha, int beta)
{
    int cur;

    cur = eval();
    if (cur >= beta)
        return beta;
    if (cur > alpha)
        alpha = cur;
    while (captures()) {
        make_next_capture();
        cur = -qsearch(-beta, -alpha);
        unmake_move();
        if (cur >= beta)
            return beta;
        if (cur > alpha)
            alpha = cur;
    }
    return alpha;
}




This page took 0.01 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.