Portable Chess Notation (PCN) Specification
- Version: 1.0.0
- Author: Sashité
- Published: June 10, 2025
- License: MIT License
Overview
Portable Chess Notation (PCN) is a comprehensive, JSON-based format for representing complete chess game records across variants. PCN leverages the Sashité ecosystem specifications, using CELL for multi-dimensional coordinates, HAND for reserve locations, GAN for piece identification, PMN for move representation, and FEEN for position representation, creating a unified and rule-agnostic game recording system.
PCN supports both traditional single-variant games and modern cross-variant scenarios where different players use different game systems.
Game Protocol Foundation
The fundamental game concepts used in this document are interpreted as described in the Game Protocol.
Dependencies
PCN builds upon five foundational Sashité specifications:
- CELL: Multi-dimensional coordinate encoding for board positions
- HAND: Reserve location notation using
"*"
for off-board areas - GAN: General Actor Notation for unambiguous piece identification
- PMN: Portable Move Notation for mechanical move decomposition
- FEEN: Forsyth-Edwards Enhanced Notation for complete position representation
These specifications define the standardized formats that PCN uses for coordinate identification, reserve management, actor representation, move encoding, and position description.
Design Principles
- Ecosystem Integration: Native use of CELL, HAND, GAN, PMN, and FEEN specifications
- Rule-Agnostic: No embedded game logic or validation
- Cross-Game Ready: Native support for hybrid game scenarios
- Comprehensive: Complete game state representation
- FEEN-Centric: Direct use of FEEN for all position representation
- Multi-Dimensional Support: Via CELL coordinates for 3D and higher-dimensional games
- Reserve-Aware: Via HAND notation for capture-and-drop mechanics
JSON Structure
{
"meta": {
"name": "<string>",
"event": "<string>",
"location": "<string>",
"round": "<integer>",
"started_on": "<date>",
"finished_at": "<datetime>",
"href": "<url>"
},
"sides": {
"north": {
"name": "<string>",
"elo": "<integer>"
},
"south": {
"name": "<string>",
"elo": "<integer>"
}
},
"setup": "<feen_position>",
"moves": [
[<pmn_element>, <pmn_element>, <pmn_element>, ...],
...
],
"state": {
"status": "<status>",
"winner": "<winner>"
}
}
Field Specifications
Meta Section (Optional)
Standard game metadata following common conventions.
Field | Type | Description |
---|---|---|
name |
string | Game or opening name |
event |
string | Tournament or event name |
location |
string | Venue or location |
round |
integer | Round number (≥ 1) |
started_on |
date | Game start date (ISO 8601) |
finished_at |
datetime | Game completion timestamp (ISO 8601) |
href |
url | Reference URL |
Sides Section (Optional)
Player information for each side:
Field | Type | Description |
---|---|---|
north |
object | North side player information |
south |
object | South side player information |
Player Object Fields:
Field | Type | Description |
---|---|---|
name |
string | Player name or identifier |
elo |
integer | Elo rating (≥ 0) |
Note: The “north” and “south” terminology corresponds to the lowercase and uppercase style identifiers in FEEN, respectively. The north side uses lowercase styles (second in FEEN turn order), while the south side uses uppercase styles (first in FEEN turn order).
Setup Section (Required)
Initial game configuration using Forsyth-Edwards Enhanced Notation (FEEN):
Field | Type | Description |
---|---|---|
setup |
string | Complete FEEN position string |
This approach provides several advantages:
- Native FEEN integration: Direct use of the established position format
- Irregular board support: Automatic support for non-standard board shapes
- Multi-dimensional support: Native support for 3D and higher-dimensional games
- Pieces in hand: Captured pieces automatically represented in FEEN format
- Turn information: Current player and style identification embedded in FEEN
- Canonical representation: Leverages FEEN’s canonical position format
Important: All piece identifiers must use ASCII letters (a-z, A-Z) as required by the Piece Name Notation (PNN) specification.
Moves Section (Required)
Sequence of game moves using Portable Move Notation (PMN) format. Each move is a PMN array representing one player’s complete turn.
Move Array Structure: Each element in the moves array is a PMN sequence representing the complete mechanical decomposition of one player’s turn.
State Section (Required)
Current game state:
Field | Type | Description |
---|---|---|
status |
string | Current game status |
winner |
string or null | Game winner when finished, null for draws |
Game Status Values:
"in_progress"
- Game ongoing"checkmate"
- King in checkmate"stalemate"
- No legal moves available"bare_king"
- King remains after all friendly pieces captured"mare_king"
- King captured"resignation"
- Player resigned"illegal_move"
- Loss due to illegal move"time_limit"
- Time limit exceeded"move_limit"
- Draw due to move limit reached"repetition"
- Position repeated (draw by repetition)"mutual_agreement"
- Draw by mutual agreement
Winner Values:
"north"
- North side (lowercase style) wins"south"
- South side (uppercase style) winsnull
- Game ends in draw
Examples
Standard Chess Game
{
"meta": {
"name": "King's Gambit",
"event": "Club Championship"
},
"sides": {
"north": {"name": "Alice", "elo": 1650},
"south": {"name": "Bob", "elo": 1720}
},
"setup": "+rnbq+kbn+r/pppppppp/8/8/8/8/PPPPPPPP/+RNBQ+KBN+R / CHESS/chess",
"moves": [
["e2", "e4"],
["e7", "e5"],
["f2", "f4"],
["e5", "f4"]
],
"state": {
"status": "in_progress",
"winner": null
}
}
Completed Chess Game with Checkmate
{
"sides": {
"north": {"name": "Alice"},
"south": {"name": "Bob"}
},
"setup": "+rnbq+kbn+r/pppppppp/8/8/8/8/PPPPPPPP/+RNBQ+KBN+R / CHESS/chess",
"moves": [
["e2", "e4"],
["e7", "e5"],
["d1", "h5"],
["b8", "c6"],
["f1", "c4"],
["g8", "f6"],
["h5", "f7"]
],
"state": {
"status": "checkmate",
"winner": "south"
}
}
Cross-Game: Chess vs Xiongqi
{
"sides": {
"north": {"name": "Chess Player"},
"south": {"name": "Xiongqi Player"}
},
"setup": "+rnbq+kbn+r/pppppppp/8/8/8/PPPPPPPP/2C2C2/RHBEKBHR / XIONGQI/chess",
"moves": [
["e3", "e4"],
["e7", "e5"]
],
"state": {
"status": "in_progress",
"winner": null
}
}
Mare King Victory
{
"sides": {
"north": {"name": "Alice"},
"south": {"name": "Bob"}
},
"setup": "+rnbq+kbn+r/pppppppp/8/8/8/8/PPPPPPPP/+RNBQ+KBN+R / CHESS/chess",
"moves": [
["e2", "e4"],
["f7", "f6"],
["d1", "h5"],
["g7", "g6"],
["h5", "e8"]
],
"state": {
"status": "mare_king",
"winner": "south"
}
}
Relationship with Other Specifications
PCN serves as the comprehensive game recording layer in the Sashité ecosystem:
Specification | Relationship to PCN |
---|---|
CELL | Core dependency: Provides multi-dimensional coordinate format for board locations in PMN moves |
HAND | Core dependency: Provides reserve location notation ("*" ) for capture-and-drop mechanics in PMN |
GAN | Core dependency: Provides actor identification format throughout moves and positions |
PMN | Core dependency: Represents each player’s turn as atomic action sequences using CELL and HAND |
FEEN | Core dependency: Provides initial setup and enables position reconstruction |
SNN | Inherited through GAN/FEEN: Distinguishes different piece systems and variants |
PNN | Inherited through GAN: Foundation for piece identification with state modifiers |
PCN unifies these specifications to provide complete game documentation, ensuring that any recorded game can be fully reconstructed, analyzed, and shared across different implementations and platforms with full support for multi-dimensional boards and reserve-based mechanics.
JSON Schema
Schema URL: https://sashite.dev/schemas/pcn/1.0.0/schema.json
Reference Implementations
This section lists available libraries and tools that implement the PCN specification.
Ruby
- Pcn.rb - Implementation of the Portable Chess Notation specification for Ruby.