Portable Action Notation (PAN) Specification
- Version: 1.0.0
- Author: Sashité
- Published: March 8, 2014
- License: MIT License
Overview
Portable Action Notation (PAN) is a compact, string-based format for representing executed moves in abstract strategy board games. PAN provides a human-readable and space-efficient notation for expressing move actions in a rule-agnostic manner using standardized location formats.
PAN focuses on representing the spatial aspects of moves: where pieces move from and to, and whether the move involves capture or placement. The notation is designed to be intuitive and compatible with multi-dimensional coordinate systems.
Important: PAN is intentionally minimal and rule-agnostic. It represents only the basic spatial transformation of a move, without encoding piece types, promotion choices, game state, or complex move mechanics.
Game Protocol Foundation
The fundamental game concepts used in this document are interpreted as described in the Sashité Game Protocol.
Dependencies
PAN builds upon two foundational Sashité specifications:
- CELL: Multi-dimensional coordinate encoding for board positions
- HAND: Reserve location notation using
"*"
for off-board areas
These specifications define the location formats that PAN uses for source and destination identification.
Properties
- PAN is rule-agnostic and does not encode piece types, legality, or game-specific conditions
- PAN provides compact representation suitable for move logs and transmission
- PAN supports four fundamental move types: movement, capture, placement, and capture-to-reserve
- PAN uses standardized location formats from CELL and HAND specifications
- PAN requires external context for complete move interpretation
Core Concepts
PAN represents moves as simple text strings that describe location transitions on coordinate-based boards. The notation distinguishes between four fundamental types of moves:
- Simple moves (
-
) - Moving from one location to another empty location - Captures (
x
) - Moving from one location to another occupied location - Placements (
*→
) - Placing from off-board (HAND) to a board location - Capture-to-reserve (
→*
) - Moving from a board location to off-board (HAND)
Critical limitation: PAN cannot distinguish between different outcomes of the same spatial move (e.g., different promotion choices, optional promotions, or piece state changes).
Location System
PAN uses the standardized location formats from its dependencies:
CELL Coordinates
- Board positions: Any valid CELL coordinate (e.g.,
e4
,a1
,h8A
,b2C
) - Multi-dimensional support: Native support for 3D and higher-dimensional boards
- Irregular boards: Automatic support for non-standard board shapes
HAND Locations
- Reserve/hand:
*
indicates off-board reserve or hand locations - Universal application: Works with any capture-and-drop or placement mechanics
Format Structure
Simple Move (Non-capture)
<source>-<destination>
Example: e2-e4
- Moves from
e2
toe4
- Implies source location is occupied
- Implies destination location is empty
Capture Move
<source>x<destination>
Example: e4xd5
- Moves from
e4
tod5
, capturing atd5
- Implies source location is occupied
- Implies destination location is occupied
Placement
*<destination>
Example: *e4
- Places at
e4
from off-board (hand, reserve, etc.) - Implies destination location is empty
Capture-to-Reserve
<source>*
Example: e4*
- Captures from
e4
to off-board (hand, reserve, etc.) - Implies source location is occupied
- Results in source location becoming empty and captured piece moving to reserve
Syntax Rules
Location Format
- CELL coordinates: Must conform to CELL specification
- HAND location: Must be
*
as defined by HAND specification - Multi-dimensional: Supports any valid CELL coordinate dimensionality
Move Operators
Operator | Symbol | Meaning | Location Constraints |
---|---|---|---|
Move | - |
Simple movement to empty location | CELL → CELL |
Capture | x |
Movement with capture | CELL → CELL |
Place | * (prefix) |
Placement from off-board | HAND → CELL |
Capture-to-reserve | * (suffix) |
Capture to off-board | CELL → HAND |
Validation Rules
- Location validity: All locations must conform to CELL or HAND specifications
- No spaces allowed within a move string
- Operator consistency: Exactly one operator per move
- Location compatibility: Source and destination must be different when both are CELL coordinates
- Operator-location alignment: Move operators must match their required location types
Formal Grammar (BNF)
<pan-move> ::= <simple-move> | <capture-move> | <placement> | <capture-to-reserve>
<simple-move> ::= <cell> "-" <cell>
<capture-move> ::= <cell> "x" <cell>
<placement> ::= <hand> <cell>
<capture-to-reserve> ::= <cell> <hand>
<cell> ::= <cell-coordinate> ; As defined in CELL specification
<hand> ::= "*" ; As defined in HAND specification
Additional Constraints
- For
<simple-move>
and<capture-move>
: source and destination coordinates must be different - All CELL coordinates must conform to CELL specification format and validation rules
- HAND location must be exactly
"*"
as specified in HAND specification
Regular Expression Pattern
\A(?:([a-z]+(?:[1-9]\d*[A-Z]+[a-z]+)*(?:[1-9]\d*(?:[A-Z]+)?)?[-x])([a-z]+(?:[1-9]\d*[A-Z]+[a-z]+)*(?:[1-9]\d*(?:[A-Z]+)?)?)|(\*)([a-z]+(?:[1-9]\d*[A-Z]+[a-z]+)*(?:[1-9]\d*(?:[A-Z]+)?)?)|([a-z]+(?:[1-9]\d*[A-Z]+[a-z]+)*(?:[1-9]\d*(?:[A-Z]+)?)?)(\*))\z
This pattern captures:
- Group 1-2: Simple moves and captures (CELL operator CELL)
- Group 3-4: Placements (HAND CELL)
- Group 5-6: Capture-to-reserve (CELL HAND)
Validation Constraints
- CELL coordinates must conform to CELL specification validation
- Source and destination CELL coordinates must be different when both present
- HAND location must be exactly
"*"
Advantages
- Standards-based: Built on established CELL and HAND specifications
- Multi-dimensional: Native support for 3D and higher-dimensional games
- Compact: Minimal character overhead for efficient storage and transmission
- Visual clarity: Operators clearly indicate move type at a glance
- Rule-agnostic: Works with any game using CELL/HAND location systems
- Extensible: Supports irregular board shapes and custom coordinate systems
- Reserve-aware: Native support for capture-and-drop mechanics through HAND integration
Limitations
Inherent Constraints
- Piece identity blindness: Does not encode which piece is moving
- Promotion choice ambiguity: Cannot distinguish between different promotion options
- Game context dependency: Requires external context for complete interpretation
- Compound move limitation: Cannot represent multi-step or simultaneous piece movements
- State transition opacity: No support for piece state changes or transformations
- Capture mechanics blindness: No information about captured piece handling details
- Conditional legality ignorance: No encoding of context-dependent move restrictions
- Turn sequence agnosticism: No player or turn sequence information
Design Trade-offs
These limitations are intentional design choices that prioritize:
- Simplicity: Easy to parse and generate
- Compactness: Minimal storage requirements
- Rule-agnosticism: Universal applicability across game systems
- Standards compliance: Leveraging established location specifications
Use Cases
Optimal Applications
- Move logs: Simple game records where context is available
- User interfaces: Command input for move entry systems
- Network protocols: Compact move transmission between clients
- Database storage: Space-efficient storage when coupled with position data
- Multi-dimensional games: Leveraging native CELL coordinate support
- Capture-and-drop games: Native HAND location support for reserve mechanics
Considerations
PAN is most effective when:
- Board context is available for move interpretation
- Piece identity can be inferred from position
- Compact representation is prioritized over self-contained information
- Multi-dimensional or irregular board support is needed
- Reserve/hand mechanics are present in the game system
Relationship to Other Notations
Notation | Purpose | Relationship to PAN | Complementarity |
---|---|---|---|
CELL | Multi-dimensional coordinate encoding | Core dependency: Provides board location format | Essential for board position identification |
HAND | Reserve location notation | Core dependency: Provides off-board location format | Essential for capture-and-drop mechanics |
PMN | Structured move data with piece identity | PAN is compact alternative | PMN provides what PAN lacks in detail |
FEEN | Board state representation | PAN moves transform FEEN positions | Essential for PAN context |
GGN | Move possibility rules | PAN represents executed moves matching GGN rules | GGN validates PAN moves |
Examples and Applications
For comprehensive examples covering all move types, multi-dimensional scenarios, capture mechanics, and implementation guidelines:
See: PAN Examples Documentation
Topics covered in examples:
- Basic move types with CELL coordinates
- Multi-dimensional board movements
- Capture-and-drop scenarios using HAND locations
- Integration with FEEN positions
- Implementation patterns and best practices
- Edge cases and validation examples
Reference Implementations
This section lists available libraries and tools that implement the PAN specification.
Ruby
- Pan.rb - Full implementation of PAN specification for Ruby, including parsing, validation, and integration with CELL and HAND specifications