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

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

Re: Possible bug in load command for a FEN file.


From: Antonio Ceballos
Subject: Re: Possible bug in load command for a FEN file.
Date: Sun, 5 Apr 2015 10:02:12 +0200

Hi Clayten,

I can see the problem you describe, either in xboard mode (gnuchess -x) or 
in the default mode. The reason is that the FEN position has a syntax error.
There must be six data fields in a FEN position, but there are only five fields 
in the one you are using. When GNU Chess parses that position, it expects
the en-passant field in the fourth position, but it comes across a counter.
Either a '-' or a valid en-passant square should be there.

If you replace your position

2kr4/pp3pp1/4b1p1/2R5/8/1P4P1/P1PP3r/2K5 b - 2 21

by this one:

2kr4/pp3pp1/4b1p1/2R5/8/1P4P1/P1PP3r/2K5 b - - 2 21

and save it in a file, GNU Chess will happily load the file.

Therefore, I think that GNU Chess is correct in complaining about that
FEN position. However, we should improve the error message.

If other tools accept your original position, it seems that they are relaxing
the FEN syntax, but I could not say for sure.

Please try GNU Chess with the fixed FEN position and get back to us in
case of need.

By the way, I would be very interested to see your web site using
GNU Chess.

Regards,
--Antonio Ceballos


On Fri, Apr 3, 2015 at 10:51 PM, Clayten Gillis <address@hidden> wrote:
Hello,

     I am using gnuchess as a chess engine for a website I have developed.  After a player makes a move, I generate a FEN file, spawn a process that runs 'gnuchess -x' and sends commands via standard in and reads from standard out.
     I have come across a FEN position that gnuchess says is bad but is being verified by other tools as being correct.  I have verified the same results manually.

Versions tried:
gnuchess 6.2.1, 6.1.2, 6.1.1

FEN string:
2kr4/pp3pp1/4b1p1/2R5/8/1P4P1/P1PP3r/2K5 b - 2 21

To cause the error:

1. Save the above FEN string into a file.
2. Run gnuchess -x
3. type load <pathandnameoffile>

From my gnuchess I get this:

TimeLimit[0] = 0
TimeLimit[1] = 0

black    a1
. . k r . . . .
p p . . . p p .
. . . . b . p .
. R . . . . . .
. . . . . . . .
. P . . . . P .
P . P P . . . r
. . K . . . . .
 
board_from_fen(): bad FEN (pos=45)

I have loaded the same FEN into a few viewers and they say the position is fine.  If you could confirm if this is an error or not that would be great.

_______________________________________________
Bug-gnu-chess mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-gnu-chess



reply via email to

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