Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Computer chess schools of thought

Author: Russell Reagan

Date: 10:04:26 07/01/02

Go up one level in this thread


On July 01, 2002 at 07:18:45, Sune Fischer wrote:

>And I don't see how it solves Craftys problem, you still might evaluate
>positions where the king is in check.

The way Bob has described how he handles generating illegal moves for a pinned
piece has given me the impression that he does something like the following
(using a slightly modified version of Bruce's alpha-beta)...

int AlphaBeta(int depth, int alpha, int beta)
{
    if (depth == 0)
        return Evaluate();
    GenerateLegalMoves();
    while (MovesLeft()) {
        MakeNextMove();
        if(InCheck(sideNotToMove)) {
            UnmakeMove();
            continue;
        }
        val = -AlphaBeta(depth - 1, -beta, -alpha);
        UnmakeMove();
        if (val >= beta)
            return beta;
        if (val > alpha)
            alpha = val;
    }
    return alpha;
}

That would protect against an illegal king in check position. Of course, I may
be misunderstanding what you're saying. If you saying that this problem is no
longer "solved" since he doesn't do InCheck stuff in his QSearch, then I'm as
lost as you :)

Russell



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.