Sashité for Developers

Piece Name Notation (PNN) Specification

Version: 1.0.0 Author: Sashité Published: May 1, 2025 License: MIT License


Overview

Piece Name Notation (PNN) defines a consistent and rule-agnostic format for representing pieces in abstract strategy board games. This specification establishes a standardized way to identify and represent pieces independent of any specific game rules or mechanics.


Properties


Constraints


Format

A piece is represented by an identifier composed of a single ASCII letter, optionally modified by prefixes and/or suffixes.

Piece Identifier Structure

[<prefix>]<letter>[<suffix>]

Where:


Modifiers

Modifiers provide a mechanism to express the state of pieces on the board without compromising the rule-agnostic nature of the notation.

Modifier Meanings

Modifier Meaning
+ Enhanced state
- Diminished state
' Intermediate state

Modifier Application Rules

  1. Modifiers are strictly optional.
  2. A piece may have a prefix, a suffix, both, or neither.
  3. Modifiers do not change the fundamental identity of the piece but only express variations in state.
  4. Modifiers only apply to pieces on the board. Pieces off the board (in hand, captured) must use the plain letter only.

Formal Grammar (BNF)

<piece> ::= <letter>
         | <prefix> <letter>
         | <letter> <suffix>
         | <prefix> <letter> <suffix>

<prefix> ::= "+" | "-"
<suffix> ::= "'"

<letter> ::= <letter-lowercase> | <letter-uppercase>

<letter-lowercase> ::= "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j"
                    | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t"
                    | "u" | "v" | "w" | "x" | "y" | "z"

<letter-uppercase> ::= "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J"
                    | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T"
                    | "U" | "V" | "W" | "X" | "Y" | "Z"

JSON Schema

The following JSON Schema defines the validation pattern for a PNN piece string:

{
  "type": "string",
  "pattern": "^[-+]?[a-zA-Z]'?$"
}

PNN Implementations

This section lists available libraries and tools that implement the PNN specification, allowing developers to easily integrate this format into their applications.

Ruby