Qualified Piece Identifier (QPI) Specification
- Version: 1.0.0
- Author: Sashité
- Published: June 23, 2025
- License: MIT License
Overview
Qualified Piece Identifier (QPI) provides a rule-agnostic format for identifying game pieces in abstract strategy board games by combining Style Identifier Notation (SIN) and Piece Identifier Notation (PIN) with a colon separator and consistent case encoding.
QPI represents all four fundamental piece attributes:
- Type → PIN component (ASCII letter choice)
- Side → Consistent case encoding across both SIN and PIN components
- State → PIN component (optional prefix modifier)
- Style → SIN component (explicit style identifier)
Unlike Extended Piece Identifier Notation (EPIN) which uses derivation markers, QPI explicitly names the style for unambiguous identification.
Terminology
For complete definitions of terms used in this document, see the Glossary.
Format Specification
Structure
<sin>:<pin>
Grammar (BNF)
<qpi> ::= <uppercase-qpi> | <lowercase-qpi>
<uppercase-qpi> ::= <uppercase-style> <colon> <uppercase-pin>
<lowercase-qpi> ::= <lowercase-style> <colon> <lowercase-pin>
<colon> ::= ":"
<uppercase-style> ::= <letter-uppercase> <identifier-tail-uppercase>*
<lowercase-style> ::= <letter-lowercase> <identifier-tail-lowercase>*
<identifier-tail-uppercase> ::= <letter-uppercase> | <digit>
<identifier-tail-lowercase> ::= <letter-lowercase> | <digit>
<uppercase-pin> ::= <letter-uppercase> | <state-modifier> <letter-uppercase>
<lowercase-pin> ::= <letter-lowercase> | <state-modifier> <letter-lowercase>
<state-modifier> ::= "+" | "-"
<letter-uppercase> ::= "A" | "B" | "C" | ... | "Z"
<letter-lowercase> ::= "a" | "b" | "c" | ... | "z"
<digit> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
Regular Expression
\A([A-Z][A-Z0-9]*:[-+]?[A-Z]|[a-z][a-z0-9]*:[-+]?[a-z])\z
Piece Attribute Mapping
QPI encodes piece attributes by combining SIN and PIN information:
Piece Attribute | QPI Encoding | Examples |
---|---|---|
Type | PIN letter choice | C:K = King, C:P = Pawn |
Side | Unified case across both components | C:K = First player, c:k = Second player |
State | PIN prefix modifier | S:+P = Enhanced, C:-P = Diminished |
Style | SIN identifier | C:K = Chess style, S:K = Shōgi style |
Design Properties
- Rule-agnostic: Independent of specific game mechanics
- Complete identification: Explicit representation of all four piece attributes
- Cross-style support: Enables multi-tradition gaming environments
- Component clarity: Clear separation between style context and piece identity
- Unified case encoding: Consistent case across both components for side identification
- Comprehensive attribute representation: Direct implementation of Sashité piece attributes
Implementation
Ruby Reference
- QPI.rb – Reference implementation of the Qualified Piece Identifier specification.
Practical Examples
Comprehensive implementation examples for single-style and cross-style scenarios are available in the QPI Examples.