Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: When PGN goes wrong? My list of the 18 most common PGN sins

Author: Tim Mann

Date: 18:01:36 10/18/00

Go up one level in this thread


A lot of those things are legal for PGN "import" format.  I've always felt that
PGN "export" format is not very useful, so xboard/WinBoard deviates from it
somewhat, but stays entirely within the bounds of PGN import format.  The result
is that every PGN-compliant program should be able to read my PGN (all programs
are required to be able to read import format), but it isn't guaranteed to be
character-for-character identical to any other program's output.  The only thing
that export format buys you is that it exactly defines every character of the
movetext, so you can compare two games without parsing them first, just by doing
a string comparison.  This seems fairly pointless to me.

I do use export format as a guideline and deviate from it only when it seems
worthwhile.  For instance, I wrap on shorter lines than 79 characters because
users complained about 79-character lines.  If you put one in a mail or news
message and someone replies to it, the leading "> " indentation makes the lines
longer than 80 characters and they wrap.  This is no big deal, but I got enough
complaints that I changed it.  I don't recall any complaints that I don't follow
PGN export format.  (Unless you sent me one that I've forgotten!)

On October 18, 2000 at 13:41:49, Richard A. Fowell wrote:
>PGN sins I've seen: (how does your program do on this list?)
> 1) wraps movetext lines to less or more than the required 79 character maximum

Legal in import format.  I do this one, as mentioned.  Also, I always
start a new line for the game end token.

> 2) Omits required empty line after movetext (especially at end of file)

Legal in import format.

> 3) Omits required empty line separating tags from movetext

Legal in import format.

> 4) Tags not in required order (standard seven in std order, then alphabetic)

Legal in import format.  I do put the standard seven first, but the others
are sometimes in a logical order (e.g., WhiteElo and BlackElo appear together in
that order), not alphabetical.

> 5) Omits the space after the periods, e.g. "1.e4" instead of "1. e4".

Legal in import format.

> 6) Inserts non-PGN lines, before/between PGN games in PGN file [TWIC does this]
> 7) Fails to use the "#" to indicate checkmate (uses "+", "++", or no marker)

These two are definitely wrong.

> 8) Extra spaces added to make move columns line up prettily (ICC used to)

Legal in import format.

> 9) Uses lower case "o" or zeros instead of upper case "O" in "O-O" and "O-O-O"
>10) Ending token ( such as 1-0) is omitted, or conflicts with Result tag.
>11) Use of "1/2" rather than "1/2-1/2" in Result tag or ending token.

These are really wrong.

>12) Omits the periods in the movetext

Legal in import format.

>13) Non-standard promotion indicators (such as b8Q or B8(Q) vs. b8=Q )
>14) Date tag in non-standard format ( 10/31/2000 or 10.31.2000 vs 2000.10.31)
>15) "ep" or "e.p." added after en passant capture
>16) Uses coordinate notation (e2e4 or e2-e4) rather than SAN
>17) Uses long algebraic notation: like Ng1-f3, rather than SAN
>18) Inserts a blank in front of # ( "21. Qa8 #" vs. "21. Qa8#")

These are really wrong.

Example of legal *import* format PGN from xboard:

[Event "ICS rated standard match"]
[Site "204.123.3.20"]
[Date "1999.08.16"]
[Round "-"]
[White "DiepBlue"]
[Black "Zippy"]
[Result "0-1"]
[WhiteElo "2322"]
[BlackElo "2029"]
[TimeControl "900"]

1. Nf3 d5 2. g3 Nd7 3. d4 e6 4. Bg2 c5 5. O-O Ngf6 6. c4 dxc4 7. Na3 cxd4
8. Nxc4 Bc5 9. Nxd4 O-O 10. Nb3 Be7 11. Bf4 Nb6 12. Qxd8 Bxd8 13. Nd6 Nfd5
14. Be5 Nd7 15. Bd4 Be7 16. Nb5 a6 17. Bxd5 axb5 18. Bg2 e5 19. Bc3 Rd8 20.
a3 Ra4 21. Rfd1 Kf8 22. Rac1 e4 23. Rd5 b6 24. Bd4 Bb7 25. Rxb5 Ba6 26. Rh5
Nf6 27. Bxb6 Nxh5 28. Bxd8 Bxd8 29. Nc5 Rc4 30. Rxc4 Bxc4 31. e3 f5 32. g4
fxg4 33. Bxe4 Nf6 34. Bg2 Ke7 35. b3 Bf7 36. b4 h5 37. a4 Nd5 38. Nd3 Bc7
39. Bxd5 Bxd5 40. Nc5 Kd6 41. Nd3 g5 42. Nc1 Bc4 43. Kg2 Kd5 44. a5 Bd6 45.
b5 Bxb5 46. Nb3 Bd3 47. Nd4 Bc7 48. Nb3 h4 49. Kh1 Bc4 50. Nd2 Be2 51. Nb3
h3 52. Nd4 Bd3 53. Nb3 Bc4 54. Nd4 Bxa5 55. Nf5 Ke5 56. Ng3 Bb4 57. Kg1 Be1
58. e4 Bd3 59. Nf5 Kxe4 60. Ne3 Kf3 61. Nxg4 Kxg4 62. Kh1 Kf3 63. Kg1 Bb5
64. Kh1 Bc6 65. Kg1 Bxf2+ 66. Kf1 Bb5#
{DiepBlue checkmated} 0-1






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.