Portable Action Notation (PAN) Specification
- Version: 1.0.0
- Author: Sashité
- Published: October 19, 2025
- License: MIT License
Overview
Portable Action Notation (PAN) is a human-readable string format for representing atomic actions in abstract strategy board games. PAN provides an intuitive operator-based syntax to describe how pieces move, capture, transform, and interact on game boards.
Key Features
- Operator-based syntax: Six intuitive operators (
-,+,~,*,.,=) for different action types - Compact notation: Minimal character usage while maintaining readability
- Game-agnostic: Works across chess, shōgi, xiangqi, and other abstract strategy games
- Effect-aware: Distinguishes between direct actions and those with implicit side effects
Quick Examples
e2-e4 # Move to empty square
d1+f3 # Capture at destination
e1~g1 # Castling (with side effects)
P*e5 # Drop piece from reserve
e7-e8=Q # Move with promotion
... # Pass turn
Terminology
For complete definitions of terms used in this document, see the Glossary.
Key terms:
- Action: An atomic transformation that changes the game state
- Operator: A symbol that defines the type of action
- Direct effect: Changes explicitly encoded in the notation
- Implicit effect: Additional changes triggered by game rules
Dependencies
PAN integrates two Sashité specifications:
Format Structure
Basic Syntax
A PAN string follows this general pattern:
[piece][operator][position][transformation]
Components vary by action type:
| Component | Description | Examples |
|---|---|---|
| Piece | EPIN identifier (optional) | P, +R, k' |
| Operator | Action type indicator | -, +, ~, *, ., = |
| Position | CELL coordinate(s) | e4, h8 |
| Transformation | Final piece state | =Q, =+S |
Operator Reference
| Operator | Name | Primary Use | Visual Mnemonic |
|---|---|---|---|
- |
Dash | Move to empty square | Path between points |
+ |
Plus | Capture at destination | Addition/taking |
~ |
Tilde | Special move with effects | Wave/complexity |
* |
Asterisk | Drop to empty square | Placement marker |
. |
Period | Drop with capture | Point of impact |
= |
Equals | Transform piece | State change |
Action Categories
1. Pass Action
Syntax: ...
The simplest action - voluntarily ending your turn without moving.
...
Effects:
- No board changes
- Active player switches
- Position remains valid (no repetition)
Common in: Go
2. Movement Actions
Actions that relocate a piece from one square to another.
Move to Empty Square (-)
Syntax: <source>-<destination>[=<piece>]
Standard piece movement to an unoccupied square.
e2-e4 # Simple move
e7-e8=Q # Move with promotion
Effects:
- Piece relocates from source to destination
- Optional transformation upon arrival
- Source square becomes empty
Capture at Destination (+)
Syntax: <source>+<destination>[=<piece>]
Movement that captures the piece at the destination.
d1+f3 # Queen captures at f3
b7+a8=R # Pawn captures and promotes
Effects:
- Moving piece takes destination square
- Captured piece goes to reserve/removed
- Optional transformation of moving piece
Special Movement (~)
Syntax: <source>~<destination>[=<piece>]
Movement that triggers implicit rule-based effects.
e1~g1 # Castling (rook moves implicitly)
e5~f6 # En passant (pawn at f5 captured implicitly)
Effects:
- Primary piece movement (explicit)
- Secondary effects per game rules (implicit)
- Game engine handles additional consequences
Design note: The ~ operator signals that this action has effects beyond simple movement. The exact effects depend on game rules and context.
3. Capture Actions
Actions that remove pieces without the capturer moving.
Static Capture (+)
Syntax: +<square>
Removes a piece without any movement.
+d4 # Remove piece at d4
Effects:
- Target piece removed from board
- No piece movement occurs
- Useful for custodian or ranged captures
4. Drop Actions
Actions that place pieces from reserves onto the board.
Drop to Empty Square (*)
Syntax: [<piece>]*<destination>[=<piece>]
Places a reserve piece on an empty square.
P*e5 # Drop pawn at e5
*d4 # Drop (piece type clear from context)
S*c3=+S # Drop silver with immediate promotion
Effects:
- Piece placed from reserve to board
- Reserve count decreases
- Optional transformation upon placement
Drop with Capture (.)
Syntax: [<piece>].<destination>[=<piece>]
Places a piece while capturing the occupant.
L.b4 # Drop lance, capturing at b4
Effects:
- Reserve piece takes occupied square
- Original occupant captured
- Less common pattern
5. In-Place Transformations
Actions that modify a piece without moving it.
Modification (=)
Syntax: <square>=<piece>
Changes a piece’s attributes at its current location.
e4=+P # Enhance piece at e4
c3=k' # Change style at c3
Effects:
- Piece attributes change
- No positional change
- Must produce observable difference
Grammar Specification
EBNF Grammar
pan = pass
| movement
| static-capture
| drop
| modification
pass = "..."
movement = move-quiet | move-capture | move-special
move-quiet = square "-" square [transformation]
move-capture = square "+" square [transformation]
move-special = square "~" square [transformation]
static-capture = "+" square
drop = drop-quiet | drop-capture
drop-quiet = [piece] "*" square [transformation]
drop-capture = [piece] "." square [transformation]
modification = square "=" piece
transformation = "=" piece
square = cell (* Per CELL specification *)
piece = epin (* Per EPIN specification *)
Validation Rules
Syntactic Validation
- Format compliance: Must match grammar specification
- Component validity:
- Coordinates must be valid CELL format
- Pieces must be valid EPIN format
- Operators must be recognized symbols
Semantic Guidelines
- Meaningful actions: Should represent observable state changes
- Operator semantics:
- Use
-for moves to empty squares - Use
+for captures - Use
~for moves with implicit effects
- Use
- Distinct positions: Source and destination should differ for movements
- Transformation changes: Modified pieces should differ from original
Context Dependencies
Some validations require game context:
- Whether a square is empty or occupied
- Which pieces are in reserves
- What transformations are possible
- What special moves are available
Design Philosophy
Principle of Least Surprise
Operators were chosen for intuitive visual associations:
-connects two points (movement path)+adds/takes something (capture)~suggests complexity (special rules)*marks a spot (placement)=shows equivalence (transformation)
Separation of Concerns
PAN describes what happens (the action), not:
- Why it happens (game rules)
- Whether it’s legal (validation)
- What else happens (implicit effects)
This separation allows PAN to work with any rule system while maintaining consistent notation.
Progressive Disclosure
The notation supports both simple and complex usage:
- Basic:
e2-e4(just coordinates and operator) - Intermediate:
e7-e8=Q(with transformation) - Advanced:
S*c3=+S(piece, drop, and promotion)
Limitations and Scope
Well-Suited For
- Traditional chess variants
- Shōgi and variants
- Xiangqi and regional games
- Games with discrete positions
- Turn-based gameplay
Not Designed For
- Simultaneous actions
- Hidden information games
- Continuous movement
- Real-time games
- Games without fixed positions
For these cases, consider alternative notations or extensions.
Examples
See PAN Examples for comprehensive usage patterns across different game types.
Reference Implementations
Ruby
- PAN.rb — Complete implementation with parsing, validation, and generation.
