- Sashité for Developers
- Specifications
- PMN
- 1.0.0
- Examples
PMN Examples
Practical implementation guide for Portable Move Notation v1.0.0.
Examples by Complexity
Simple Movements
Basic move with explicit piece:
["e2", "e4", "C:P"]
Basic move with inferred piece:
["e2", "e4"]
Note: When only one legal move exists from e2
to e4
.
Transformation (promotion):
["e7", "e8", "C:Q"]
Drop from reserve:
["*", "e5", "S:P"]
Capture Mechanics
Capture with explicit specification:
["a1", "*", "S:L", "b2", "a1", "S:S"]
Explanation: Gote lance (s:l
) at a1
is captured to sente’s reserve (becoming S:L
), then sente silver moves from b2
to a1
.
Capture with inference:
["b2", "a1"]
Note 1: When context makes the capturing piece and result unambiguous, the source and destination of the move are sufficient.
Note 2: At the protocol level, a capture always removes a piece from the board and places it in a player’s reserve, regardless of game rules. Whether the captured piece changes ownership, maintains its identity, or can later be dropped back onto the board depends entirely on the specific game rules. PMN handles all capture mechanics uniformly through the same board-to-reserve mechanism.
Complex Movements
Western Chess castling with explicit specification:
["e1", "g1", "C:K", "h1", "f1", "C:R"]
Castling with inference:
["e1", "g1"]
Note: When castling is the only legal move from e1
to g1
.
En passant with explicit specification:
["e5", "f6", "C:P", "f5", "*", "c:p"]
Note: White pawn moves from e5
to f6
, capturing the black pawn on f5
en passant.
En passant with inference:
["e5", "f6"]
Note: When en passant is the only legal move from e5
to f6
.
Shōgi promotion with explicit specification:
["g8", "g9", "S:+P"]
Shōgi promotion with inference:
["g8", "g9"]
Note: This shorter version of the move would be possible if a shogi sente pawn is on g8
, as its promotion is be required on g9
.
Piece exchange:
[
"e2", "*" , "X:A",
"e3", "e2", "X:B",
"*" , "e3", "X:A"
]
Three actions:
X:A
ate2
goes to reserveX:B
movese3
→e2
X:A
from reserve goes toe3
When to Specify vs Infer Pieces
Specify Pieces When:
- Multiple choices exist: Western Chess promotion (Queen? Rook? Knight? Bishop?)
- Multiple pieces can move: Several pieces can reach the same destination
- State changes occur: Piece promotion, ownership transfer
- Disambiguation needed: Complex positions with multiple possibilities
- Cross-game compatibility: When game rules may not be available
- QPI compliance: When the piece’s final QPI must be explicitly stated
Infer Pieces When:
- Unambiguous context: Only one legal move exists
- Simple movements: Basic piece movement without choices
- Network efficiency: Reducing data transmission size
- User interface: Click-to-move implementations
Integration with GGN
For actions with inferred pieces, PMN coordinates correspond to GGN query parameters:
GGN Validation Examples
Western Chess castling:
// PMN with inferred piece
["e1", "g1"]
// Corresponding GGN validation
{
"C:+K": { // Source piece (from position analysis)
"e1": { // Source position (from PMN)
"g1": [ // Destination position (from PMN)
{
"must": { "f1": "empty", "g1": "empty", "h1": "C:+R" }
}
]
}
}
}
Western Chess promotion:
// PMN with explicit piece
["e7", "f8", "C:N"]
// Corresponding GGN validation
{
"C:P": { // Source piece (from position analysis)
"e7": { // Source position (from PMN)
"f8": [ // Destination position (from PMN)
{
"must": { "f8": "enemy" }
}
]
}
}
}
Xiangqi general movement:
// PMN with inferred piece
["e1", "e2"]
// Corresponding GGN validation
{
"X:G": { // General xiangqi (from position analysis)
"e1": { // Position source (from PMN)
"e2": [ // Position destination (from PMN)
{
"must": { "e2": "empty" }
}
]
}
}
}