Style Name Notation (SNN) Specification
- Version: 1.0.0
- Author: Sashité
- Published: May 1, 2025
- License: MIT License
Overview
Style Name Notation (SNN) defines a consistent and rule-agnostic format for identifying piece styles in abstract strategy board games. SNN provides unambiguous identification of piece styles by using standardized naming conventions, enabling clear distinction between different piece traditions, variants, or design approaches within multi-style gaming environments.
Properties
- SNN is rule-agnostic and does not encode game states, legality, validity, or game-specific conditions.
- SNN provides unambiguous identification, ensuring that different piece styles can coexist without naming conflicts.
- SNN uses a canonical representation where equivalent styles yield identical strings.
- SNN supports cross-style contexts where pieces from multiple traditions may be present simultaneously.
- SNN maintains case consistency where each identifier is entirely uppercase or entirely lowercase.
Constraints
- SNN supports exactly two players.
- Players are distinguished by casing: uppercase identifiers represent styles belonging to the first player; lowercase identifiers represent styles belonging to the second player.
- Style identifiers must start with an alphabetic character (
A-Z
for uppercase,a-z
for lowercase). - Subsequent characters in style identifiers may include alphabetic characters and digits (
A-Z
,0-9
for uppercase styles;a-z
,0-9
for lowercase styles). - A style identifier must be entirely uppercase or entirely lowercase - mixed casing is not permitted.
- Style assignment to players remains fixed throughout a game - the same player always uses the same style casing.
Terminology
- A style represents a particular tradition, variant, or design approach for game pieces (e.g., chess, shōgi, xiangqi, makruk).
- A style identifier specifies which piece tradition or variant the pieces follow.
- Player association is determined by the casing of the entire SNN string and remains constant throughout gameplay.
- Style assignment refers to the fixed association between a player and their chosen piece style for the duration of a game.
Format
A style is represented by an identifier starting with an alphabetic character, followed by optional alphabetic characters and digits.
Style Identifier Structure
<style-id>
Where:
<style-id>
is a sequence starting with an alphabetic character, followed by zero or more alphabetic characters and digits.
Casing Rules
The casing of the entire SNN string indicates player association and remains fixed throughout the game:
- Uppercase format (e.g.,
CHESS
,SHOGI2
,XIANGQI960
) denotes styles belonging to the first player. - Lowercase format (e.g.,
chess
,makruk
,chess960
) denotes styles belonging to the second player.
Examples
Classic Game Styles
Style Description | First Player | Second Player |
---|---|---|
International Chess | CHESS |
chess |
Japanese Shōgi | SHOGI |
shogi |
Chinese Xiangqi | XIANGQI |
xiangqi |
Thai Makruk | MAKRUK |
makruk |
Korean Janggi | JANGGI |
janggi |
Variant Styles
Style Description | First Player | Second Player |
---|---|---|
Chess960/Fischer Random | CHESS960 |
chess960 |
Shōgi with handicap | SHOGI9 |
shogi9 |
King of the Hill Chess | CHESSKING |
chessking |
Mini Shōgi | MINISHOGI |
minishogi |
Cross-Style Game Examples
In a hypothetical game where one player uses chess pieces and another uses makruk pieces:
Player | Style | Example Context |
---|---|---|
First Player | CHESS |
Uses international chess piece set |
Second Player | makruk |
Uses Thai makruk piece set |
This creates a unique gaming experience where CHESS
pieces face makruk
pieces on the same board.
Formal Grammar (BNF)
<style> ::= <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-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"
<digit> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
Regular Expression
The following regular expression validates an SNN style string:
\A([A-Z][A-Z0-9]*|[a-z][a-z0-9]*)\z
Applications
SNN is particularly useful in the following scenarios:
- Multi-style environments: When games involve pieces from multiple traditions or variants.
- Game engine development: When implementing engines that need to distinguish between different piece style traditions.
- Hybrid games: When creating or analyzing games that combine elements from different piece traditions.
- Database systems: When storing game data that must avoid naming conflicts between similar styles.
- Cross-tradition analysis: When comparing or analyzing strategic elements across different piece traditions.
- Tournament systems: When organizing events that allow players to choose from different piece style traditions.
Design Principles
Style vs Game Distinction
SNN deliberately distinguishes between “style” (the tradition or variant of pieces used by a player) and “game” (the overall contest between players). This allows for scenarios where two players use different piece traditions within the same game, creating rich and varied gameplay experiences.
Fixed Assignment
Style assignment to players remains constant throughout a game. Once a player is associated with a particular style casing (uppercase or lowercase), this association does not change during gameplay, providing stability and clarity in multi-style contexts.
Collision-Free Identification
By ensuring case consistency and allowing numeric suffixes, SNN provides a robust namespace for distinguishing between different traditions, variants, and custom implementations while maintaining readability and simplicity.
Relationship with Other Specifications
SNN is designed as a foundational identification system that works alongside other notation systems:
- Piece representation: Piece Name Notation (PNN) can manage individual piece identification independently of SNN style identification.
- Actor identification: General Actor Notation (GAN) can combine SNN style identifiers with PNN piece identifiers to create complete actor references.
- Board notation: Position formats can reference SNN identifiers while maintaining their own structural conventions.
- Move notation: Move formats can use SNN-qualified identifiers to specify which style tradition pieces belong to.
This separation of concerns allows each system to focus on its primary responsibility while maintaining interoperability.
Reference Implementations
This section lists available libraries and tools that implement the SNN specification.
Ruby
- Snn.rb - Implementation of the Style Name Notation specification for Ruby.