Portable game notation

from Wikipedia, the free encyclopedia
Coordinate system of a chess board as the basis of the algebraic notation and thus also the portable game notation

Portable Game Notation ( PGN ) is a text-readable data format for storing chess games . It was developed in 1994 by Stephen J. Edwards to enable and simplify the exchange of chess data between different chess programs (for example via the Internet ).

The PGN format uses characters from the ISO 8859-1 character set (includes ASCII characters and many special characters from Western European languages) and consists of two parts: the metadata and the trains. In the first part, the metadata, information such as tournament, location, date, round, player name, result and other information is recorded in standardized fields. The notation of the moves is mostly done in the Standard Algebraic Notation (SAN): This is the common abbreviated algebraic notation , whereby the letters of the English figure names (K for King, Q for Queen, R for Rook (rook), B for bishop (runner) and N for knight (jumper)). Comments are {}enclosed in curly brackets .

Deviating from the standard notation, castling is not noted with 0–0 or 0–0–0 (digit zero ), but with OO or OOO ( capital letter O ).

The format is not proprietary , so it can be read by almost all chess programs . Often it is also possible to export a game in PGN format. You can also save several games in a single PGN file.

PGN data can be searched using the Chess Query Language (CQL). Many common chess programs are capable of at least searching for the metadata stored for games such as player names and positions or position excerpts in PGN files.

Example game in PGN

[Event "IBM Kasparov vs. Deep Blue Rematch"]
[Site "New York, NY USA"]
[Date "1997.05.11"]
[Round "6"]
[White "Deep Blue"]
[Black "Kasparov, Garry"]
[Opening "Caro-Kann: 4...Nd7"]
[ECO "B17"]
[Result "1-0"]
 
1.e4 c6 2.d4 d5 3.Nc3 dxe4 4.Nxe4 Nd7 5.Ng5 Ngf6 6.Bd3 e6 7.N1f3 h6
8.Nxe6 Qe7 9.O-O fxe6 10.Bg6+ Kd8 {Kasparov schüttelt kurz den Kopf}
11.Bf4 b5 12.a4 Bb7 13.Re1 Nd5 14.Bg3 Kc8 15.axb5 cxb5 16.Qd3 Bc6
17.Bf5 exf5 18.Rxe7 Bxe7 19.c4 1-0

See also

Web links