Skip to main content
Formal Specification

Nine Men's Morris (Slovenian Mill) — Formal Specification

Slovenia · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 1
# Mlin — AI-optimized specification ## General idea A deterministic zero-sum abstract strategy board game played on a 24-vertex planar graph of three concentric squares. Two agents alternate placing and shifting 9 tokens each to form linear triplets (mills), which trigger the removal of an eligible opponent token, culminating in a flying phase when an agent is reduced to 3 tokens. ## Formal model - **Abstraction taken:** None required; the traditional game constitutes a fully discrete, complete graph-based mathematical system. - **Player/agent count:** 2 agents (A1,A2). - **Turn model:** Strictly sequential alternating turns. ## Formal rules R1. Graph & Piece State: - Board graph G=(V,E) with |V|=24 vertices and 32 undirected edges. - Set of 16 predefined linear triplets ℳ={m1,…,m16}⊂V3 forming valid mills. - Token inventories initialized: U1=9,U2=9 unplaced pieces. Board occupancy state b:V→{0,1,2}. R2. Phase 1 — Placement: - While U1>0 or U2>0, active agent Ai selects empty vertex v∈V (b(v)==0). - b(v)←i, Ui←Ui−1. - If vertex v completes a mill m∈ℳ where ∀u∈m,b(u)==i: - Agent Ai executes `remove_piece(w)` on opponent vertex w (b(w)==3−i). - Constraint: w CANNOT be part of an opponent mill unless ALL opponent pieces on board belong to mills. R3. Phase 2 — Shifting: - When U1==0 and U2==0, active agent Ai holding ≥4 pieces selects piece at u (b(u)==i) and moves to adjacent empty vertex v ((u,v)∈E and b(v)==0). - b(u)←0,b(v)←i. - If move completes a mill, agent executes `remove_piece(w)` under R2 constraints. R4. Phase 3 — Flying: - If active agent Ai has exactly |Vi|=3 pieces on the board, Ai may move any piece u to ANY empty vertex v∈V (b(v)==0), ignoring edge adjacency. - Mill formation and capture follow standard rules. R5. Terminal Win / Loss Conditions: - Agent Ai LOSES immediately if: 1. |Vi|<3 (fewer than 3 pieces remain). 2. It is Ai's turn to move and Ai has no legal moves (all pieces blocked). R6. Draw Resolution: - [gap-fill] The game is a DRAW if: 1. Threefold repetition of the identical board state and active player occurs. 2. 50 consecutive moves occur without a mill formation or piece capture. ## Edge cases - Tie at the end condition: Resolved via R6 (threefold repetition or 50-move rule yields a draw). - A player with no legal move: Explicitly defined as a LOSS for the immobilized player under R5. - Repetition / cycles: Bounded by R6's 50-move rule and threefold repetition checks. - Simultaneous claims on the same resource or position: Turns are strictly sequential; vertices hold at most one token. - Player elimination mid-round; turn order repair: Not applicable (2-agent zero-sum game; loss ends match). - Resource exhaustion: Exactly 18 tokens exist in total; piece count strictly non-increasing in Phase 2/3. - Termination guarantee: Enforced deterministically by R6 (50-move draw cap and threefold repetition). ## State representation - Persistent state: `board: list[int]` (length 24), `unplaced_pieces: tuple[int, int]`, `active_agent: int`, `move_count_no_capture: int`, `position_history: dict[str, int]`. - Ephemeral turn state: `formed_mill: bool`, `pending_capture: bool`. - Observable information: Fully observable (complete information board game). ## Action space - `place_piece(vertex_id: int)`: Phase 1 action (v∈[0,23]). - `move_piece(from_vertex: int, to_vertex: int)`: Phase 2/3 action. - `remove_piece(vertex_id: int)`: Capture action upon forming mill. ## Playability notes - Single-player-vs-AI: Engine-ready; solved game for standard Nine Men's Morris, compatible with Minimax / Alpha-Beta pruning. - Group games (n>4): Strictly a 2-agent duel. - Physical-skill games: Not applicable (discrete abstract strategy). - What is lost: Tactile click of wooden tokens on carved board. ## Implementation hints Graph-based state representation with bitboards or arrays of length 24. First milestone: implement board graph, mill detection bitmasks, and Phase 1 placement before adding Phase 2 adjacency transitions.

Download as JSON

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

Download JSON
Cite this page

Nine Men's Morris (Slovenian Mill) (Slovenia). (n.d.). Games of Countries. https://gamesofcountries.com/games/si-slovenia/mlin

@misc{gamesofcountries-si-slovenia-mlin,
  title = {Nine Men's Morris (Slovenian Mill) (Slovenia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/si-slovenia/mlin}
}