Style Name Notation (SNN) Specification
- Version: 1.0.0
- Author: Sashité
- Published: June 23, 2025
- License: MIT License
Overview
Style Name Notation (SNN) provides a rule-agnostic format for identifying styles in abstract strategy board games. SNN uses standardized naming conventions with case-based side encoding, enabling clear distinction between different traditions in multi-style gaming environments.
SNN represents the Style attribute from the Game Protocol with explicit naming and side association through case encoding.
Format Specification
Structure
<style-identifier>
Grammar (BNF)
<snn> ::= <uppercase-style> | <lowercase-style>
<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>
<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-z0-9]*)\z
Protocol Mapping
SNN encodes style information with side association:
Protocol Attribute | SNN Encoding | Examples |
---|---|---|
Style | Alphanumeric identifier | CHESS , SHOGI , XIANGQI |
Side | Case encoding | CHESS = First player, chess = Second player |
System Constraints
Side Limitation
SNN supports exactly two players through case distinction:
- First player: Uppercase identifiers (
CHESS960
,SHOGI
,XIANGQI
) - Second player: Lowercase identifiers (
chess960
,shogi
,xiangqi
)
Identifier Format
- Start character: Must be alphabetic (
A-Z
ora-z
) - Subsequent characters: Alphabetic characters and digits only
- Case consistency: Entire identifier must be uppercase or lowercase (no mixed case)
- Side consistency: Case indicates which side uses this style
Design Properties
- Rule-agnostic: Independent of specific game mechanics
- Cross-style support: Enables multi-tradition gaming environments
- Canonical representation: Consistent naming for equivalent styles
Implementation
Ruby Reference
- Snn.rb – Reference implementation of the Style Name Notation specification.
Practical Examples
Comprehensive implementation examples for classic and variant styles are available in the SNN Examples.