From collectibles to cars, buy and sell all kinds of items on eBay
home | pay | site map
Shop for itemsSell your itemTrack your eBay activitiesLearn, connect, and stay informed-for business and for funGet help, find answers and contact Customer SupportAdvanced Search
Home > Listing Index > Games > Portable Game Notation

Games - 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.

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".

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).

Tag Pairs

Tag pairs begin with an initial left 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:

# Event: the name of the tournament or match event. # 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". # Date: the starting date of the game, in YYYY.MM.DD form. "??" are used for unknown values. # Round: the playing round ordinal of the game. # White: the player of the white pieces, in "last name, first name" format. # Black: the player of the black pieces, same format as White. # 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:
  • 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".

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, the rightmost square closest to white is h1, and the rightmost square closest to black is h8.

[ Visit the complete Wikipedia entry for Portable Game Notation ]


Searches on eBay

Some related entries: Harvest Moon: Innocent Life | Atari Game Brain | Strange Company | Hogwarts Quidditch teams | Chao | Aperture | R-100 Series | List of vehicles in Battlefield 2 | Dark Champions | Hare and Tortoise | FM Towns

eBay Pulse | eBay Reviews | eBay Stores | Half.com | Kijiji | PayPal | Popular Searches | ProStores | Rent.com | Shopping.com
Australia | Austria | Belgium | China | France | Germany | India | Italy | Spain | United Kingdom

About eBay | Announcements | Security Center | Policies | Site Map | Help