Talk:Portable Game Notation

Latest comment: 8 months ago by MaxBrowne2 in topic Official spec in GitHub repo

Comments edit

With respect to the person with IP Address: 213.78.76.88

"Why the XML evangalism in a PGN context"

It is very sad that people like this fail to see the truth of the matter or are even not bothered to find out what XML is before deleting a very valid point that PGN is an increasingly backward ,primitive, and non-extensible tagging of a chess game. There are already various XML implementations for chess if the person had been at all bothered to find out or investigate this area.

Cax XML :- http://www.chesscity.com/RESOURCES/chess_tech.htm Checkmate XML: http://www.xml.com/pub/a/2004/08/25/tourist.html Simple XML for chess: http://chess.arska.org/sxc/ XML Definitions for chess: http://palamede.editthispage.com/stories/storyReader$47 Chess viewer making use of XML: http://www.renderx.com/chess.html PGN XML viewer: http://www.cybercom.net/~zbrad/Chess/pgnxml/ Chess and XML: http://geekswithblogs.net/ansari/archive/2004/08/28/10328.aspx

This is an article on PGN, not XML. --Malathion 13:40, 21 Jun 2005 (UTC)

And that's not to say there may be advantages to XML; actually, the only practical one I can come up with is that it's inherently extensible while PGN isn't. But XML is, all too often, the hammer looking for yet another nail to bend all out of shape.

PGN is trivial to parse, generate and manipulate, easily human-readable and human-writable, and has served its specific purpose very well for many years. XML is none of these things, and simply recreating the equivalent of PGN with XML does nothing except add unnecessary complexity. Might as well add an ASN.1 wrapper.

PGN is far from being trivial to parse - SAN requires the implementation of a full-blown chess engine. Look at the rules, it's actually very difficult to implement from scratch.

To quote from one of the articles listed above:

The numbered items, on the other hand, verge on the inscrutable.

Anyone who has ever studied chess should giggle gleefully at this! The author is, of course, referring to the notation format used to describe chess games for at least the last 100 years. (We've switched from descriptive to algebraic notation during that time, but the basic format has remained the same.)

In short: if it ain't broke, don't fix it. PGN isn't perfect, but it does its job very well for at least 99% of what it's used for. And if you are going to fix it, make sure you understand the problem first! Anyone who writes nonsense like the above quote is purposefully ignoring a lot of history in the name of "progress".--12.103.251.203 15:41, 20 September 2005 (UTC)Reply

Example edit

The example shown should include all the different types of things in a PGN that are possible: Queen-side castling, promotions, two knights able to move to the same spot, annotations, etc. I understand that it should be a notable game (such as that of Fischer and Spassky), but we should find another one, so that people can actually see how it all fits together. 70.111.219.18 12:39, 23 March 2006 (UTC)Reply

PGN relies on Standard Algebraic Notation (SAN) for all that. Thus, it may be enough to refer to https://en.wikipedia.org/wiki/Algebraic_notation_(chess) which covers that subject. Athulin (talk) 15:22, 23 April 2020 (UTC)Reply

Please add clarification on stalemate edit

I found just like the example that stalemates are noted by adding the 1/2-1/2 notation at the game end, but it would be helpful to note there is no notation for stalemate in the text. Ryan

Actually, that's how draws are indicated, not stalemates specifically. All stalemates are draws, but not all draws are stalemates.—Chowbok 23:05, 22 November 2016 (UTC)Reply

MIME type edit

What would the MIME type of the PGN file be? application/x-pgn or something like this? —msikma (user, talk) 16:15, 23 February 2008 (UTC)Reply

After doing some searching, I found out it's application/x-chess-pgn. —msikma (user, talk) 16:16, 23 February 2008 (UTC)Reply

It is now officially application/vnd.chess-pgn.—Chowbok 00:37, 2 July 2016 (UTC)Reply

This article contains no context edit

This article needs some context : something about the history of PGN, as well as its advantages + disadvantages. All the article is at the moment is an instruction manual, but see the guideline Wikipedia is not a manual, guidebook or textbook. Peter Ballard (talk) 03:11, 10 November 2008 (UTC)Reply

An in-depth description of something is NOT an "instruction manual". Some history would be nice, but not because of your supposition, which is incorrect. —Preceding unsigned comment added by 71.197.124.181 (talk) 09:23, 29 May 2009 (UTC)Reply

I agree that it is not a manual. Bubba73 (talk), 15:10, 29 May 2009 (UTC)Reply

Chesbase PNG Formats edit

The EF BB BF prolog is actually the Byte order mark, indicating unicode encoding (presumably utf-8, since the rest of the file still looks like regular ascii). — Preceding unsigned comment added by 83.76.190.72 (talk) 14:19, 12 September 2016 (UTC)Reply

I added that to the article but that section looks like original research. Is there prescribed encoding for PGN files? --78.128.195.46 (talk) 23:57, 16 October 2016 (UTC)Reply

The PGN Standard document (though I don't know if the copy I have found is authoritative) says that PGN files must be in a subset of the ISO 8859-1 encoding. (That is presumably intended to be ISO 8859-1 for graphic characters, and presumably the control characters of ANSI/ISO 646/..., as 8859-1 does not specify control characters at all. PGN also requires support for \n, at the very least. Athulin (talk) 15:18, 23 April 2020 (UTC)Reply
Added: Best source for PGN standard right now seems to be http://tim-mann.org/Standard . See http://www.anders.thulin.name/posts/pgn/ for the reason why. Athulin (talk) 20:51, 27 December 2021 (UTC)Reply

List of programs edit

It's so universal and ubiquitous now, it would probably be easier to make a list of chess software that can't process PGN. MaxBrowne2 (talk) 05:41, 19 May 2021 (UTC)Reply

Official spec in GitHub repo edit

Is the github repo "official" or widely adopted in any capacity, or just an off-hand fork? It is created by Ferdinand Mosca, but if the 13 Github stars are anything to go by, it isn't widely adopted. Wqwt (talk) 22:33, 28 July 2022 (UTC)Reply

I'm not sure if @MaxBrowne2 saw this but this edit got rid of mention of the github repo https://en.wikipedia.org/w/index.php?title=Portable_Game_Notation&diff=prev&oldid=1101954154
I will say TalkChess forum is pretty widely known in the chess programming community. Wqwt (talk) 05:03, 16 July 2023 (UTC)Reply
"Official" is officially a deprecated word (MOS:WTW). There is no single authority on PGN spec, it was developed on the internet (usenet in the 1990s to be precise) and grew on the internet. Just about all chess software understands it though, even if it is not written strictly within the original PGN protocols like O-O rather than 0-0. MaxBrowne2 (talk) 05:28, 16 July 2023 (UTC)Reply