Author: Andrew Wagner
Date: 05:35:36 04/13/04
If nothing else in this makes sense, skip to the last paragraph and see if
that at least doesn't sound pretty neat. I'd love to hear what you all think!
Andrew
PGML - Portable Game Markup Language
I. Introduction
One of the most useful things about XML is its datacentric nature. It is this
datacentric quality that I want to focus on in order to create a new standard
for chess data exchange and distribution. The over-all goal for this project is
to take existing standards of chess representation, such as FEN, EPD, PGN, and
possibly more, and combine them under one set of powerful web-friendly tools
which will be easy to use and extend.
II. Existing Standards
First, a brief description of each of the existing standards which will be
encapsulated in this project. It is quite possible that more will be added
later, and certainly additional individual features will be supported (see part
III).
1.) PGN (Portable Game Notation) - This will provide the core of the project.
Developed by Steven J. Edwards, this standard is described in great detail at
http://www.very-best.de/pgn-spec.htm (among other places). The PGN standard is
by far the most widely-used open-specification notation used for representing
chess games. It provides the ability to represent information about the context
of a game as well as the actual moves of the game itself. The main thrust of
this project will be to take a PGN document and encapsulate it in an XML
document, with the ability to quickly and easily transform it (via XSLT) to a
number of different ways of displaying those chess games and information about
them.
2.) FEN (Forsyth-Edwards Notation) - This notation is described as a part of
the PGN specification, in section 16.1. Originally developed in the 19th
century, and updated for use in PGN, this notation is used to describe a
specific chess position. Not only does it represent the location of the pieces,
but it also gives important game state information (e.g. side to move).
3.) EPD (Extended Position Description) - This notation is also described as
part of the PGN specification, in section 16.2. Very similar in appearance to
FENs, it also describes an individual chess position. In addition, it supports a
number of operations for this position. This notation is primarly used for test
suites for chess-playing programs, though many other uses can be imagined.
III. Expanded set of features
There are other features which have not previously been adequately addressed or
standardized which will be included in this project. Here is a partial list
(subject to change):
- Simple JavaScript replay support: The well-known German database program
called ChessBase has the ability to output games to an HTML page, enabled with
JavaScript to be able to replay games client-side. To the author's knowledge,
this has not been done elsewhere. This feature will be included in this project.
- Tournament output: The ability to easily generate historical crosstables from
a PGN file will be supported by this project.
IV. Project goals
1.) A high level of reverse-compatibility with existing standards. It should be
very easy to convert back and forth between PGML and existing documents.
2.) The ability to take one document, with pure data, and easily output a
number of different useful results, any of which can be easily customized.
V. Overview
Included in this toolkit will be:
- A complete PGML XML schema, well-documented, which will define all the
possible elements of a PGML file, both enabling people to know how to write a
PGML file and also allowing for easy validation of an existing PGML file.
- A set of XSLT scripts which can be used to transform a PGML document to each
of the following forms: Standard PGN, Crosstable, Diagrams, JavaScript, EPDs,
FENs.
- A program which will parse a PGN file and convert it to a PGML document (note
that the reciprocal process is handled via an XSLT script mentioned above)
How would this toolkit be used?
- Let's create a scenario. Say we take four strong amateur programs and pit
them against each other in a tournament, outputting the results to a PGN file.
Now, we take that PGN file and, using the PGN->PGML converter program, turn it
into a (still pure text) PGML file. Now, we can change one line in this file,
and when we open it in a browser, the output will be a crosstable for the
tournament. We go back to the file, change the line again, and get a Standard
PGN file. In the same way we can a ChessBase-like HTML file whereby we can play
through the games, a list of EPDs of all the moves which were anotated with !'s
(or with ?'s), or FENs of interesting positions. All of this is done without
changing the original PGML file (other than a single reference to an XSLT file),
and with the ability to save the result for future reference. Hopefully this
example will make clear the power of the PGML project.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.