The ChessAIThon project (2025-1-ES01-KA220-VET-000354329) is co-funded by the European Union. The views and opinions expressed in this publication are those of the author(s) only and do not necessarily reflect those of the European Union or the Spanish Service for the Internationalisation of Education (SEPIE). Neither the European Union nor the National Agency SEPIE can be held responsible for them.
Table of Contents
PGN: The Digital Transcript and History
The Portable Game Notation (PGN) is the digital transcript of an entire game. It’s structured with Tag Pairs (metadata like event and date) and the sequential Movetext. PGN provides context and history, while FEN only provides the present. You can easily extract a FEN from any point in a PGN, but not vice versa, highlighting the difference between state and history.
Moves: SAN vs. UCI Trade-Off
The move notations illustrate the trade-off between human readability and machine efficiency. Standard Algebraic Notation (SAN), used in PGN, is concise and human-readable (e.g., Nf3, O-O), requiring a human or a program to resolve its context. In contrast, Universal Chess Interface (UCI) is a verbose, machine-to-machine coordinate pair (e.g., g1f3, e1g1). UCI is a four-character, direct instruction, simplifying rapid machine processing by abstracting the need to interpret context. This contrast powerfully teaches the concept of abstraction—making things simpler for humans versus making them faster for computers.
Show students that SAN requires the computer to calculate context (What piece moved? Was it a capture? Is there ambiguity?) while UCI is purely a simple four-character instruction that tells the computer exactly which square to lift the piece from and which to place it on. This highlights the concept of abstracting complexity for human users versus using direct coordinates for rapid machine processing.
This video provides a guide to the FEN and PGN formats in chess, which is helpful for visualizing how these concepts apply in a practical context: