FACTOID # 109: What is in a name? More than 90% of people in Bhutan, Burundi and Burkina Faso are involved in agriculture.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Portable Game Notation

Portable Game Notation (.PGN) is a computer-processable format for recording chess games (both the moves and related data); many chess programs recognize this extremely popular format due to its accessibility by ordinary ascii editors, including word processors capable of importing and exporting plain ascii. A computer is a device or machine for processing information according to a program — a compiled list of instructions. ... A CPU The exact term processor is a sub-system of a data processing system which processes received information after it has been encoded into data by the input sub-system. ... A chess table is a table with a chessboard painted or engraved on it. ... Data is the plural of datum. ...


PGN is structured "for easy reading and writing by human users and for easy parsing and generation by computer programs." The chess moves themselves are given in Algebraic chess notation. Its usual filename extension is ".pgn". Reading is the process of retrieving and comprehending some form of stored information or ideas. ... Writing may refer to two activities: the inscribing of characters on a medium, with the intention of forming words and other constructs that represent language or record information, and the creation of material to be conveyed through written language. ... Binomial name Homo sapiens Linnaeus, 1758 Subspecies Homo sapiens idaltu (extinct) Homo sapiens sapiens Human beings define themselves in biological, social, and spiritual terms. ... In computer science, parsing is the process of analyzing a continuous stream of input (read from a file or a keyboard, for example) in order to determine its grammatical structure with respect to a given formal grammar. ... Generation is the act of producing offspring, or procreation. ... // A computer program or software program (usually abbreviated to a program) is a step-by-step list of instructions written for a particular computer architecture in a particular computer programming language. ... Algebraic chess notation is the method used today by all competition chess organizations and most books, magazines, and newspapers to record and describe the play of chess games. ...


There are two formats in the PGN specification, the "import" format and the "export" format. The import format describes data that may have been prepared by hand, and is intentionally lax; a program that can read PGN data should be able to handle the somewhat lax import format. The export format is rather strict and describes data prepared under program control, something like a pretty printed source program reformatted by a compiler. The export format representations generated by different programs on the same computer should be exactly equivalent, byte for byte.


PGN code begins with a set of "tag pairs" (a tag name and its value), followed by the "movetext" (chess moves with optional commentary). Source code (commonly just source or code) is any series of statements written in some human-readable computer programming language. ...

Contents


Tag Pairs

Tag pairs begin with an initial left bracket "[", followed by the name of the tag in Plain Vanilla ASCII - the tag value being enclosed in double-quotes - and then terminate with a closing right bracket "]". There are apparently no special control codes involving escape characters, or carriage returns and linefeeds to separate the fields, and a superfluity of embedded spaces (or SPC characters) is usually skipped when parsing.


PGN data for archival storage is required to provide seven bracketed fields, referred to as "tags" and together known as the STR (Seven Tag Roster). In export format, the STR tag pairs must appear before any other tag pairs that may appear, and in this order:

  1. Event: the name of the tournament or match event.
  2. Site: the location of the event. This is in "City, Region COUNTRY" format, where COUNTRY is the 3-letter International Olympic Committee code for the country. An example is "New York City, NY USA".
  3. Date: the starting date of the game, in YYYY.MM.DD form. "??" are used for unknown values.
  4. Round: the playing round ordinal of the game.
  5. White: the player of the white pieces, in "last name, first name" format.
  6. Black: the player of the black pieces, same format as White.
  7. Result: the result of the game. This can only have four possible values: "1-0" (White won), "0-1" (Black won), "1/2-1/2" (Draw), or "*" (other, e.g., the game is ongoing).

