Sashité for Developers
  1. Sashité for Developers
  2. Specifications
  3. PMN
  4. 1.0.0
  5. Examples

PMN Examples

Practical implementation guide for Portable Move Notation v1.0.0.


Pass Moves

Basic Pass Move

Pass move (no action):

[]

This represents a voluntary turn conclusion without any displacement or mutation. The active player ends their turn, and the resulting position must be unique according to protocol constraints.

Important: This is the canonical way to represent “no effect.” Any action notation must represent an observable state change. Actions like ["e2", "e2"] or ["e2", "e2", "C:R"] (where C:R is already at e2) are prohibited because they have no observable effect.


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"]

In-Place Transformations

Transformation with explicit specification:

["e4", "e4", "C:+P"]

Note: Piece at e4 transforms from C:P to enhanced state C:+P without moving. This is valid because an observable state change occurs.

Transformation with inference:

["a7", "a7"]

Note: When context makes the transformation unambiguous (e.g., mandatory pawn promotion), and the piece state actually changes.

Important: Actions where source equals destination are only valid when they represent an observable state change (mutation). If the piece at e4 is already C:+P, then ["e4", "e4", "C:+P"] would be invalid because it has no effect. Use [] for pass moves instead.

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 required on g9.

Piece exchange:

[
  "e2", "*" , "X:A",
  "e3", "e2", "X:B",
  "*" , "e3", "X:A"
]

Three actions:

  1. X:A at e2 goes to reserve
  2. X:B moves e3e2
  3. X:A from reserve goes to e3

Invalid Examples

Prohibited Hand-to-Hand Transfers

Invalid: Direct hand-to-hand transfer with explicit piece:

["*", "*", "P"]

This is invalid because the protocol explicitly prohibits direct hand-to-hand displacement. All piece transfers between hands must transit through the board.

Invalid: Direct hand-to-hand transfer with inferred piece:

["*", "*"]

This is also invalid for the same reason, even though the piece is inferred from context.

Correct alternative: To transfer a piece from one hand to another, it must first be placed on the board, then captured:

["*", "e5", "S:P", "e5", "*", "s:p"]

This places the piece on the board at e5, then captures it to the other hand.

Prohibited No-Effect Actions

Invalid: Same location with no state change (explicit piece):

["e4", "e4", "C:R"]

This is invalid if C:R is already at e4 because the action has no observable effect. No displacement occurs and the piece state remains unchanged.

Invalid: Same location with no state change (inferred piece):

["a1", "a1"]

This is invalid if inference determines the piece at a1 would remain in the same state. The action would have no observable effect.

Correct alternative: If you want to pass your turn without any effect, use the pass move notation:

[]

Valid transformation: If the piece actually changes state, the action is valid:

["e4", "e4", "C:+P"]

This is valid if the piece at e4 is currently C:P and transforms to C:+P (promotion without movement).


STN Integration Examples

PMN actions produce corresponding STN deltas when executed. Here are common patterns:

Simple Movement

PMN action:

["e2", "e4", "C:P"]

Resulting STN delta:

{
  "board": {
    "e2": null,
    "e4": "C:P"
  },
  "toggle": true
}

Drop from Reserve

PMN action:

["*", "e5", "S:P"]

Resulting STN delta:

{
  "hands": {
    "S:P": -1
  },
  "board": {
    "e5": "S:P"
  },
  "toggle": true
}

Pass Move

PMN action:

[]

Resulting STN delta:

{
  "toggle": true
}

Note: The pass move action produces only a turn change in the resulting position, with no board or hand modifications.

In-Place Transformation

PMN action:

["e4", "e4", "C:+P"]

Resulting STN delta (assuming piece at e4 was C:P before):

{
  "board": {
    "e4": "C:+P"
  },
  "toggle": true
}

Note: The piece at e4 changes state from C:P to C:+P but remains at the same location. This is valid because an observable state change occurs.

Multiple Actions

PMN sequence:

["e2", "e4", "C:P", "e7", "e5", "c:p"]

Resulting STN delta:

{
  "board": {
    "e2": null,
    "e4": "C:P",
    "e7": null,
    "e5": "c:p"
  },
  "toggle": false
}

Note: After two actions, the turn typically returns to the original player (depending on game rules).

STN-Only Scenarios

Some STN deltas cannot be represented as PMN actions:

STN delta (no action occurred):

{}

This represents no changes to the position - no board changes, no hand changes, no turn change. Since PMN represents actions, and this STN shows no action occurred, there is no PMN equivalent. Note that this is different from a pass move, which changes the active player.


When to Specify vs Infer Pieces

Specify Pieces When:

Infer Pieces When:


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" }
        }
      ]
    }
  }
}

In-place transformation:

// PMN with inferred piece
["e7", "e7"]

// Corresponding GGN validation
{
  "C:P": {               // Source piece (from position analysis)
    "e7": {              // Source position (from PMN)
      "e7": [            // Destination position (from PMN)
        {
          "must": {}     // In-place transformation constraints (game-specific)
        }
      ]
    }
  }
}

Note: This is only valid if the piece at e7 actually changes state (e.g., mandatory promotion). The GGN validates that the transformation is legal, while PMN represents the mechanical action.

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" }
        }
      ]
    }
  }
}

Summary

This examples document demonstrates:

  1. Pass moves: Represented by empty arrays [] for voluntary turn conclusion
  2. Hand-to-hand prohibition: Direct transfers between hands are invalid
  3. No-effect action prohibition: Actions without observable effect are invalid
  4. In-place transformations: Valid only when piece state actually changes
  5. Standard movements: Board-to-board, board-to-hand, and hand-to-board displacements
  6. Complex sequences: Multi-action moves with proper mechanical decomposition

All examples comply with the revised Game Protocol and PMN specification, maintaining canonical representation.