Perhaps we can structure the discussion a bit more. IMO, it might be a good idea to first come to a broad consensus on the functional requirements that the new PDN standard needs to satisfy. Only then should we look for a clean grammar.
Basic philosophy
-------------------
From the PGN standard
http://www.saremba.de/chessgml/standard ... mplete.htm
Code: Select all
1: Introduction
PGN is "Portable Game Notation", a standard designed for the representation of
chess game data using ASCII text files. PGN is structured for easy reading and
writing by human users and for easy parsing and generation by computer
programs. The intent of the definition and propagation of PGN is to facilitate
the sharing of public domain chess game data among chessplayers (both organic
and otherwise), publishers, and computer chess researchers throughout the
world.
PGN is not intended to be a general purpose standard that is suitable for every
possible use; no such standard could fill all conceivable requirements.
Instead, PGN is proposed as a universal portable representation for data
interchange. The idea is to allow the construction of a family of chess
applications that can quickly and easily process chess game data using PGN for
import and export among themselves.
I think it is important to appreciate the universality of this goal: PDN is not just for programmers, but also for players to exchange games. Readability is therefore not just eye candy but an ingredient that will facilitate standard compliance.
More basic ideas from the same PGN document:
Code: Select all
2.2: Specification goals
A specification for a portable game notation must observe the lessons of history and be able to handle probable needs of the future. The design criteria for PGN were selected to meet these needs. These criteria include:
The details of the system must be publicly available and free of unnecessary complexity. Ideally, if the documentation is not available for some reason, typical chess software developers and users should be able to understand most of the data without the need for third party assistance.
The details of the system must be non-proprietary so that users and software developers are unrestricted by concerns about infringing on intellectual property rights. The idea is to let chess programmers compete in a free market where customers may choose software based on their real needs and not based on artificial requirements created by a secret data format.
The system must work for a variety of programs. The format should be such that it can be used by chess database programs, chess publishing programs, chess server programs, and chessplaying programs without being unnecessarily specific to any particular application class.
The system must be easily expandable and scalable. The expansion ability must include handling data items that may not exist currently but could be expected to emerge in the future. (Examples: new opening classifications and new country names.) The system should be scalable in that it must not have any arbitrary restrictions concerning the quantity of stored data. Also, planned modes of expansion should either preserve earlier databases or at least allow for their automatic conversion.
The system must be international. Chess software users are found in many countries and the system should be free of difficulties caused by conventions local to a given region.
Finally, the system should handle the same kinds and amounts of data that are already handled by existing chess software and by print media.
Especially the fifth goal is laudable. E.g., I think there is a trend for more and more online broadcast games. Such games already include time information per move. Another idea might be to include the alpha-beta score after each move (to create graphs such as the Truus program does). This can be easily done using comments in variations. In any case, it would be nice if current programs can read such future PDN files simply by ignoring this information. This essentially captures Ed Gilbert's remarkt to be liberal in reading, conservative in writing.
Functional requirements
---------------------------
1) Encompass all known and future draughts variants. The file
http://www.xs4all.nl/~mdgsoft/draughts/pdn.html gives a description how to specify variants:
Code: Select all
GameType "Type-number [,Start colour (W/B),Board width, Board height, Notation
[,Invert-flag]]"
Type-number: this is one of the following type-numbers
0: Chess
1: Chinese chess
2-19: future chess expansion
20: 10x10 draughts (international)
21: English draughts (kings only move 1 step at a time)
22: Italian draughts (as English, Men cannot take kings, must capture max)
23: American pool draughts (as 10x10, not obliged to take max)
24: Spanish pool draughts (as 10x10 rules, but men cannot capture backwards)
25: Russian draughts
26: Brazilian 8x8 draughts (same as 10x10 rules)
27: Canadian 12x12 draughts (same as 10x10 rules)
28: Portugese draughts
29-49: Future draughts expansion
50: Othello
51.. Future expansion.
Start-colour: Either W or B - white/black side starts (can vary in draughts)
Board-width: Width of board..
Board-height: Height of board..
Notation: A=alpha/numeric like chess, N=numeric like draughts.
S=SAN - short-form chess notation.
Then follows a number 0-4 telling where square A1 or 1 is for
the side who starts the game (White or black)
0= Bottom left, 1=Bottom right, 2=Top left, 3=Top right..
Invert-flag: 0 = play on dark squares (like english & 10x10), 1 = play on light
squares (like italian draughts) This is only needed in draughts.
2) Backwards read-compatibility for all existing PDN archives on the web. This means being able to read output from the current version of TurboDambase, and being able to read existing archives for Russian, American and Italian draughts for programs that support these variants. Programs that do not support such variants should exit gracefully (i.e. with a notification, not by crashing). Note that Russian databases routinely use the short algebraic (chess-like) notation (and they conform to the convention of using Game-type==25). Also note that I do not propagate the default use of algebraic short notation for 10x10 draughts, but a program should be able to read such input or specify that it doesn't with a graceful exit.
3) Backwards write-compatibility to the most frequently used programs on the web (i.e. TurboDambase, Truus, Flits, Dam 2.2 for 10x10 draughts). Now this will be a difficult thing to achieve when adding a lot of new features to the standard, but I think a lot of current programs are already liberal in reading and will skip unrecognized tags etc. As long as a clean sequence of moves and a FEN string gets read without hiccups, this goal might be attainable.
Again from the PGN standard:
Code: Select all
3.2.4: Reduced export format
A PGN game represented using export format is said to be in "reduced export format" if all of the following hold: 1) it has no commentary, 2) it has only the standard seven tag roster identification information ("STR", see below), 3) it has no recursive annotation variations ("RAV", see below), and 4) it has no numeric annotation glyphs ("NAG", see below). Reduced export format is used for bulk storage of unannotated games. It represents a minimum level of standard conformance for a PGN exporting application.
4) Anticipate future online draughts games / fragments / problems. There is a trend that more and more newspapers, magazines etc. become online (freely or with subscription). The Google Book project may or may not get to such specialized literature, but it can't hurt to be ready for that. We already know that these sources contain features that are currently not in the standard, such as short numeric notation (heavily used and propagated by problem composers, it's a very sensitive matter for them, so forget about converting them to long numeric notation) and abbreviated FEN strings (with separators such as "-" or "t/m").
Then a final comment on the syntax for FEN strings. This was first described in Adrian Millet's attempt at a PDN standard
http://homepages.tcp.co.uk/~pcsol/sagehlp1.htm#PDN
Code: Select all
The FEN format must be "SIDE_TO_MOVE:W(pieces):B(pieces)." A K indicates a king.
and elaborated into Murray Cash's PDN 2.0
Code: Select all
6.1.1.1.1.7 FEN_TEXT DEFINITION (Optional)
A description of the set up position of the board enclosed in double
quotes ("). This header is only used when the game does not begin
from the usual starting position. Typically the game is a
continuation of a problem, or an 11-man ballot game.
The format of the quoted description is as follows:
[TURN]:[COLOUR1][[K][SQUARE_NUM][,]...]:[COLOUR2][[K][SQUARE_NUM][,]...]
[TURN] is B or W defining whose turn it is to play first (B =
Black/Red, W = White).
[COLOUR1] and [COLOUR2] are either B or W defining the colour of the
pieces on the squares to follow. One must be B; the other W. The
sequence is unimportant.
[K] is optional before each SQUARE_NUM and if used, indicates the
piece on that square is a king, otherwise it is a man.
[SQUARE_NUM] indicates the square number that is occupied by a
certain piece. This is in the range 1-32 according to checkers
standards. These are comma-separated, and their sequence is
unimportant.
THe only difference is the use of the "." as a closing character.