Author: Robert Hyatt
Date: 06:58:37 07/02/02
Go up one level in this thread
On July 01, 2002 at 13:04:26, Russell Reagan wrote:
>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
I don't do that. Look at quiesce.c, right after the call to GenerateCaptures().
It specifically checks to see if the best captured piece is a king. If it is,
return(beta) is done instantly...
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.