12 May 2009

Chess960 PGN

Unfortunately, PGN for chess960 isn't as 'portable' as the 'P' in PGN would indicate. In this post I'll compare PGN formats from different sources. The first example is a bare bones PGN file that I created from scratch. I selected the start position (SP) using the dice technique described in A Database of Chess960 Start Positions, and used the same SP in the other examples where I had the possibility to do so.

In this and the following examples, I've stripped out nonessential header tags like players' ratings and nationalities. The minimum chess960 tag set is the standard PGN seven tag roster plus the [SetUp] and [FEN] tags. I'm not sure why the [SetUp] is required -- the [FEN] tag should be enough to trigger a nonstandard position -- but I believe the PGN standard calls for it. My personal preference is to document the SP in the [Annotator] tag, which is the only extraneous tag here.

[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "W"]
[Black "B"]
[Result "*"]
[Annotator "SP579"]
[SetUp "1"]
[FEN "bqrnkrnb/pppppppp/8/8/8/8/PPPPPPPP/BQRNKRNB w KQkq - 0 1"]


Next is a PGN file produced by Arena, an engine interface I described in Chess960 Engines. It defaults to the last engine I had loaded, Rybka 2.2, even though it's not chess960 compliant.

[Event "?"]
[Site "?"]
[Date "2009.05.12"]
[Round "?"]
[White "Mark"]
[Black "Rybka 2.2 32 bit"]
[Result "*"]
[SetUp "1"]
[FEN "nbrknqbr/pppppppp/8/8/8/8/PPPPPPPP/NBRKNQBR w KQkq - 0 1"]
[PlyCount "0"]


The next example is from Chess Classic Mainz 2008 (CCM8).

[Event "CCM8 - FiNet Chess960 Women's Wch"]
[Site "Mainz"]
[Date "2008.07.29"]
[Round "1"]
[White "Kosteniuk, Alexandra"]
[Black "Cmilyte, Viktorija"]
[Result "1/2-1/2"]
[Annotator "Chess Tigers"]
[Variant "chess 960"]
[SetUp "1"]
[FEN "bnrbkrqn/pppppppp/8/8/8/8/PPPPPPPP/BNRBKRQN w FCfc - 0 1"]
[PlyCount "143"]

{SP 353} 1. c4 c5 2. Ng3 e6 3. e3 b6 4. Nc3 Nc6 5. Nge4 Be7 6. Nb5 O-O-O [...]

The next is an engine vs. engine game from CCRL 404FRC : Downloads and Statistics,

[Event "CCRL 404FRC"]
[Site "CCRL"]
[Date "2006.09.21"]
[Round "1.1.867"]
[White "Loop 10.32f"]
[Black "Fruit 2.2.1"]
[Result "1/2-1/2"]
[Opening "BQRNKRNB"]
[PlyCount "151"]
[SetUp "1"]
[FEN "bqrnkrnb/pppppppp/8/8/8/8/PPPPPPPP/BQRNKRNB w FCfc -"]

1. b4 {+0.11/13 10s} Nf6 {+0.10/13 11s} 2. Bxf6 {+0.31/13 18s} exf6 [...]

The last example is from SchemingMind.com, an online play site that I've mentioned in several posts.

[Event "Chess960: Pyramid challenge from Apocalypse"]
[Site "SchemingMind.com"]
[Date "2007.09.20"]
[Round "-"]
[White "Apocalypse"]
[Black "Chess Tiger"]
[Result "1-0"]
[Variant "fischerandom"]
[SetUp "1"]
[FEN "bqrnkrnb/pppppppp/8/8/8/8/PPPPPPPP/BQRNKRNB w KQkq - 0 1"]

1. b4 b5 2. c4 Nf6 3. Bxf6 gxf6 4. c5 Nc6 5. e3 e6 6. d4 f5 7. Ne2 Rg8 8. h3 Ne7 [...]

The most important difference across the various files is in the [FEN] tag. The 'KQkq' designation taken from traditional chess has been replaced by 'FCfc' in two examples. 'F/f' and 'C/c' are the files where the Rooks start, as described in X-FEN (Wikipedia).

The distinction between 'KQkq' and 'FCfc' (or 'HAha' etc.) is not important at the start of the game. It would be important if the FEN string described a position later in a game where one of the Rooks had crossed over to the other side of the King. In this case, 'Kk' (or similar) would not be sufficient to indicate which of the two Rooks could castle O-O.

Another difference is the use of the [Variant] tag. The Arena and CCRL examples omit it, the CCM example uses 'chess 960', and the SchemingMind (SM) example uses 'fischerandom'. I can imagine that 'chess960', 'fischerrandom', and 'FRC' are also in use on other chess960 services.

Finally, I like the way the numbered SP '{SP 353}' has been embedded as a comment in the CCM example. The Arena and SM examples don't document the SP, while CCRL uses the [Opening] tag to give the same information that is already available in the [FEN] tag.

1 comment:

Chessforeva Dev said...

I really don't understand: why does "fisherrandom" chess need castling? It is a big problem for any chess software. It means serious special cases inside the code (can I do castling now, strange castling movements, searches and evaluations,etc). It would be right to establish rule: NO CASTLING and almost every normal chess software would be already ready, by setting [FEN "...... w - -"] in the PGN's header or just setting up position using console or own interface.