bug-gnu-chess
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug with GNU Chess Version 5.02


From: Chris Woodall
Subject: Bug with GNU Chess Version 5.02
Date: Tue, 22 May 2001 17:06:38 +0100

This bug concerns invalid moves.

If GenMoves(1) produces a pseudo legal moves which is actual illegal, i.e. due to discovered check, and that move is the final move in the list and is subsequently removed by FilterIllegalMoves(1) then GNU Chess allows you to make the move.

The cause I believe is the sub routine IsInMoveList the line that reads

for (node = TreePtr[ply]; node <= TreePtr[ply + 1]; node++)

it should read

for (node = TreePtr[ply]; node < TreePtr[ply + 1]; node++)

due to the fact that GenMoves always leaves TreePtr[ply + 1] pointing to the next free slot.

The following EPD file text has an example position:

5r2/1p2b3/2p2Pkp/8/p1p5/P3R3/1P3KP1/8 w - - bm 1; id 1;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]