Skip to main content
Formal Specification

Mills / Nine Men's Morris — Formal Specification

Kosovo · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Cic-mic — AI-optimized specification ## General idea A deterministic, zero-sum two-player abstract strategy alignment game played on a 24-vertex graph of three concentric squares. Across three sequential phases (Placement, Adjacency Movement, and Flying), players aim to form straight 3-in-a-row alignments ("mills") to capture enemy pieces. The game ends in victory when an opponent is reduced to fewer than three pieces or is left with no legal moves. ## Formal model - **Board Graph:** G=(V,E) where |V|=24 vertices and |E|=32 undirected edges connecting concentric ring midpoints and corners. - **Mills Definition:** Exactly 16 predefined collinear triplets M⊂𝒫3(V) (8 horizontal, 8 vertical). - **Player counts:** 2 agents (P1,P2). - **Turn model:** Strictly alternating sequential turns. ## Formal rules R1. **Initial State:** Board V is empty (∀v∈V,state(v)=EMPTY). Unplaced piece reserves U1=9, U2=9. Active pieces on board B1=0, B2=0. Active player P=P1. R2. **Phase 1 (Placement):** While U1>0 or U2>0: - Active player P selects an empty vertex v∈V (state(v)=EMPTY). - state(v)←P, UP←UP−1, BP←BP+1. - If placing v forms one or more new mills m∈M such that m⊆{u∈V|state(u)=P}, P performs a mandatory capture action: remove one piece of opponent Popp from vertex w. - *Mill Protection:* Piece w cannot belong to any active opponent mill unless all pieces of Popp on board belong to mills. - Turn passes to Popp. R3. **Phase 2 (Movement):** When U1=0 and U2=0, while BP>3: - Active player P selects an origin vertex u with state(u)=P and a destination vertex v with state(v)=EMPTY such that (u,v)∈E. - state(u)←EMPTY, state(v)←P. - If this move closes a mill, P executes a mandatory capture following Rule R2 mill-protection rules. - Turn passes to Popp. R4. **Phase 3 (Flying):** When UP=0 and BP=3: - Active player P selects an origin vertex u with state(u)=P and any destination vertex v∈V with state(v)=EMPTY (regardless of edge adjacency (u,v)). - Movement and capture resolve per R3. R5. **Win Condition:** Player P wins immediately if at the start of opponent's turn: - Bopp<3 (opponent has fewer than 3 pieces remaining), or - Popp has no legal moves (in Phase 2, all pieces of Popp are adjacent only to occupied vertices). R6. **Draw Conditions:** [gap-fill] - *Threefold Repetition:* If the exact board state (vertex ownership, active player, unplaced counts) repeats three times with the same player to move, the game is declared a draw. - *Move Limit:* If 50 consecutive moves occur without any capture, the game is declared a draw. ## Edge cases - **Tie at the end condition:** Not applicable under standard play; draws only occur via the explicit loop-breaking rules in R6. - **A player with no legal move:** Handled explicitly by R5: if active player has BP≥3 in Phase 2 but has zero adjacent empty vertices, that player immediately loses the game. - **Repetition / cycles:** Folk rules are silent on perpetual back-and-forth mill reopening; [gap-fill] standard threefold repetition rule and 50-move no-capture draw counter (R6) prevent infinite cycles. - **Simultaneous claims on the same resource or position:** Not applicable; turns are strictly sequential and each vertex holds at most one piece. - **Player elimination mid-round / turn order repair:** Not applicable in a 2-agent game; reducing Bopp<3 instantly triggers the match win condition. - **Resource exhaustion:** Board vertices and piece counts are strictly finite (|V|=24, N=18). No piece re-entry occurs after capture. - **Termination guarantee:** The combination of finite pieces (18 total), monotonic piece reduction on captures, and the loop-breaking counters in R6 provably guarantees that every game tree branch terminates in finite steps. ## State representation - **Persistent state:** - `board`: Array of 24 elements ∈{EMPTY,P1,P2}. - `unplaced`: Tuple (U1,U2)∈[0,9]×[0,9]. - `piece_count`: Tuple (B1,B2)∈[0,9]×[0,9]. - `active_player`: P1 or P2. - `phase`: Enum {PLACEMENT,MOVEMENT,FLYING}. - `halfmove_clock`: Integer counter (resets on capture, triggers draw at 50). - `position_history`: Hash map of serialized states to repetition counts. - **Observable information:** Complete and perfect information for both agents. ## Action space - `place(v)`: parameter v∈{0,…,23}. Precondition: `phase == PLACEMENT` and `board[v] == EMPTY`. - `move(u, v)`: parameters u,v∈{0,…,23}. Precondition: `board[u] == active_player`, `board[v] == EMPTY`, and ((u,v)∈E or `phase == FLYING`). - `capture(w)`: parameter w∈{0,…,23}. Precondition: triggered immediately following a mill-closing action; `board[w] == opponent` and (`not in_mill(w)` or `all_opponent_in_mills()`). ## Playability notes - **Single-player-vs-AI:** Natural and direct. Well-suited for minimax with alpha-beta pruning or Monte Carlo Tree Search (MCTS). - **Group games (n>4):** Not applicable; inherently a 1v1 duel. - **Physical-skill games:** Not applicable; pure discrete combinatorial game. - **What is lost in the adaptation:** The sensory and social experience of carving boards on alpine rocks or participating in lively oda spectatorship. ## Implementation hints - Represent the 24 vertices as bitboards (three 8-bit masks corresponding to outer, middle, and inner squares) for microsecond mill-detection and move validation. - Average branching factor in Phase 1 is ~20; in Phase 2 is ~4–8; in Phase 3 rises to ~15. - First milestone: Implement board graph adjacency matrix, mill verification 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

Mills / Nine Men's Morris (Kosovo). (n.d.). Games of Countries. https://gamesofcountries.com/games/xk-kosovo/cic-mic

@misc{gamesofcountries-xk-kosovo-cic-mic,
  title = {Mills / Nine Men's Morris (Kosovo)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/xk-kosovo/cic-mic}
}