Kriegspiel PGN Notation v0.9


I. Introduction
II. Filtering
III. Kriegspiel PGN
   A. Header (tag pairs)
   B. Movetext
      1. SAN in Kriegspiel
      2. Unfiltered Moves
      3. Filtered Moves
IV. Kriegspiel PGN Examples
   1. Unfiltered
   2. Filtered
V. Miscellaneous / RFC

I. Introduction:

    Portable Game Notation (PGN) is the format most commonly used for recording chess games.  However, as defined in the PGN Specification (summarized at Wikipedia), PGN notation is not fully equipped to handle Kriegspiel games.  Thus, in collaboration with UMD, we have set out to define a standard Kriegspiel PGN format that is simple, human- and computer-readable, and deviates as little as possible from the ordinary PGN format.  This document describes this standard; it assumes a familiarity with ordinary PGN notation.  It is a work in progress; comments and suggestions are encouraged, please email them to jawolfe at 

II. Filtering:

    This document will describe two different types of Kriegspiel PGN files: filtered and unfiltered.  This section describes the difference between these types, and their uses.
    From the referee's omniscient (unfiltered) perspective, a Kriegspiel game looks like a chess game (plus illegal move attempts).  Because of this fact, an unfiltered Kriegspiel move history can be completely encoded as an ordinary chess PGN file, with illegal move attempts and referee announcements appended in comments (the referee's announcements are only needed for human readability). 
    However, when playing a Kriegspiel game or solving a Kriegspiel problem, one generally only possesses a subset of the information in the unfiltered move history.  To describe a player's game state in Kriegspiel, a move history must be filtered to retain only the information available to the player; this can be done by simply masking the identity of the opponent's moves.  Thus, a filtered Kriegspiel PGN is essentially just an unfiltered Kriegspiel PGN with one player's moves replaced by "??" placeholders.

