Sashité for Developers
  1. Sashité for Developers
  2. FAQ

Frequently Asked Questions

Common questions about Sashité specifications and their implementation.


General Questions

What is the Game Protocol?

The Game Protocol is the minimal, rule-agnostic framework that defines how abstract strategy board games work at a structural level. It specifies:

The Game Protocol intentionally does not define:

This separation allows the same protocol to support Chess, Shōgi, Xiangqi, and hybrid variants without modification.

Learn more: Game Protocol specification


What is a cross-style game?

A cross-style game (or hybrid game) is a match where the two players use pieces from different movement traditions. For example:

The Sashité ecosystem explicitly supports this through:

Example FEEN (Chess vs Makruk starting position):

rnsmk^snr/8/pppppppp/8/8/8/+P+P+P+P+P+P+P+P/+RNBQ+K^BN+R / C/m

What is a Terminal Piece?

A Terminal Piece is a piece whose presence, condition, or capacity determines whether play can continue. In most games, this is the piece you must protect to avoid losing.

Game Terminal Piece
Chess King
Shōgi King (Ōshō/Gyokushō)
Xiangqi General
Xiongqi General

Terminal Pieces are marked with ^ in PIN/EPIN/QPI notation:

Important: The Game Protocol only encodes Terminal Status as an attribute. What happens when a Terminal Piece is threatened or captured is defined by the Rule System.


What is the difference between FEEN and FEN?

FEEN (Field Expression Encoding Notation) is an extension of the traditional FEN format with several key enhancements:

Feature Traditional FEN FEEN
Board dimensions 2D only Multi-dimensional (3D chess, etc.)
Game systems Western Chess only Some abstract strategy games
Captured pieces Not supported Native Hand representation
Piece states Limited Reasonable support via state modifiers
Cross-style games Not possible Explicit style encoding

Example comparison:

# Traditional FEN (Western Chess only)
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

# FEEN (same position, but extensible)
+rnbq+k^bn+r/+p+p+p+p+p+p+p+p/8/8/8/8/+P+P+P+P+P+P+P+P/+RNBQ+K^BN+R / C/c

# FEEN (Cross-style: Chess vs Makruk)
rnsmk^snr/8/pppppppp/8/8/8/+P+P+P+P+P+P+P+P/+RNBQ+K^BN+R / C/m

Learn more: FEEN specification


Notation Questions

What is the difference between PIN, EPIN, and QPI?

These three notations form a hierarchy, each building on the previous:

Notation Structure What it adds Example
PIN [±]letter[^] Base piece identifier K^, +P, r
EPIN [±]letter[^]['] Derivation marker (') K^', +P'
QPI sin:pin Explicit Piece Style C:K^, S:+P

PIN (Piece Identifier Notation) encodes:

EPIN (Extended PIN) adds:

QPI (Qualified Piece Identifier) adds:

When to use each:


What is the difference between SIN and SNN?

Both identify game styles, but serve different purposes:

Notation Format Purpose Example
SIN Single letter Compact, machine-friendly C, S, X
SNN PascalCase name Human-readable Chess, Shogi, Xiangqi

SIN (Style Identifier Notation):

SNN (Style Name Notation):

Mapping examples:

SIN SNN
C / c Chess
S / s Shogi
X / x Xiangqi
M / m Makruk

How does FEEN handle captured pieces?

FEEN uses the Hands field (the second of three fields) to represent captured pieces:

<piece-placement> <hands> <style-turn>

The Hands field has two parts separated by /:

Format: [count]<piece> where count is optional (omitted if 1).

Examples:

# Both hands empty
/

# First player has captured a pawn
P/

# Second player has captured a rook and two pawns
/2pr

# Both players have captures
BR/2pn

Important distinction:

Game type Captured pieces…
Chess, Xiangqi Must stay in Hand permanently (no drops) according to Rule System
Shōgi, Ōgi Can be dropped back onto the Board according to Rule System

The FEEN format is the same for both—the Rule System determines whether drops are legal.


Implementation Questions

How do I represent a move that includes both displacement and mutation?

Many game mechanics involve both moving a piece and changing its attributes. The Game Protocol handles this through Actions that can include both a Displacement and a Mutation.

Example 1: Pawn promotion (Chess)

A pawn moving to the last rank and promoting to queen:

Action: Displace P from e7 → e8, mutate P → Q

In this single Action:

Example 2: Castling (Chess)

Castling requires two Actions in one Move:

Action 1: Displace +K^ from e1 → g1, mutate +K^ → K^
Action 2: Displace +R from h1 → f1, mutate +R → R

Example 3: Capture with demotion (Shōgi)

When capturing a promoted piece in Ōgi:

Action 1: Displace +r from d5 → Hand(first), mutate +r → R
Action 2: Displace B from c4 → d5

The captured promoted rook (+r) changes side and reverts to unpromoted (R) when entering the Hand.

Example 4: Soldier crossing river (Xiongqi)

Action: Displace S from d4 → d5, mutate S → +S

The soldier gains enhanced state (+) upon crossing the river.


These represent three levels of move validation, from structural to fully rule-compliant:

Level What it checks Example violation
Protocol-Valid Structural invariants only Moving to an occupied square, Hand→Hand displacement
Pseudo-Legal + Movement patterns Rook moving diagonally, Pawn moving backward
Legal + All game rules Moving into check, castling through attack

Protocol-Valid Move:

A move that satisfies the Game Protocol’s structural requirements:

Pseudo-Legal Move:

A Protocol-Valid move that also respects basic movement patterns:

Legal Move:

A Pseudo-Legal move that also complies with all Rule System constraints:

Implementation tip: Most engines generate Pseudo-Legal moves first, then filter for legality. This is more efficient than checking full legality during generation.


How do I implement repetition detection?

Repetition rules vary by game, but the core mechanism is consistent:

1. Define Position Identity

A Position is typically identified by:

2. Track Position History

Maintain a history of all positions that have occurred in the match:

# Ruby example
position_history = Hash.new(0)

def record_position(feen_string)
  position_history[feen_string] += 1
end

def repetition?(feen_string, threshold = 3)
  position_history[feen_string] >= threshold
end

3. Apply Game-Specific Rules

Game Repetition rule
Chess Threefold repetition → draw (claimable)
Shōgi Fourfold repetition → loss for perpetual check, otherwise draw
Ōgi Same move to same position → loss
Xiongqi Same move to same position → loss

Note on FEEN: FEEN provides a canonical position representation suitable for hashing and equality checks. However, some games may require additional state (like move history for en passant) that isn’t captured in the FEEN string alone.


More questions will be added based on community feedback and common implementation challenges.