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.


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:

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

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

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