|
||||
Title: Sorta real PGN please Post by Janzert on Sep 5th, 2009, 9:56pm I'm starting work on adding the ability for some of my stuff to read and/or write movelists. Rather than use raw movelists though I figured it would be good to handle actual PGN format games. Especially since I recalled that the site had a link (http://arimaa.com/arimaa/games/pgn.cgi) for getting the PGN of any game in the database. Unfortunately the output doesn't seem to conform at all to the PGN format. Of course standard PGN is pretty chess specific and will have to be modified for Arimaa use. But I think it would be nice if we can keep as much as possible the same. Specifically the two things I would really like to have are the following. Same tag pair format. In PGN parlance the header information is called the tag pairs section. The current script seems to use Code:
The PGN standard is Code:
Include the move text game termination marker. The current script doesn't include any marker at the end of the movelist. The PGN standard specifies the same marker as used in the Result tag, i.e. 1-0, 0-1, 1/2-1/2 or *. One other thing it might be nice to have if the script is being modified would be to change the move colors to g/s from w/b. But any program for the foreseeable future will need to handle both anyway. In case somebody would like to read about PGN a quick overview of PGN can be found at http://en.wikipedia.org/wiki/Portable_Game_Notation and the full specification at http://www.very-best.de/pgn-spec.htm. If you want Omar, I'd be glad to modify the script to do any or all of the above. Janzert p.s. One other thing I just noticed is that the current script has a tag called PlyCount that seems to actually be the number of moves instead of plies. I think I've seen this other places as well, but it would be nice to start eliminating it where possible. |
||||
Title: Re: Sorta real PGN please Post by Fritzlein on Sep 6th, 2009, 7:54am To me the most important part of a move list standard is its facility for annotating variations. PGN allows one to put comments in braces, but the comments are intended to be text blobs. If you do put an alternate line of play in a comment, you can't then branch it. This is simply inadequate for serious commentary. Apparently the PGN people are aware of this limitation, because their specification (http://www.very-best.de/pgn-spec.htm) includes the following: Quote:
So if I understand the important delimiters, they are: brackets: tags (can't be nested) braces: comments (can't be nested) parentheses: variations (can be nested) I thought the commentary here (http://www.chessbase.com/cbm/reeh2009e/12cheparinov_gashimov.htm) would be a good example of annotated PGN, but for some reason the comments there are in brackets, not braces. The trouble with standards is that everybody has one. The annotation interface I am dreaming of when I talk about defining a standard is the ChessBase Light software which can be downloaded gratis here (http://www.chessbase.com/download/cblight/index.asp?newsid=5654). Of course I don't expect to see anything like that for Arimaa in the near future, but agreeing on a standard notation for annotating games seems like the first step to getting there. If we have the standard, then any games created in a proto-interface can be exported to better interfaces later without loss. |
||||
Title: Re: Sorta real PGN please Post by Janzert on Sep 6th, 2009, 10:47am I'm not sure I understand what limitation you think PGN has. The game commentary you link to is basically a viewer for a PGN game with nested alternate lines of play, the raw pgn can be found here (http://www.chessbase.com/cbm/reeh2009e/12cheparinov_gashimov.pgn). Yes, comments are raw text blobs. That's almost the definition of a comment to a programmer. ;) So basically the PGN doesn't hold the alternate line of play in the comment but rather the comment in the alternate line of play (and this sentence sounds like it should be a bad communist russia jokes). Janzert |
||||
Title: Re: Sorta real PGN please Post by Fritzlein on Sep 6th, 2009, 12:38pm OK, great, let's make that the standard. :) |
||||
Title: Re: Sorta real PGN please Post by aaaa on Sep 6th, 2009, 12:49pm I can't speak from experience, but I understand that Smart Game Format (SGF) may have better variation support. Might want to look into it. |
||||
Title: Re: Sorta real PGN please Post by Janzert on Sep 6th, 2009, 7:44pm While I've only had minimal contact with SGF, and actually only slightly more with PGN, I've always been mildly repulsed by it. But only because I feel it's much less easily read and written by a human. I believe both formats can represent the same set of variations since they both seem to represent the moves and variations as a tree structure. I think SGF's advantage is that it's specifically designed to be game neutral and able to be easily used or at least extended for any game. Unfortunately I feel this is also the greatest disadvantage. An Arimaa SGF file will look quite similiar to other SGF files but quite unlike any current Arimaa format or notation. I would love to hear from Don Dailey, David Fotland or anyone else that has significant use of both formats as to which they a) like better and b) would make a better base for an Arimaa format. Janzert |
||||
Title: Re: Sorta real PGN please Post by Janzert on Sep 6th, 2009, 8:34pm I decided to try doing a simple game in both formats. So here is game #19009 in both PGN and SGF. PGN: Code:
SGF: Code:
I may not have the SGF close to what it should really look like though, since I'm just going by a couple samples and the specification to write that. The SGF actually is a little more readable than I thought it would be. It turns out, unlike I had thought, the move notation is completely game specific. One thing I'm not sure about and was a bit of a surprised by, is the time control information in SGF seems to be very Go specific and probably not usable for Arimaa time control information. Janzert |
||||
Title: Re: Sorta real PGN please Post by Fritzlein on Sep 17th, 2009, 1:12pm Hmmm, I forgot that the only move notation standard is the verbose one. I guess it is difficult to raise the issue of PGN without resurrecting the issue of the move notation per se. I will have to attend naveed's local Arimaa club and play a live game while recording moves in order to give another test to the notation I used in Beginning Arimaa. |
||||
Title: Re: Sorta real PGN please Post by omar on Sep 23rd, 2009, 8:59pm I really should not have called that PGN since the format is not exactly PGN. It was just inspired by looking at PGN. Probably should just call it AGN for Arimaa game notation. I had documented the slightly modified format on the notation page: http://arimaa.com/arimaa/learn/notation.html However that was all done at a time when data interchange formats like JSON were not common. If I were to do it now I would just use a well known data interchange format rather then defining our own so that we don't have to worry about writing code for encoding and decoding the format. I just created this service which gives the fields of a game record in one of the standard formats: http://arimaa.com/arimaa/games/agn.cgi |
||||
Title: Re: Sorta real PGN please Post by Janzert on Jan 25th, 2010, 11:30am Just for the record, the reason I was looking to move toward a more correct PGN file was so various existing tools, in particular bayeselo, could be used directly. Of course with whatever format is standardized a script can be created to translate to the pgn files needed by those tools. Janzert |
||||
Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1! YaBB © 2000-2003. All Rights Reserved. |