Sashité for Developers
  1. Sashité for Developers
  2. Documentation
  3. Snn
  4. 1.0.0

Style Name Notation (SNN) Specification


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


Constraints


Terminology


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:

Casing Rules

The casing of the entire SNN string indicates player association and remains fixed throughout the game:


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:

  1. Multi-style environments: When games involve pieces from multiple traditions or variants.
  2. Game engine development: When implementing engines that need to distinguish between different piece style traditions.
  3. Hybrid games: When creating or analyzing games that combine elements from different piece traditions.
  4. Database systems: When storing game data that must avoid naming conflicts between similar styles.
  5. Cross-tradition analysis: When comparing or analyzing strategic elements across different piece traditions.
  6. 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:

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