PGN Specification
This is here only for our internal use as we develop internet chess tools. You should really visit their homesite - there is a link at the foot of the page!
|
Documentation |
|
Portable Game Notation Specification and Implementation Guide
Revised: 1994.03.12
Authors: Interested readers of the Internet newsgroup rec.games.chess
Coordinator: Steven J. Edwards (send comments to sje@world.std.com)
This is a online version of the "Portable Game Notation Specification and Implementation Guide".
In my opinion, the sections 13 (PGN software), 19 (Canonical chess position hash coding), 20 (Binary representation), and 21 (E-mail correspondence usage) are obsolete and should be deleted: PGN reading/writing is a must for all chess software nowadays. I never saw a software, using a binary PGN representation. And I am not sure, whether there is a need for a canonical chess position hash coding, or for a special PGN E-mail correspondence usage.
PGN Standard: Long Index
0: Preface 1: Introduction 2: Chess data representation 2.1: Data interchange incompatibility 2.2: Specification goals 2.3: A sample PGN game 3: Formats: import and export 3.1: Import format allows for manually prepared data 3.2: Export format used for program generated output 3.2.1: Byte equivalence 3.2.2: Archival storage and the newline character 3.2.3: Speed of processing 3.2.4: Reduced export format 4: Lexicographical issues 4.1: Character codes 4.2: Tab characters 4.3: Line lengths 5: Commentary 6: Escape mechanism 7: Tokens 8: Parsing games 8.1: Tag pair section 8.1.1: Seven Tag Roster 8.1.1.1: The Event tag 8.1.1.2: The Site tag 8.1.1.3: The Date tag 8.1.1.4: The Round tag 8.1.1.5: The White tag 8.1.1.6: The Black tag 8.1.1.7: The Result tag 8.2: Movetext section 8.2.1: Movetext line justification 8.2.2: Movetext move number indications 8.2.2.1: Import format move number indications 8.2.2.2: Export format move number indications 8.2.3: Movetext SAN (Standard Algebraic Notation) 8.2.3.1: Square identification 8.2.3.2: Piece identification 8.2.3.3: Basic SAN move construction 8.2.3.4: Disambiguation 8.2.3.5: Check and checkmate indication characters 8.2.3.6: SAN move length 8.2.3.7: Import and export SAN 8.2.3.8: SAN move suffix annotations 8.2.4: Movetext NAG (Numeric Annotation Glyph) 8.2.5: Movetext RAV (Recursive Annotation Variation) 8.2.6: Game Termination Markers 9: Supplemental tag names 9.1: Player related information 9.1.1: Tags: WhiteTitle, BlackTitle 9.1.2: Tags: WhiteElo, BlackElo 9.1.3: Tags: WhiteUSCF, BlackUSCF 9.1.4: Tags: WhiteNA, BlackNA 9.1.5: Tags: WhiteType, BlackType 9.2: Event related information 9.2.1: Tag: EventDate 9.2.2: Tag: EventSponsor 9.2.3: Tag: Section 9.2.4: Tag: Stage 9.2.5: Tag: Board 9.3: Opening information (locale specific) 9.3.1: Tag: Opening 9.3.2: Tag: Variation 9.3.3: Tag: SubVariation 9.4: Opening information (third party vendors) 9.4.1: Tag: ECO 9.4.2: Tag: NIC 9.5: Time and date related information 9.5.1: Tag: Time 9.5.2: Tag: UTCTime 9.5.3: Tag:; UTCDate 9.6: Time control 9.6.1: Tag: TimeControl 9.7: Alternative starting positions 9.7.1: Tag: SetUp 9.7.2: Tag: FEN 9.8: Game conclusion 9.8.1: Tag: Termination 9.9: Miscellaneous 9.9.1: Tag: Annotator 9.9.2: Tag: Mode 9.9.3: Tag: PlyCount 10: Numeric Annotation Glyphs 11: File names and directories 11.1: File name suffix for PGN data 11.2: File name formation for PGN data for a specific player 11.3: File name formation for PGN data for a specific event 11.4: File name formation for PGN data for chronologically ordered games 11.5: Suggested directory tree organization 12: PGN collating sequence 13: PGN software 13.1: The SAN Kit 13.2: pgnRead 13.3: mail2pgn/GIICS 13.4: XBoard 13.5: cupgn 13.6: Zarkov 13.7: Chess Assistant 13.8: BOOKUP 13.9: HIARCS 13.10: Deja Vu 13.11: MV2PGN 13.12: The Hansen utilities (cb2pgn, nic2pgn, pgn2cb, pgn2nic) 13.13: Slappy the Database 13.14: CBASCII 13.15: ZZZZZZ 13.16: icsconv 13.17: CHESSOP (CHESSOPN/CHESSOPG) 13.18: CAT2PGN 13.19: pgn2opg 14: PGN data archives 15: International Olympic Committee country codes 16: Additional chess data standards 16.1: FEN 16.1.1: History 16.1.2: Uses for a position notation 16.1.3: Data fields 16.1.3.1: Piece placement data 16.1.3.2: Active color 16.1.3.3: Castling availability 16.1.3.4: En passant target square 16.1.3.5: Halfmove clock 16.1.3.6: Fullmove number 16.1.4: Examples 16.2: EPD 16.2.1: History 16.2.2: Uses for an extended position notation 16.2.3: Data fields 16.2.3.1: Piece placement data 16.2.3.2: Active color 16.2.3.3: Castling availability 16.2.3.4: En passant target square 16.2.4: Operations 16.2.4.1: General format 16.2.4.2: Opcode mnemonics 16.2.5: Opcode list 16.2.5.1: Opcode "acn": analysis count: nodes 16.2.5.2: Opcode "acs": analysis count: seconds 16.2.5.3: Opcode "am": avoid move(s) 16.2.5.4: Opcode "bm": best move(s) 16.2.5.5: Opcode "c0": comment (primary, also "c1" though "c9") 16.2.5.6: Opcode "ce": centipawn evaluation 16.2.5.7: Opcode "dm": direct mate fullmove count 16.2.5.8: Opcode "draw_accept": accept a draw offer 16.2.5.9: Opcode "draw_claim": claim a draw 16.2.5.10: Opcode "draw_offer": offer a draw 16.2.5.11: Opcode "draw_reject": reject a draw offer 16.2.5.12: Opcode "eco": _Encyclopedia of Chess Openings_ opening code 16.2.5.13: Opcode "fmvn": fullmove number 16.2.5.14: Opcode "hmvc": halfmove clock 16.2.5.15: Opcode "id": position identification 16.2.5.16: Opcode "nic": _New In Chess_ opening code 16.2.5.17: Opcode "noop": no operation 16.2.5.18: Opcode "pm": predicted move 16.2.5.19: Opcode "pv": predicted variation 16.2.5.20: Opcode "rc": repetition count 16.2.5.21: Opcode "resign": game resignation 16.2.5.22: Opcode "sm": supplied move 16.2.5.23: Opcode "tcgs": telecommunication: game selector 16.2.5.24: Opcode "tcri": telecommunication: receiver identification 16.2.5.25: Opcode "tcsi": telecommunication: sender identification 16.2.5.26: Opcode "v0": variation name (primary, also "v1" though "v9") 17: Alternative chesspiece identifier letters 18: Formal syntax 19: Canonical chess position hash coding 20: Binary representation (PGC) 20.1: Bytes, words, and doublewords 20.2: Move ordinals 20.3: String data 20.4: Marker codes 20.4.1: Marker 0x01: reduced export format single game 20.4.2: Marker 0x02: tag pair 20.4.3: Marker 0x03: short move sequence 20.4.4: Marker 0x04: long move sequence 20.4.5: Marker 0x05: general game data begin 20.4.6: Marker 0x06: general game data end 20.4.7: Marker 0x07: simple-nag 20.4.8: Marker 0x08: rav-begin 20.4.9: Marker 0x09: rav-end 20.4.10: Marker 0x0a: escape-string 21: E-mail correspondence usage
- PGN Standard Section 0 - 7
- PGN Standard Section 8
- PGN Standard Section 9
- PGN Standard Section 11 - 13
- PGN Standard Section 14 - 15
- PGN Standard Section 16
- PGN Standard Section 17 - 19
- PGN Standard Section 20 - 21
![]() |
© 2002 Roger Thormann | ![]() |






