Skip to main content
Formal Specification

Mongolian alignment game (Jirgee / Nine Men's Morris variant) — Formal Specification

Mongolia · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Jirig — AI-optimized specification ## General idea A deterministic 2-player alignment and mill board game played on a graph of three concentric squares (24 vertices). The game features three distinct phases: Phase 1 (placing pieces one-by-one to form 3-in-a-row mills and capture enemy pieces); Phase 2 (sliding pieces along adjacent grid lines); and Phase 3 ("flying", where a player reduced to 3 pieces may jump to any empty vertex). ## Formal model - **Abstraction taken:** Direct graph formalization on a 24-vertex graph `G = (V, E)` with 16 predefined collinear 3-in-a-row mill subsets `M = {m_1, ..., m_16}`. - **Player/agent count:** 2 agents: White (9 pieces) and Black (9 pieces). - **Turn model:** Strictly alternating sequential turns; White moves first. ## Formal rules R1. Setup: The 24 vertices of the concentric squares graph are empty. Each agent has an initial reserve of 9 unplaced pieces. R2. Phase 1 — Drop phase: - On their turn, an agent places 1 piece from their reserve onto any unoccupied vertex `v in V`. - If this placement completes a 3-in-a-row mill (`exists m in M: m subset PiecePositions(active)`), the agent must immediately select and remove 1 enemy piece from the board. - [gap-fill] Removal restriction: The agent must select an enemy piece that is NOT part of an existing enemy mill, unless all active enemy pieces are in mills. - The drop phase continues until both agents have placed all 9 pieces (18 total turns). R3. Phase 2 — Shift phase: - Agents alternate moving 1 of their pieces along an edge `(u, v) in E` to an adjacent empty vertex `v`. - If the shift creates a new 3-in-a-row mill, the agent removes 1 enemy piece following the R2 removal restriction. - An agent may shift out of a mill on one turn and back in on a subsequent turn to form a new mill and trigger another capture. R4. Phase 3 — Fly phase: - When an agent has exactly 3 pieces remaining on the board, their movement constraint relaxes: that agent may move any of their pieces to ANY unoccupied vertex on the board (flying / teleporting). R5. Win conditions: - An agent wins if they reduce the opponent's active pieces on the board to exactly 2 (since 2 pieces can never form a mill). - An agent wins if the opponent has no legal move on their turn during Phase 2. R6. [gap-fill] Repetition draw: If identical board states (positions of all pieces and phase state) repeat 3 times, or if 50 consecutive moves occur without a piece capture, the game is declared a draw. ## Edge cases - Tie at the end condition: Resolved via R6 threefold repetition or 50-move captureless cap. - A player with no legal move: If an agent cannot move any piece on their turn in Phase 2, they lose immediately under R5. - Repetition / cycles: Bounded by R6 threefold repetition draw rule. - Simultaneous claims on the same resource: Not applicable — turns are strictly sequential. - Player elimination mid-round: Not applicable — 2-player game. - Resource exhaustion: Piece capture monotonic reduction terminates the game when count drops to 2. - Termination guarantee: Provably terminates via piece reduction down to 2 or the R6 repetition/move-cap breaker. ## State representation - Persistent state: `board_state` (24-element array in `{EMPTY, WHITE, BLACK}`), `unplaced_pieces` (map of Agent -> integer, 0..9), `pieces_on_board` (map of Agent -> integer, 2..9), `active_agent` (`WHITE` | `BLACK`), `game_phase` (`DROP` | `SHIFT` | `FLY`), `state_history_hashes`. - Per-turn ephemeral state: Action type (`PLACE`, `MOVE`, `FLY`), source vertex, destination vertex, captured piece vertex. - Observable information: Fully observable — zero hidden information. ## Action space - `place_piece(to_vertex)`: Legal during Drop Phase (`unplaced_pieces > 0`), requires `to_vertex == EMPTY`. - `move_piece(from_vertex, to_vertex)`: Legal during Shift Phase, requires `(from, to) in E` and `to_vertex == EMPTY`. - `fly_piece(from_vertex, to_vertex)`: Legal during Fly Phase (`pieces_on_board == 3`), requires `to_vertex == EMPTY`. - `capture_piece(target_vertex)`: Sub-action triggered when a mill is formed. ## Playability notes - Single-player-vs-AI: Natural — direct minimax / MCTS search on the 24-vertex mill graph. - Group games (n>4): Not applicable — 2-player abstract duel. - Physical-skill games: Deterministic strategy. - What is lost in the adaptation: None — exact formalization of the classical Nine Men's Morris / Jirig game. ## Implementation hints Represent the 24 vertices as bitboards (24-bit integers). Mills are represented as a precomputed bitmask array of 16 integers (each having 3 bits set). Mill checking is a single bitwise AND operation: `(player_bb & mill_mask) == mill_mask`. Milestone 1: implement drop, shift, and mill detection; Milestone 2: implement flying phase and alpha-beta search.

Download as JSON

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

Download JSON
Cite this page

Mongolian alignment game (Jirgee / Nine Men's Morris variant) (Mongolia). (n.d.). Games of Countries. https://gamesofcountries.com/games/mn-mongolia/jirig

@misc{gamesofcountries-mn-mongolia-jirig,
  title = {Mongolian alignment game (Jirgee / Nine Men's Morris variant) (Mongolia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/mn-mongolia/jirig}
}