Sashité for Developers
  1. Sashité for Developers
  2. Specifications
  3. PIN
  4. 1.0.0

Piece Identifier Notation (PIN) Specification


Overview

Piece Identifier Notation (PIN) provides an ASCII-based format for representing pieces in abstract strategy board games. PIN translates piece attributes from the Game Protocol into a compact, portable notation system.

PIN represents three of the four fundamental piece attributes:

Note: PIN does not represent the Style attribute. For style-aware piece notation, see Piece Name Notation (PNN).


Format Specification

Structure

[<state>]<letter>

Grammar (BNF)

<pin> ::= <letter>
       | <state-modifier> <letter>

<state-modifier> ::= "+" | "-"
<letter> ::= <uppercase-letter> | <lowercase-letter>

<uppercase-letter> ::= "A" | "B" | "C" | ... | "Z"
<lowercase-letter> ::= "a" | "b" | "c" | ... | "z"

Regular Expression

\A[-+]?[A-Za-z]\z

Protocol Mapping

PIN encodes piece attributes using the following correspondence:

Protocol Attribute PIN Encoding Examples
Type ASCII letter choice K/k = King, P/p = Pawn
Side Letter case K = First player, k = Second player
State Optional prefix +K = Enhanced, -K = Diminished, K = Normal

Canonical principle: Identical pieces must have identical PIN representations.


System Constraints

Type Limitation

PIN supports a maximum of 26 unique piece types per game system. Each type requires a distinct ASCII letter.

Examples:

Player Limitation

PIN supports exactly two players through case distinction:

State Levels

PIN provides three state levels:


Design Properties


Implementation

Ruby Reference

Practical Examples

Comprehensive implementation examples for chess, shōgi, and other games are available in the PIN Examples Documentation.