Piece Identifier Notation (PIN) Specification
- Version: 1.0.0
- Author: Sashité
- Published: June 23, 2025
- License: MIT License
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:
- Type + Side → Single ASCII letter with case encoding
- State → Optional prefix modifier
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:
- Chess (6 types): Well within limits
- Shōgi (8 base types): Manageable with state modifiers
- Taikyoku Shōgi (207 types): Exceeds PIN capacity
Player Limitation
PIN supports exactly two players through case distinction:
- First player: Uppercase letters (
A-Z
) - Second player: Lowercase letters (
a-z
)
State Levels
PIN provides three state levels:
- Enhanced (
+
): Promoted, upgraded, or empowered pieces - Normal (no modifier): Standard piece state
- Diminished (
-
): Weakened, restricted, or temporary pieces
Design Properties
- ASCII compatibility: Maximum portability across systems
- Rule-agnostic: Independent of specific game mechanics
- Compact format: Minimal character usage (1-2 characters per piece)
- Visual distinction: Clear player differentiation through case
- Protocol compliance: Direct implementation of Sashité piece attributes
Implementation
Ruby Reference
- Pin.rb – Reference implementation with full protocol compliance validation.
Practical Examples
Comprehensive implementation examples for chess, shōgi, and other games are available in the PIN Examples Documentation.