The standard allows for supplementation in the form of other, optional, tag pairs. The more common tag pairs include: The International Olympic Committee is an organisation based in Lausanne, Switzerland, created by Pierre de Coubertin in 1894 to reinstate the Ancient Olympic Games held in Greece, and organise this sports event every four years. ... The International Olympic Committee (IOC) allocates three-letter country codes to all National Olympic Committees and other groups competing in the Olympic Games. ... Midtown Manhattan, looking north from the Empire State Building, 2005 New York City (officially named the City of New York) is the most populous city in the United States, the most densely populated major city in North America, and is at the center of international finance, politics, entertainment, and culture. ...

  • Time: Time the game started, in "HH:MM:SS" format, in local clock time.
  • Termination: Gives more details about the termination of the game. It may be "abandoned", "adjudication" (result determined by third-party adjudication), "death", "emergency", "normal", "rules infraction", "time forfeit", or "unterminated".
  • FEN: The initial position of the chess board, in Forsyth-Edwards Notation. This is used to record partial games (starting at some initial position). It is also necessary for chess variants such as Fischer Random Chess, where the initial position is not always the same as traditional chess. If a FEN tag is used, a separate tag pair "SetUp" must also appear and be have its value set to "1".

Forsyth-Edwards Notation (FEN) is a standard notation for describing a particular board position of a Chess game. ... One of 960 possible starting positions (#177). ...

Movetext

The movetext describes the actual moves of the game. This includes move number indicators (numbers followed by either one or three periods; one if preceding a move by White, three if preceding a move by Black) and movetext Standard Algebraic Notation (SAN).


For most moves the SAN consists of the letter abbreviation for the piece, an "x" if there is a capture, and the 2-character algebraic name of the final square the piece moved to. The letter abbreviations are K (King), Q (Queen), R (Rook), B (Bishop), and N (Knight). The pawn is given an empty abbreviation in SAN movetext, but in other contexts the abbreviation "P" is used. The algebraic name of any square is as per usual Algebraic chess notation; from white's perspective, the leftmost square closest to white is a1, while the rightmost square closest to black is h8. The king (♔♚) is the most important piece in the game of chess. ... The queen is the most powerful piece in the game of chess. ... A rook (borrowed from Persian رخ rokh) is a piece in the strategy board game of chess. ... OKABold text OKA IS SO SMART OKA IS SO SMART OKA IS SO SMART OKA IS SO SMART OKA IS SO SMART OKA IS SO SMART OKA IS SO SMART OKA IS SO SMART OKA IS SO SMART OKA IS SO SMART OKA IS SO SMART OKA IS SO... The knight (Old English: cniht = boy, lad or servant) (or, colloquially, horse) is a piece in the game of chess, representing a knight (armoured soldier) and often depicted as a horses head. ... Algebraic chess notation is the method used today by all competition chess organizations and most books, magazines, and newspapers to record and describe the play of chess games. ...


In a few cases a more detailed representation is needed to resolve ambiguity; if so, the piece's file letter, numerical rank, or the exact square is inserted after the moving piece's name (in that order of preference). Thus, "Nge2" specifies that the knight originally on the g-file moves to e2.


SAN kingside castling is indicated by the sequence "O-O"; queenside castling is indicated by the sequence "O-O-O" (note that these are capital letter O's, not numeral 0's). Pawn promotions are notated by appending an "=" followed by the piece the pawn is promoted to. If the move is a checking move, the plus sign "+" is appended; if the move is a checkmating move, the octothorpe sign "#" is appended instead.


An annotator who wishes to suggest alternative moves to those actually played in the game may insert variations enclosed in parentheses. He may also comment on the game by inserting Numerical Annotation Glyphs (NAGs) into the movetext. Each NAG reflects a subjective impression of the move preceding the NAG or of the resultant position.


If the game result is anything other than "*", the result is repeated at the end of the movetext.


Comments

Comments may be added by either a ";" (a comment that continues to the end of the line) or a "{" (which continues until a matching "}"). Comments do not nest.


Example

Here is a sample game in PGN format:

 [Event "F/S Return Match"] [Site "Belgrade, Serbia JUG"] [Date "1992.11.04"] [Round "29"] [White "Fischer, Robert J."] [Black "Spassky, Boris V."] [Result "1/2-1/2"] 1.e4 e5 2.Nf3 Nc6 3.Bb5 {This opening is called Ruy Lopez.} a6 4.Ba4 Nf6 5.O-O Be7 6.Re1 b5 7.Bb3 d6 8.c3 O-O 9. h3 Nb8 10.d4 Nbd7 11.c4 c6 12.cxb5 axb5 13.Nc3 Bb7 14.Bg5 b4 15.Nb1 h6 16.Bh4 c5 17.dxe5 Nxe4 18.Bxe7 Qxe7 19.exd6 Qf6 20.Nbd2 Nxd6 21.Nc4 Nxc4 22.Bxc4 Nb6 23.Ne5 Rae8 24.Bxf7+ Rxf7 25.Nxf7 Rxe1+ 26.Qxe1 Kxf7 27.Qe3 Qg5 28.Qxg5 hxg5 29.b3 Ke6 30.a3 Kd6 31.axb4 cxb4 32.Ra5 Nd5 33. f3 Bc8 34.Kf2 Bf5 35.Ra7 g6 36.Ra6+ Kc5 37.Ke1 Nf4 38.g3 Nxh3 39.Kd2 Kb5 40.Rd6 Kc5 41.Ra6 Nf2 42.g4 Bd3 43.Re6 1/2-1/2 

Belgrade (Serbian, Београд, Beograd   listen?), is the capital of Serbia since 1404, Serbia and Montenegro (2003–Present) and Yugoslavia (1918–2003). ... Serbia and Montenegro  â€“ Serbia    â€“ Kosovo and Metohia        (UN administration)    â€“ Vojvodina  â€“ Montenegro Official language Serbian1 Capital Belgrade Area  â€“ Total  â€“ % water  88,361 km²  n/a Population  â€“ Total (2002)     (without Kosovo)  â€“ Density  7. ... Yugoslavia (Jugoslavija in all south Slavic languages, in Cyrillic Југославија) is a term used for three separate but successive political entities that existed during most of the 20th century on the Balkan Peninsula in Europe. ... 1992 was a leap year starting on Wednesday. ... November 4 is the 308th day of the year (309th in leap years) in the Gregorian Calendar, with 57 days remaining. ... Bobby Fischer. ... Boris Spassky Boris Vasilievich Spassky (Бори́с Васильевич Спасский) (born January 30, 1937) is a Russian (former Soviet) chess player and former world champion. ... The first moves of a chess game are the opening moves, collectively referred to as the opening. ... The Ruy Lopez, sometimes known as the Spanish Game, is a chess opening characterised by the moves 1. ...

Handling Chess Variants

Many chess variants can be recorded using PGN, provided the names of the pieces can be limited to one character, usually a letter and not a number. They are typically noted with a tag named "Variant" giving the name of the rules. Be careful not to use the term "Variation", as that means the name of an opening variation instead. Note that traditional chess programs can only handle, at most, a few variants. A chess variant is any game derived from, related to or similar to chess in at least one respect. ...


References

See also


  Results from FactBites:
 
Portable Game Notation - Wikipedia, the free encyclopedia (1134 words)
Portable Game Notation (.PGN) is a computer-processable format for recording chess games (both the moves and related data); many chess programs recognize this extremely popular format due to its accessibility by ordinary ascii editors, including word processors capable of importing and exporting plain ascii.
PGN is structured "for easy reading and writing by human users and for easy parsing and generation by computer programs." The chess moves themselves are given in Algebraic chess notation.
PGN code begins with a set of "tag pairs" (a tag name and its value), followed by the "movetext" (chess moves with optional commentary).
ICC Help: PGN-spec (16238 words)
PGN is structured for easy reading and writing by human users and for easy parsing and generation by computer programs.
Instead, PGN is proposed as a universal portable representation for data interchange.
PGN data are organized as simple text lines without any special bytes or markers for secondary record structure imposed by specific operating systems.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.