Sashité for Developers
  1. Sashité for Developers
  2. Specifications
  3. PAN
  4. 1.0.0

Portable Action Notation (PAN) Specification


Overview

Portable Action Notation (PAN) is a rule-agnostic, compact string format for representing atomic actions in abstract strategy board games. PAN provides a canonical representation for identifying moves unambiguously through minimal notation that captures the essential transformation applied to a game position.

An action is an atomic operation that alters a position. PAN focuses on expressing the explicit transformations while allowing game rules to handle implicit consequences. The notation uses intuitive operators to express board transformations with minimal characters, making it ideal for move transmission, game recording, and user interfaces.


Terminology

For complete definitions of terms used in this document, see the Glossary.

Key concepts for this specification:


Dependencies

PAN builds upon two foundational Sashité specifications:


Action Philosophy

Core Principles

PAN operates on five fundamental principles:

  1. Atomic operations: Each action represents a single, indivisible transformation
  2. Move identification: Actions provide the minimum information needed to identify moves unambiguously
  3. Explicit vs implicit: Actions specify primary transformations; game rules handle secondary effects
  4. Turn change: Every action explicitly changes the active player
  5. Rule independence: Actions express intent, not legality or complete consequences

Scope Boundaries

PAN actions specify:

PAN actions do NOT specify:


Action Types

PAN supports nine distinct action types organized by their primary transformation:

Action Type Syntax Description
Pass ... Changes active player without board alteration
Movement <src>-<dst>[=<piece>] Moves piece to empty square
Capture Movement <src>+<dst>[=<piece>] Moves piece with capture at destination
Static Capture +<square> Captures piece without movement
Drop to Empty [<piece>]*<dst>[=<piece>] Places from reserve to empty square
Drop with Capture [<piece>].<dst>[=<piece>] Places from reserve, capturing at destination
In-Place Modification <square>=<piece> Modifies piece attributes without movement
King-side Castling 0-0 Chess king-side castling
Queen-side Castling 0-0-0 Chess queen-side castling

Format Specification

Grammar (BNF)

<pan> ::= <pass>
        | <movement>
        | <capture-movement>
        | <static-capture>
        | <drop-empty>
        | <drop-capture>
        | <modification>
        | <castling>

<pass> ::= "..."

<movement> ::= <square> "-" <square>
             | <square> "-" <square> "=" <epin>

<capture-movement> ::= <square> "+" <square>
                     | <square> "+" <square> "=" <epin>

<static-capture> ::= "+" <square>

<drop-empty> ::= <epin> "*" <square>
               | "*" <square>
               | <epin> "*" <square> "=" <epin>
               | "*" <square> "=" <epin>

<drop-capture> ::= <epin> "." <square>
                 | "." <square>
                 | <epin> "." <square> "=" <epin>
                 | "." <square> "=" <epin>

<modification> ::= <square> "=" <epin>

<castling> ::= "0-0"
             | "0-0-0"

<square> ::= <cell>           ; Per CELL specification
<epin> ::= <extended-piece>   ; Per EPIN specification

Operators

Operator Name Function
- Dash Movement to empty square
+ Plus Movement with capture (including en passant)
* Asterisk Drop to empty square
. Period Drop with capture
= Equals Piece modification
0 Zero Castling notation component

Action Semantics

Pass Action

Syntax: ...

The pass action allows a player to voluntarily conclude their turn without altering the board state. This changes the active player to the opponent while maintaining all piece positions unchanged.

Movement to Empty Square

Syntax: <src>-<dst>[=<piece>]

Moves a piece from the source square to an empty destination square. The optional =<piece> suffix explicitly specifies the piece’s final state after movement, useful for promotions or transformations. Without this suffix, any transformations are determined by game rules (such as mandatory promotion zones).

Constraints: Source and destination must be different squares.

Movement with Capture

Syntax: <src>+<dst>[=<piece>]

Moves a piece from the source square to the destination square, capturing any piece present. This notation is also used for en passant captures in chess, where the destination square is empty but a capture occurs as an implicit effect.

For en passant, the + operator correctly indicates that a capture occurs during the move, even though the destination square itself is empty. The actual removal of the captured pawn (at a different square) is handled as an implicit effect by chess rules.

Constraints: Source and destination must be different squares.

Static Capture

Syntax: +<square>

Captures the piece at the specified square without any piece movement. This is used in games with custodian capture, area effects, or other non-movement capture mechanics. The captured piece moves to the active player’s reserve.

Drop to Empty Square

Syntax: [<piece>]*<dst>[=<piece>]

Places a piece from the active player’s reserve onto an empty board square. The piece can be explicitly specified or inferred from context. The optional transformation suffix allows for pieces that change state upon placement.

Drop with Capture

Syntax: [<piece>].<dst>[=<piece>]

Places a piece from the active player’s reserve onto an occupied square, capturing the existing piece. This rare action type combines placement with capture in a single atomic operation.

In-Place Modification

Syntax: <square>=<piece>

Transforms the piece at the specified square without changing its location. Used for promotions without movement, state changes, or style conversions. The piece must change to a different state than its current one.

Castling

Syntax: 0-0 (king-side) or 0-0-0 (queen-side)

Special notation for chess castling moves, providing a canonical representation independent of the actual king and rook positions. These actions are universal across all chess positions:

The implicit effects (specific king and rook movements) are determined by the chess variant being played and the current player. This notation elegantly handles castling for both players without needing position-specific notation.


Implicit Consequences

Actions trigger explicit effects (specified in notation) and implicit effects (determined by game rules). The distinction ensures PAN remains rule-agnostic while providing complete move identification.

Chess Examples

Castling: 0-0

En Passant: e5+f6

Pawn Promotion: e7-e8=Q

Shōgi Examples

Mandatory Promotion: g8-g9

Capture with Ownership Change: b2+b8


Design Properties

PAN embodies several key design properties that ensure its effectiveness as a universal action notation:

The notation achieves a balance between brevity and clarity, making it suitable for both human use and machine processing. The addition of specialized notations for common complex moves (like castling) demonstrates PAN’s pragmatic approach to real-world usage.


Examples

See PAN Examples for comprehensive implementation guidance covering all action types and game scenarios.


Reference Implementations

Ruby