{
  "id": "enwiki-001377132730",
  "slug": "portable-game-notation",
  "title": "Portable Game Notation",
  "qid": "",
  "lead": "Portable Game Notation (PGN) is a standard plain text format for recording chess games (both the moves and related data), which can be read by humans and is also supported by most chess software.",
  "body": "Portable Game Notation (PGN) is a standard plain text format for recording chess games (both the moves and related data), which can be read by humans and is also supported by most chess software. ==History== In 1993, Steven J. Edwards devised PGN, which was first popularized and specified via the Usenet newsgroup rec.games.chess. ==Usage== 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 using English initials for the pieces. The filename extension is .pgn . The PGN specification describes two related but distinct formats: the \"import\" format; and the \"export\" format. The PGN import format describes data that might have been prepared by hand, and features a flexible syntax. Although the format is therefore somewhat lax by design, a program that purports to be able to read PGN data must be able to handle the format variations. The PGN export format, by contrast, is quite strict, designed to describe data prepared under program control, similar to a pretty printed source program reformatted by a compiler. The export format representations generated by different programs, including on different computers, are expected to be exactly equivalent, byte for byte. PGN text begins with a set of \"tag pairs\" (a tag name and its value), followed by the \"movetext\" (chess moves with optional commentary). 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 Os, not zeroes, contrary to the FIDE standard for notation). Pawn promotions are notated by appending = to the destination square, followed by the piece the pawn is promoted to. For example: g8=Q . If the move is a checking move, + is also appended; if the move is a checkmating move, # is appended instead. For example: Rc6+ . An annotator who wishes to suggest alternative moves to those actually played in the game may insert variations enclosed in parentheses. They may also comment on the game by inserting Numeric 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. ==Numeric Annotation Glyphs (NAGs)== Numeric Annotation Glyphs or NAGs are used to annotate chess games when using a computer, typically providing an assessment of a chess move or a chess position. NAGs exist to indicate a simple annotation in a language independent manner. NAGs were first formally documented in 1994 by Steven J. Edwards in his \"Portable Game Notation Specification and Implementation Guide\". Within the PGN specification, 256 NAGs are proposed, of which the first 140 values have been defined; the remaining 116 values are reserved for future definition. A Numeric Annotation Glyph is composed of a dollar sign character (\"$\") immediately followed by one or more digit characters. Each NAG then has a specific meaning and often a standard typographical representation. The meanings first defined stemmed from the use of specific typographic symbols when annotators were commenting upon chess games; most especially in Chess Informant publications. The objective was to devise an alternative representation of these symbols which could be incorporated in the simple computer file format proposed as the PGN standard. This mechanism allowed often sophisticated typography to be expressed using the simple ASCII character set. Since its inception there has been no attempt to further formalise or standardise the meaning of the undefined 116 NAGs, although some PGN editors, such as ChessPad, have variously used these higher glyphs by assigning non-standard custom definitions. ==Bibliography==",
  "categories": [
    "105259553",
    "115984866",
    "1516619",
    "23118434",
    "23603337",
    "23617849",
    "24043274",
    "24745122",
    "26851624",
    "34260088",
    "89061558"
  ],
  "license": "CC BY-SA 4.0",
  "source_uri": "https://en.wikipedia.org/w/index.php?oldid=1377132730",
  "content_hash": "",
  "created_at": null,
  "updated_at": 1790551038.0,
  "claims": [],
  "contradictions": [],
  "confidence": 0.6,
  "csl": {
    "id": "enwiki-001377132730",
    "type": "webpage",
    "title": "Portable Game Notation",
    "author": [
      {
        "family": "Anticloud FZ LLE",
        "literal": "Anticloud FZ LLE"
      }
    ],
    "container-title": "encyclopegia.org",
    "publisher": "Anticloud FZ LLE",
    "publisher-place": "Dubai, United Arab Emirates",
    "URL": "https://encyclopegia.org/a/portable-game-notation",
    "issued": {
      "date-parts": [
        [
          2026,
          11,
          20
        ]
      ]
    },
    "accessed": {
      "date-parts": [
        [
          2026,
          11,
          20
        ]
      ]
    },
    "license": "CC BY-SA 4.0",
    "DOI": "eo1:enwiki-001377132730",
    "isBasedOn": "https://en.wikipedia.org/w/index.php?oldid=1377132730",
    "note": "Immutable snapshot enwiki-001377132730"
  }
}