Skip to main content
Formal Specification

Persian Morris Alignment — Formal Specification

Iran · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 1
# Doz-Bazi — AI-optimized specification ## General idea A deterministic 2-player abstract alignment game on a graph of 24 vertices (concentric squares with orthogonal connectors). The game features a 2-stage lifecycle (Placement -> Movement) with an asymmetric "flying" endgame mechanic, where forming 3-in-a-row mills removes opponent material. ## Formal model - **Abstraction taken:** Direct graph representation `G = (V, E)` where `|V| = 24` points of intersection and `E` represents legal orthogonal sliding edges between adjacent points. Full discrete deterministic state machine. - **Player/agent count:** 2 agents (Player 0 = Light, Player 1 = Dark). - **Turn model:** Sequential alternating turns. ## Formal rules R1. Board Graph Topology: - `V = {0..23}` (concentric rings: Outer 0..7, Middle 8..15, Inner 16..23). - `E` connects adjacent points along concentric squares and midpoints between rings. - Mill lines `M`: 16 predefined 3-vertex linear subsets of `V`. R2. Phase 1: Placement Phase: - Unplaced inventory: `hand_pieces[0] = 9`, `hand_pieces[1] = 9`. - Active player places 1 piece on any vertex `v ∈ V` where `board[v] == EMPTY`. - `hand_pieces[player] -= 1`. - If placement forms a new mill `m ∈ M`: Active player enters sub-turn to execute `capture(v_target)`. - Once both players exhaust hand pieces (`hand_pieces = (0,0)`), transition to Phase 2. R3. Phase 2: Movement Phase: - Active player selects friendly piece at `v_from` and moves to `v_to`: - If `active_pieces[player] > 3`: `(v_from, v_to) ∈ E` and `board[v_to] == EMPTY`. - If `active_pieces[player] == 3` (Flying Phase): `v_to ∈ V` where `board[v_to] == EMPTY` (any vacant vertex). - If move forms a mill `m ∈ M`: Active player executes `capture(v_target)`. R4. Capture Constraints: - `board[v_target] == opponent_id`. - `v_target` must NOT be part of an opponent mill, unless ALL active opponent pieces are currently in mills. - Captured piece is removed from board: `board[v_target] = EMPTY`, `active_pieces[opponent] -= 1`. R5. Win and Draw Conditions: - **Win Condition 1:** Opponent active pieces reduced to `< 3`. - **Win Condition 2:** Opponent has no legal moves on their turn (stalemate). - **Draw Condition:** Threefold repetition of identical board state, or 50 consecutive moves without a capture. [gap-fill] ## Edge cases - **Tie at the end condition:** Draw triggers on threefold state repetition or 50 non-capture moves. - **A player with no legal move:** If a player has no legal moves during Phase 2, they lose immediately by stalemate (R5). - **Repetition / cycles:** Enforced threefold repetition rule prevents infinite piece-shuffling loops. - **Simultaneous claims on the same vertex:** Not applicable; strictly sequential turns. - **Player elimination mid-round:** When reduced to 2 pieces, game terminates immediately. - **Resource exhaustion:** Hand pieces are strictly finite (9 each); phase transition is deterministic. - **Termination guarantee:** Guaranteed by the 50-move non-capture rule and finite piece elimination. ## State representation - **Persistent state:** - `board: Array[24] of int` (-1 for EMPTY, 0 for Player 0, 1 for Player 1). - `hand_pieces: Tuple[int, int]`. - `active_pieces: Tuple[int, int]`. - `current_player: int` (0 or 1). - `phase: enum {PLACEMENT, MOVEMENT}`. - `pending_capture: bool`. - `move_history: List[int]`. - `non_capture_ply_count: int`. - **Information set:** Perfect information, fully observable. ## Action space - `place(vertex: int)`: Precondition: `phase == PLACEMENT`, `!pending_capture`, `board[vertex] == EMPTY`. - `move(from_vertex: int, to_vertex: int)`: Precondition: `phase == MOVEMENT`, `!pending_capture`, `board[from_vertex] == current_player`, `board[to_vertex] == EMPTY`, valid adjacency or flying rule. - `capture(target_vertex: int)`: Precondition: `pending_capture == true`, `board[target_vertex] == opponent`, valid target per R4. ## Playability notes - **Single-player-vs-AI:** Excellent fit for Alpha-Beta Minimax or Monte Carlo Tree Search (MCTS) with mill-formation evaluation heuristics. - **Group games:** Strictly 2-player zero-sum abstract. - **Physical-skill model:** None (pure abstract strategy). - **What is lost:** Physical tactility of handling polished river stones. ## Implementation hints Graph `(V, E)` can be represented as an adjacency bitboard or integer array of length 24. Precompute the 16 mill lines for instant O(1) bitmask mill detection upon every move.

Download as JSON

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

Download JSON
Cite this page

Persian Morris Alignment (Iran). (n.d.). Games of Countries. https://gamesofcountries.com/games/ir-iran/doz-bazi

@misc{gamesofcountries-ir-iran-doz-bazi,
  title = {Persian Morris Alignment (Iran)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ir-iran/doz-bazi}
}