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

Qualified Piece Identifier (QPI) Specification


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:

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:

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:

Invalid semantic combinations (syntactically valid but semantically inconsistent):


Design Properties


Examples

See QPI Examples for practical implementation guidance.

Reference Implementations

Ruby