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

General Actor Notation (GAN) Specification


Overview

General Actor Notation (GAN) provides a rule-agnostic format for identifying game actors in abstract strategy board games by combining Style Name Notation (SNN) and Piece Identifier Notation (PIN) with a colon separator and consistent case encoding.

GAN represents all four fundamental piece attributes from the Game Protocol:

Unlike Piece Name Notation (PNN) which uses derivation markers, GAN explicitly names the style for unambiguous identification.


Format Specification

Structure

<snn>:<pin>

Grammar (BNF)

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

<uppercase-gan> ::= <uppercase-style> <colon> <uppercase-pin>
<lowercase-gan> ::= <lowercase-style> <colon> <lowercase-pin>

<colon> ::= ":"

<uppercase-style> ::= <letter-uppercase> <identifier-tail-uppercase>*
<lowercase-style> ::= <letter-lowercase> <identifier-tail-lowercase>*
<identifier-tail-uppercase> ::= <letter-uppercase> | <digit>
<identifier-tail-lowercase> ::= <letter-lowercase> | <digit>

<uppercase-pin> ::= <letter-uppercase> | <state-modifier> <letter-uppercase>
<lowercase-pin> ::= <letter-lowercase> | <state-modifier> <letter-lowercase>
<state-modifier> ::= "+" | "-"

<letter-uppercase> ::= "A" | "B" | "C" | ... | "Z"
<letter-lowercase> ::= "a" | "b" | "c" | ... | "z"
<digit> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"

Regular Expression

\A([A-Z][A-Z0-9]*:[-+]?[A-Z]|[a-z][a-z0-9]*:[-+]?[a-z])\z

Protocol Mapping

GAN encodes piece attributes by combining SNN and PIN information:

Protocol Attribute GAN Encoding Examples
Type PIN letter choice CHESS:K = King, CHESS:P = Pawn
Side Unified case across both components CHESS:K = First player, chess:k = Second player
State PIN prefix modifier SHOGI:+P = Enhanced, CHESS:-P = Diminished
Style SNN identifier CHESS:K = Chess style, SHOGI:K = Shōgi style

Design Properties


Implementation

Ruby Reference

Practical Examples

Comprehensive implementation examples for single-style and cross-style scenarios are available in the GAN Examples.