🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.chess
Article #1374

Re: Problem with FEN positions in GnuChess 5.07

#1374
From: Simon Waters
Date: Tue, 09 Mar 2004 18:09
105 lines
4672 bytes
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigA8CCE4C6E32BFB47CA464E8C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Alex Holland wrote:
> 
> I've been playing around with FEN positions in 5.07, and discovered a
> segfault problem - not exactly a bug, but it could be friendlier.

All segfaults are bugs - unless you messed with something deep
underneath GNU Chess that it couldn't possibly be expected to cope with.

> If you load in a FEN position where white has black in check, and the turn
> flag indicates that it's white's turn, GNU Chess segfaults. On the one
> hand, this is quite reasonable, as it's an impossible position to get into,
> but on the other hand the error could be handled more gracefully. I've just
> spent ages trying to automate GNU chess for a series of FEN described PGN
> books, only to suffer crashing on every other file and having no idea why -
> the solution dawned on me this morning and left me feeling like an idiot.

Can you supply a test case please.

$ cat test.epd
r1bqkbnr/pp1ppQpp/2n5/2p5/4P3/8/PPPP1PPP/RNB1KBNR w KQkq - bm 1; id 1;

$ gnuchess
GNU Chess 5.07
Adjusting HashSize to 1024 slots
Transposition table:  Entries=1K Size=40K
Pawn hash table: Entries=0K Size=28K
White (1) : epdload test.epd

 : Best move = 1

white  KQkq
r . b q k b n r
p p . p p Q p p
. . n . . . . .
. . p . . . . .
. . . . P . . .
. . . . . . . .
P P P P . P P P
R N B . K B N R

Board is wrong!
White (1) : go
Thinking...
Looking for opening book in book.dat...
Read opening book (book.dat)...
Loading book from book.dat.
105 hash collisions...  Opening database: 625 book positions.
 In this position, there is no book move.


Time = 0.0 Rate=494 Nodes=[11/1/12] GenCnt=96
Eval=[3/6] RptCnt=0 NullCut=0 FutlCut=0
Ext: Chk=6 Recap=0 Pawn=0 OneRep=5 Horz=0 Mate=0 KThrt=0
Material=[3600/3600 : 4400/4300] Lazy=[150/150] MaxPosnScore=[150/150]
Hash: Success=85% Collision=50% Pawn=0%

black  KQkq
r . b q k b n r
p p . p p Q p p
. . n . . . . .
. . p . . . . .
. . B . P . . .
. . . . . . . .
P P P P . P P P
R N B . K . N R


My move is : Bc4#
1-0 {computer wins as white}
Black (1) : quit

Okay not exactly legal chess - but no segfault - I think it should just
reset the pieces on "Board is wrong!".

> BTW, is 5.07 officially released? Gentoo seemed somewhat suprised when I
> pointed out to them that it's been out since august, and the webpage at
> gnu.org still isn't updated.

Yes  - but the release got messed up by various issues at GNU, which
delayed the update of the book to version 1.01. And I haven't had time
or inclination to revisit it since.

Book 1.00 had unmatched quotes which meant a strict interpretation of
PGN vast chunks of it were tags and not games - despite appearances to
the contary.

--------------enigA8CCE4C6E32BFB47CA464E8C
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFATghUGFXfHI9FVgYRAvfUAJ0Van2hUnXck8bl/IrZoAJZtKHkYgCcC4uX
OKUSS1fAYGASZh1JOWDUuCI=
=4Dcf
-----END PGP SIGNATURE-----

--------------enigA8CCE4C6E32BFB47CA464E8C--
Technical Details
Message-ID: <c2l19j$f0n$1$8300dec7@news.demon.co.uk>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail
References: <404c9d1c$0$24211$cc9e4d1f@news.dial.pipex.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d71d,ef41bff5602603f7
X-Google-Attributes: gid10d71d,public
X-Google-ArrivalTime: 2004-03-09 10:09:57 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail
From: Simon Waters <Simon@wretched.demon.co.uk>
Newsgroups: gnu.chess
Subject: Re: Problem with FEN positions in GnuChess 5.07
Date: Tue, 09 Mar 2004 18:09:23 +0000
Organization: Eighth Layer Limited
Lines: 105
Message-ID: <c2l19j$f0n$1$8300dec7@news.demon.co.uk>
References: <404c9d1c$0$24211$cc9e4d1f@news.dial.pipex.com>
NNTP-Posting-Host: wretched.demon.co.uk
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="------------enigA8CCE4C6E32BFB47CA464E8C"
X-Trace: news.demon.co.uk 1078855796 15383 193.237.109.203 (9 Mar 2004 18:09:56 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Tue, 9 Mar 2004 18:09:56 +0000 (UTC)
In-Reply-To: <404c9d1c$0$24211$cc9e4d1f@news.dial.pipex.com>
X-Enigmail-Supports: pgp-inline, pgp-mime
X-Enigmail-Version: 0.83.2.0
X-Accept-Language: en-GB, en-US, en
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113