Sashité for Developers
  1. Sashité for Developers
  2. Specifications
  3. PNN
  4. 1.0.0
  5. Examples

PNN Examples

Practical examples of PNN v1.0.0: one ASCII letter names a Piece, its case gives the Piece Side. The letter mappings below are conventions of each Rule System, not part of PNN; they are the ones used by the Sashité rule pages and by the Sashité notations built on PNN.


1. Reading a token

Token Piece Name Piece Side
K K (king, by convention) first
k K — the same Piece Name second
G G (ōgi gold general, by convention) first
r R (rook, by convention) second

K and k are two different tokens with one Piece Name: they are the same kind of Piece, held by opposite Sides.


2. Sashité rule systems (8×8)

The three Sanki variants share one 8×8 Board; a cross-variant Position reads unambiguously, each camp’s Style settling the letters the variants share (P is always a chess Pawn, F always an ōgi Fu).

2.1 Chess

Letter Piece
K / k King
Q / q Queen
R / r Rook
B / b Bishop
N / n Knight
P / p Pawn

2.2 Ōgi

Letter Piece
K / k King (王 / 玉)
G / g Gold General (金) — promoted, +G, the Free Gold (奔)
R / r Rook (飛) — promoted, +R, the Dragon (龍)
B / b Bishop (角) — promoted, +B, the Horse (馬)
S / s Silver General (銀) — promoted, +S (全)
N / n Knight (桂) — promoted, +N (圭)
L / l Lance (香) — promoted, +L (杏)
F / f Fu (歩) — promoted, +F, the Tokin (と)

Ōgi writes every promoted form with the PIN + state modifier, as shōgi does (see §5).

2.3 Xiongqi

Letter Piece
G / g General (帥 / 將)
E / e Empress (妃 / 騛)
R / r Chariot (俥 / 車)
B / b Bear (雄 / 熊)
N / n Knight (傌 / 馬)
S / s Soldier (兵 / 卒)

3. Traditional games

3.1 Shōgi (9×9)

Letter Piece
K / k King (王将 / 玉将)
R / r Rook (飛車)
B / b Bishop (角行)
G / g Gold general (金将)
S / s Silver general (銀将)
N / n Knight (桂馬)
L / l Lance (香車)
P / p Pawn (歩兵)

Promoted shōgi Pieces are conventionally written with the PIN + state modifier (+R dragon, +P tokin) rather than with distinct letters — a choice of that Rule System, made one level above PNN.

3.2 Xiangqi (9×10)

Letter Piece
G / g General (帥 / 將)
A / a Advisor (仕 / 士)
E / e Elephant (相 / 象)
H / h Horse (傌 / 馬)
R / r Chariot (俥 / 車)
C / c Cannon (炮 / 砲)
P / p Soldier (兵 / 卒)

3.3 Makruk (8×8)

Letter Piece
K / k Khun (king)
M / m Met (queen)
R / r Rua (rook)
N / n Ma (knight)
S / s Khon (bishop)
P / p Bia (pawn)

4. Valid and invalid tokens

Input Valid Reason
K ✓ one uppercase letter
k ✓ one lowercase letter
Z ✓ any letter is admitted; the mapping is the Rule System’s
KK ✗ two letters
+K ✗ state modifier — belongs to PIN
K^ ✗ terminal marker — belongs to PIN
K' ✗ derivation marker — belongs to EPIN
W:K ✗ Style qualifier — belongs to QPI
1 ✗ not a letter
` K` ✗ whitespace
`` (empty) ✗ no letter

5. Where PNN stops

The same Piece, written at each level of the stack:

Notation Token Adds
PNN R Piece Name, Piece Side
PIN +R Piece State (+), Terminal Status (^)
EPIN +R' native/derived status (')
QPI W:+R Piece Style (the SIN letter)

A Rule System that needs to tell two forms of a Piece apart chooses between a new letter (a makruk Bia promoted to a Met, M) and a PIN state modifier (shōgi’s +P, ōgi’s +F); PNN provides the letters, the choice is made above it.