Skip to main content
Formal Specification

Nine Men's Morris (Nine Stones) — Formal Specification

Albania · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 1
# Gur nëntsh — AI-optimized specification ## General idea A classical two-player deterministic abstract strategy board game played on a 24-vertex graph. Players progress through a placement phase, an adjacent-sliding movement phase, and an endgame flying phase. Forming collinear 3-in-a-row alignments ("mills") grants piece captures. ## Formal model - **Abstraction taken:** Board is represented directly as an undirected graph `G = (V, E)` with `|V| = 24` vertices and `|E| = 32` edges, plus an explicit list of 16 collinear triples `M` representing valid mills. - **Player/agent count:** 2 agents (`P1`, `P2`). - **Turn model:** Strictly alternating sequential turns. ## Formal rules R1. Board Graph: Vertices indexed `0..23` corresponding to outer (0..7), middle (8..15), and inner (16..23) square perimeters. R2. Phase 1 (Drop Phase): - Each player holds 9 pieces in reserve. - On turn, active player places 1 piece from hand onto any `EMPTY` vertex. - If placement forms a new mill in `M`: Active player executes `capture(v)` on an opponent's piece. The captured piece cannot belong to an active opponent mill unless all opponent pieces are in mills. - Phase 1 ends after exactly 18 total placements (9 per player). R3. Phase 2 (Slide Phase): - On turn, active player selects a piece at vertex `u` and moves it along an edge `(u, v) ∈ E` to an `EMPTY` vertex `v`. - If move forms a mill in `M`: Active player executes `capture(v)` under standard capture rules. R4. Phase 3 (Fly Phase): - When an active player has exactly 3 remaining pieces on the board, they may move their piece from vertex `u` to *any* `EMPTY` vertex `v ∈ V` (ignoring edge connectivity). R5. Loss Conditions: - A player loses immediately if they have fewer than 3 pieces remaining on the board. - A player loses immediately if it is their turn and they have no legal moves (stalemate loss). R6. Draw Conditions [gap-fill: standard chess/morris repetition and move limits]: - Threefold repetition of the identical board position and active player. - 50 consecutive moves without a mill formation or piece capture. ## Edge cases - Tie at the end condition: Governed by R6 (threefold repetition or 50-move rule yields a formal draw). - A player with no legal move: Governed by R5 (stalemated player loses immediately). - Repetition / cycles: Bounded by R6 threefold repetition check and the 50-move rule. - Simultaneous claims on the same resource or position: Not applicable; turns are strictly sequential. - Player elimination mid-round; turn order repair: Not applicable; game ends immediately when a player drops to 2 pieces. - Resource exhaustion (pieces, tokens, space, time): Exactly 18 pieces exist across both players. - Termination guarantee: why the game provably ends: Guaranteed because the state space is finite, piece reductions are irreversible, and R6 strictly truncates cycles. ## State representation - Persistent state: `board: array[24] of {EMPTY, P1, P2}`, `unplaced_pieces: array[2] of int`, `active_player: {P1, P2}`, `halfmove_clock: int`, `position_history: map[BoardHash -> int]`. - Per-turn ephemeral state: `mill_formed_this_turn: bool`. - Observable information: Fully observable by both agents at all times. ## Action space - `place(vertex: int)`: Legal during Phase 1 (`board[vertex] == EMPTY`). - `slide(from_v: int, to_v: int)`: Legal during Phase 2 (`(from_v, to_v) ∈ E`, `board[to_v] == EMPTY`). - `fly(from_v: int, to_v: int)`: Legal during Phase 3 (`board[to_v] == EMPTY`). - `capture(target_vertex: int)`: Executed immediately after a mill-forming action. ## Playability notes - Single-player-vs-AI: Natural and direct; engine-ready for Minimax / Alpha-Beta or MCTS. - Group games (n>4): Not applicable; strictly a 2-player zero-sum abstract. - Physical-skill games: Not applicable; pure combinatoric strategy. - What is lost in the adaptation: None; the spec is mathematically identical to the traditional board game. ## Implementation hints Standard graph representation with bitboard optimization. Branching factor is approx. 18 in Phase 1, and 4–10 in Phase 2. First milestone: Implement board graph, mill detection bitmasks, and valid move generator.

Download as JSON

Download the full game corpus entry for this game as structured JSON.

Download JSON
Cite this page

Nine Men's Morris (Nine Stones) (Albania). (n.d.). Games of Countries. https://gamesofcountries.com/games/al-albania/gurnentsh

@misc{gamesofcountries-al-albania-gurnentsh,
  title = {Nine Men's Morris (Nine Stones) (Albania)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/al-albania/gurnentsh}
}