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

General Gameplay Notation (GGN) Specification


Overview

General Gameplay Notation (GGN) is a rule-agnostic, JSON-based format for describing pseudo-legal moves in abstract strategy board games. GGN expresses whether a move is possible under basic movement constraints, while remaining completely silent about higher-level, game-specific legality questions (e.g., check, ko, repetition, castling paths) and mechanical execution details.

GGN serves as a pure movement possibility oracle: given a piece, source location, and destination location, it determines if the movement is feasible under specified pre-conditions.


Terminology

For complete definitions of terms used in this document, see the Glossary.


Dependencies

GGN builds upon four foundational Sashité specifications:

These specifications define the building blocks that GGN uses for movement possibility definitions.


Core Philosophy

Movement Possibility Model

A single GGN entry answers the fundamental question:

Can this piece, currently at this location, reach that location?

It encodes:

  1. Which piece (via QPI format: style:piece)
  2. From where (source location using CELL coordinates or HAND “*”)
  3. To where (destination location using CELL coordinates or HAND “*”)
  4. Which pre-conditions must hold (must)
  5. Which pre-conditions must not hold (deny)
  6. What changes occur if the move is executed (diff)

JSON Structure

{
  "<Piece>": {
    "<Source location>": {
      "<Destination location>": [
        {
          "must":  { "<location>": "<required state>",  },
          "deny":  { "<location>": "<forbidden state>",  },
          "diff":  { /* STN format */ }
        }
      ]
    }
  }
}

Core Fields

Field Type Required Description
Piece string yes Piece identifier in QPI format (style:piece)
Source location string yes Origin location (CELL coordinate or HAND “*”)
Destination location string yes Target location (CELL coordinate or HAND “*”)
must object yes Pre-conditions that must be satisfied
deny object yes Pre-conditions that must not be satisfied
diff object yes State transition in STN format

Location Constraints

HAND Integration: The "*" notation follows the HAND specification for representing reserve/off-board locations, enabling representation of piece placement and capture mechanics.

Piece Identification


Pre-Conditions and State Changes System

Logical Semantics

State Transition Integration

The diff field uses State Transition Notation (STN) format to describe the complete state change that results from executing the move. This enables GGN to specify not only the conditions for move validity but also the mechanical outcome of the move execution.

Location States

State Meaning
"empty" Location must be empty
"enemy" Location must contain an opposing piece
Piece Location must contain exactly the specified piece

Implicit States (via deny)

Expression Implicit Meaning
"deny": { "a1": "empty" } Location must be occupied (by any piece)
"deny": { "a1": "enemy" } Location must contain a friendly piece

Constraint Examples

Desired Condition GGN Expression
Location must be empty "must": { "a1": "empty" }
Location must contain enemy "must": { "a1": "enemy" }
Location must contain ally "deny": { "a1": "enemy" }
Location must be occupied "deny": { "a1": "empty" }
Location must contain specific piece "must": { "a1": "CHESS:K" }
Location must not contain specific piece "deny": { "a1": "CHESS:K" }

JSON Schema

Schema URL: https://sashite.dev/schemas/ggn/1.0.0/schema.json

The JSON Schema provides structural validation for GGN format compliance, ensuring proper movement possibility structure with valid pre-conditions.


Examples

See GGN Examples for practical implementation guidance.

Reference Implementations

Ruby