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 into a compact, portable notation system.

PIN represents three of the four fundamental piece attributes:

Pencil sketch of chess pieces on board representing abstract strategy games

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


Terminology

For complete definitions of terms used in this document, see the Glossary.


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

Piece Attribute Mapping

PIN encodes piece attributes using the following correspondence:

Piece Attribute PIN Encoding Examples
Type ASCII letter choice K/k = King, P/p = Pawn
Side Letter case P = First player, p = Second player
State Optional prefix +P = Enhanced, -P = Diminished, P = 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.