III. Kriegspiel PGN:

    This section assumes a familiarity with Standard Algebraic Notation (SAN) and the PGN format. Like an ordinary PGN file, a Kriegspiel PGN file contains two sections, the "tag pair" section, and the "movetext" section. 

    A. Header (tag pairs):

    Like ordinary chess PGN, the header consists of a series of  '[key "value"]' pairs, one per line, the first seven of which describe (in order) the tags (event,site,date,round,white,black,result).  As the eighth tag pair, every Kriegspiel PGN should include the line '[Rules "Kriegspiel (<variant>)"]'.  We will call the specification of rules on our site the "Berkeley" variant.  Following this, the ninth tag-pair indicates whether the PGN is filtered, and if so, from which player's perspective.  It takes the form '[Filtered "<value>"]', where <value> is 'white', 'black', or 'no' (if value is 'no', this tag-pair can be omitted).  After the ninth tag pair, optional tag-pairs can appended to provide more information about the file.  The Problem Database page provides more details on these optional tag-pairs.

    B. Movetext:

    The movetext describes the move history of the game.  Chess PGN calls for moves in SAN (Standard Algebraic Notation), followed by optional comments enclosed in a {} block.  Kriegspiel PGN also uses SAN for both legal and illegal moves, with some caveats described in the next section. 

        1. SAN in Kriegspiel:

    SAN (Standard Algebraic Notation) is a standard for representing chess moves in a concise, human-readable format.  If you are not familiar with SAN, please read the Wikipedia article before continuing with this section.
    In SAN, a move (e.g., a knight move from d2 to e4) can have multiple representations depending upon the board configuration (e.g., Ne4, Nde4, Ndxe4+, N2e4+, etc.).  SAN specifies a set of disambiguation rules to choose between these multiple representations.  These same rules will be used to produce Kriegspiel SAN.  However, since a Kriegspiel board position may have more available moves than an identical chess board position, the same exact move can have a different Kriegspiel SAN name than its chess SAN name.  For example, if a player has two rooks that could attack a square, and one of these attacks is blocked by one of her opponent's pieces, Kriegspiel SAN will disambiguate the legal attack, whereas SAN will not.  Since capture and check annotations are not used for disambiguation in SAN, illegal moves are the only cause for a Kriegspiel SAN representation to differ from an ordinary chess SAN representation.  Thus, the Kriegspiel SAN representation of a move will always be at least as specific as the ordinary chess SAN representation.
    Illegal moves are represented the same way as legal moves; since an illegal move is potentially legal for the player, it already has a Kriegspiel SAN representation.  Check and capture annotations are omitted from the SAN representation of illegal moves, with one exception, since the moving player generally does not know if the move would have caused check or capture if it had succeeded.  The exception is for pawn captures, which are intrinsically capture moves, and are always represented as such.    

        2. Unfiltered Moves:

    Unfiltered moves are represented in Kriegspiel PGN as follows:

    "<legal-move> {(<response-info>:<illegal-moves>) <comments>}"     For example,
    "5. Qxe7+ {(Xe7,CF:dxe3,dxc3)}" represents a turn in which White attempted pawn captures dxc3 and dxe3 (in this order), which were illegal, and then made the legal move Qxe7+, which was a capture at square e7 and caused file check.

        3. Filtered Moves:

     The representation for filtered moves in Kriegspiel PGN is almost identical to the representation of unfiltered moves:

    "?? {(<response-info>:<num-illegal-moves>) <comments>}"

    This representation can be computed from a filtered representation by simply replacing <legal-move> with "??", and <illegal-moves> with its cardinality.  For example, the above example becomes (from Black's perspective),
    "?? {(Xe7,CF:2)}", which represents a turn where the opponent had two illegal move attempts, then made a legal move which captured Black's piece at e7 and checked Black's king along a file.

IV. Kriegspiel PGN Examples:

    This section presents a short Kriegspiel game (adapted from Bolognesi and Ciancarini's "Searching over Metapositions in Kriegspiel"), in which White checkmates Black in 5 moves.  First, this game is presented in its entirety as an unfiltered PGN, which describes all there is to know about the game.  Then, a filtered prefix of the game is presented from White's perspective before his last move.  This filtered prefix represents a simple checkmating problem: given this specification of White's game state, is it possible for White to mate with certainty on his next move? (the answer is yes).  For more examples of filtered PGN (and checkmating problems), check out the Problem Database.

    A. Unfiltered:

    [Event "Skirmish"]
    [Site "UC Berkeley"]
    [Date "2004.11.02"]
    [Round "1"]
    [White "Player1"]
    [Black "Player2"]
    [Result "1-0"]
    [Variant "Kriegspiel (Berkeley)"]
    [Filtered "no"]

    1. e4 {(:)}
        f6 {(:)}
    2. e5 {(:)}  
        fxe5 {(Xe5:e7)}
    3. Qh5+ {(CS:)}
        g6 {(:)}
    4. Be2 {(:Qf7)}
        gxh5 {(Xh5:exf4,h5)}
    5. Bxh5# {(Xh5,CS:)}

    B. Filtered:

    [Event "Skirmish"]
    [Site "UC Berkeley"]
    [Date "2004.11.02"]
    [Round "1"]
    [White "Player1"]
    [Black "Player2"]
    [Result "*"]
    [Variant "Kriegspiel (Berkeley)"]
    [Filtered "white"]
    [depth "1"]
    [forced "T"]
    [epsilon "T"]

    1. e4 {(:)}
        ?? {(:0)}
    2. e5 {(:)}  
        ?? {(Xe5:1)}
    3. Qh5+ {(CS:)}
        ?? {(:0)}
    4. Be2 {(:Qf7)}
        ?? {(Xh5:2)}

    (for an explanation of the additional tag-pairs in this file, check out the Problem Database; these tag-pairs describe the checkmating instance, and are not required by the filtered Kriegspiel PGN spec)

V. Miscellaneous / RFC:

    This document was produced as a first attempt to standardize a representation of Kriegspiel move histories.  Comments, suggestions, and alternate proposals are welcome; please email them to jawolfe AT  While this version of the standard is specific to Berkeley rules, it is easily extensible; future versions of this standard may allow for other rule variants.