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) primitives with a colon separator. This combination enables complete piece identification across different game styles and contexts.

QPI represents all four fundamental piece attributes:

Unlike Extended Piece Identifier Notation (EPIN) which uses derivation markers, QPI explicitly identifies both style and piece using foundational primitives.


Terminology

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


Dependencies

QPI builds upon two foundational primitive specifications:

QPI combines these primitive building blocks: SIN + PIN = QPI


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

Primitive Combination

Direct Primitive Integration

QPI components are directly assigned primitive identifiers:

Style Component (SIN)

Piece Component (PIN)

Combination Examples

SIN PIN QPI Result Interpretation
C K C:K Style C, piece K, first player
c k c:k Style C, piece K, second player
S +P S:+P Style S, enhanced piece P, first player
x -p x:-p Style X, diminished piece P, second player

Piece Attribute Mapping

QPI encodes piece attributes by combining SIN and PIN information:

Piece Attribute QPI Encoding Examples
Name PIN letter choice K = King, N = Knight
Side SIN & PIN cases C:K = First player, c:k = Second player
State PIN state modifier S:+S = Enhanced, C:-P = Diminished
Style SIN letter choice C = Chess-style, S = Shogi-style

Important: The SIN and PIN components encode their respective attributes independently through direct assignment. The SIN component indicates which style governs the piece, while the PIN component handles name, side, and state according to PIN specification rules.


Component Relationship

Independent Primitives with Consistency Constraint

QPI treats SIN and PIN as independently assigned components connected by a colon separator:

Cross-Reference Constraint

While the components are assigned independently, 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):


Extension Integration

Human-Readable Extensions

QPI can be enhanced through human-readable extension systems:

Extension Integration: Systems can provide descriptive names for QPI components:

Mapping Requirements

Important: While QPI → extension mapping requires external indexes, the compact QPI format remains self-contained:

Examples

Direct QPI usage:

C:K  # Style C, piece K
c:k  # Style C, piece K (second player)
S:+P # Style S, enhanced piece P

With extension context:


Cross-Style Scenarios

Single-Style Games

Chess vs. Chess (both players use Chess):

Cross-Style Games

Chess vs. Ōgi:

With enhanced pieces:

Multiple Source Mapping

Same QPI from different extension sources:

Note: From QPI C:K, you cannot determine the original extension sources without maintained mapping context.


Design Properties


Examples

See QPI Examples for practical implementation guidance.


Reference Implementations

Ruby