Article View: gnu.chess
Article #1466Re: move string format
From: Simon Waters
Date: Wed, 26 Mar 2003 16:52
Date: Wed, 26 Mar 2003 16:52
51 lines
3295 bytes
3295 bytes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andy Georges wrote: > > Sorry if this is a FAQ, but can anybody point me to some docs or explain how > I can get gnuchess to generate the moves it chooses in a standard format, > such as e2e3 instead of also giving the target position or the piece plus > the target position? GNU Chess produces moves in standard algebraic notation (SAN). This is the most widely used format for representation of chess moves, it may not be the most easily machineable format, but that isn't the only criteria for selecting a format, otherwise it would probably be in binary. I'd strongly suggest you consider working with SAN, if you need to handle chess moves in software. SAN is documented in the PGN specification. There is a rather dated SAN toolkit for parsing SAN in C, many major programming and scripting languages now have SAN parsing modules (Perl, Python etc). I'm not sure what alternative you are suggesting, but "from square, and to square" doesn't handle (under)promotions very well. LAN is very bulky, and I don't think we'll be implementing obselete standards for output. If you do need to implement an output format to handle software not using standard algebraic notation you'll find all the bits you need in the SANMove routine in move.c, but I fear this way lies madness and the tower of Babel, and such changes are unlikely to be merged back in unless you can make a very compelling case. The PGN specification is required reading at this point. The approach used is to accept less strict move representations, but only produce standard compliant output, which is a long established tradition for this kind of problem. Any deviation from SAN in the current version of GNU Chess is a bug. GNU Chess 5.06 is too chatty in Xboard mode, this will be fixed in 5.08. -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+gdrDGFXfHI9FVgYRAkC8AKCdx1Gf+v0zHEYUE9Ae1wL5htIiwgCgqHOi RcKwG5u2sRnvBIatAhG6J94= =+wqo -----END PGP SIGNATURE-----
Technical Details
Message-ID:
<b5slue$soq$1$8300dec7@news.demon.co.uk>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mailReferences:
<b5shon$2ce94s$1@ID-141095.news.dfncis.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d71d,a5953c1d8d5db47c X-Google-Attributes: gid10d71d,public X-Google-ArrivalTime: 2003-03-26 08:53:36 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!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: move string format Date: Wed, 26 Mar 2003 16:52:21 +0000 Organization: Eighth Layer Limited Lines: 52 Message-ID: <b5slue$soq$1$8300dec7@news.demon.co.uk> References: <b5shon$2ce94s$1@ID-141095.news.dfncis.de> NNTP-Posting-Host: wretched.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.demon.co.uk 1048697615 29466 193.237.109.203 (26 Mar 2003 16:53:35 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 26 Mar 2003 16:53:35 +0000 (UTC) In-Reply-To: <b5shon$2ce94s$1@ID-141095.news.dfncis.de> X-Enigmail-Supports: pgp-inline, pgp-mime X-Enigmail-Version: 0.71.0.0 X-Accept-Language: en-GB, en-US, en User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130