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.
QPI represents all four fundamental piece attributes:
- Type → PIN component (ASCII letter choice)
- Side → PIN component (letter case)
- State → PIN component (optional prefix modifier)
- Style → SIN component (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-letter> <colon> <uppercase-pin>
<lowercase-qpi> ::= <lowercase-letter> <colon> <lowercase-pin>
<colon> ::= ":"
<uppercase-pin> ::= <uppercase-letter> | <state-modifier> <uppercase-letter>
<lowercase-pin> ::= <lowercase-letter> | <state-modifier> <lowercase-letter>
<state-modifier> ::= "+" | "-"
<uppercase-letter> ::= "A" | "B" | "C" | ... | "Z"
<lowercase-letter> ::= "a" | "b" | "c" | ... | "z"
Regular Expression
\A([A-Z]:[-+]?[A-Z]|[a-z]:[-+]?[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 | PIN case | 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 |
Important: The SIN and PIN components encode their respective attributes independently. The SIN component indicates which style governs the piece, while the PIN component handles type, side, and state according to PIN specification rules.
Component Relationship
Independent Encoding
QPI treats SIN and PIN as independent components connected by a colon separator:
- SIN component: Identifies the style using single ASCII letter
- PIN component: Identifies type, side, and state using PIN format
- Separator: Colon (
:
) provides clear delimitation
Cross-Reference Constraint
While the components are syntactically independent, there is a semantic constraint: the style identified by the SIN component must be associated with the same player as indicated by the PIN case. This ensures consistency between style assignment and piece ownership.
Valid combinations:
C:K
- Chess style with first player kingc:k
- Chess style with second player king
Invalid semantic combinations (syntactically valid but semantically inconsistent):
C:k
- Chess style (first player) with second player piecec:K
- Chess style (second player) with first player piece
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
- Independent validation: Each component can be validated according to its own specification
- Comprehensive attribute representation: Direct implementation of Sashité piece attributes
Examples
See QPI Examples for practical implementation guidance.
Reference Implementations
Ruby
- QPI.rb – Reference implementation of the Qualified Piece Identifier specification.