Formal Specification
The Mill (Belarusian Nine Men's Morris) — Formal Specification
Belarus · board-abstract · Confidence: medium
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 0
# Mlyn (Млын) — AI-optimized specification
## General idea
A classical two-player abstract alignment board game played on a 24-point grid of three concentric squares linked at side midpoints. Players place and slide nine pieces to construct three-in-a-row "mills", capturing opponent pieces upon each mill formation until an opponent is reduced to two pieces or immobilized.
## Formal model
- **Abstraction taken:** Direct representation as an undirected graph with vertices and edges, containing 16 collinear triples (mills).
- **Player/agent count:** 2 agents ().
- **Turn model:** Strictly alternating sequential turns ().
## Formal rules
R1. Board & Piece Setup:
- Graph with 24 vertices is initially empty.
- Each player holds an unplaced piece inventory and on-board piece set .
R2. Phase 1 — Drop Phase (while or ):
- Active player selects an empty vertex and executes `place_piece(v)`.
- decrements by 1; is added to .
- If completes a mill (a collinear 3-in-a-row in ), executes `capture_piece(u)` (R4).
- Phase 1 ends when .
R3. Phase 2 & 3 — Movement & Flying Phase:
- If (Phase 2): Active player selects and adjacent vacant vertex with , executing `slide_piece(u, v)`.
- If (Phase 3 — Flying): Active player selects and *any* vacant vertex , executing `fly_piece(u, v)`.
- If the move forms a new mill (or re-closes an opened mill), executes `capture_piece(u)` (R4).
R4. Capture Resolution:
- selects an opponent piece and removes it from the board.
- **Mill Protection Constraint:** cannot be part of an opponent mill unless *all* pieces in are currently in mills.
R5. Win, Loss, and Draw Conditions:
- **Loss by Reduction:** If during Phase 2/3 , player immediately loses; wins.
- **Loss by Blockade:** If on player 's turn during Phase 2, has no legal moves (all pieces blocked), immediately loses; wins.
- **Draw by Repetition:** If the identical full board position and turn state occurs for the 3rd time, the game terminates in a draw.
- **Draw by Inaction:** If 50 consecutive plies (25 full rounds) pass without any capture, the game terminates in a draw.
## Edge cases
- Tie at the end condition: Handled explicitly by R5 (3-fold repetition or 50-move rule results in a draw; win/loss is otherwise decisive).
- A player with no legal move: Handled by R5 (Loss by Blockade).
- Repetition / cycles: Bounded by mandatory 3-fold repetition draw and 50-move capture counter.
- Simultaneous claims on the same position: Not applicable; strictly sequential turns on discrete graph vertices.
- Elimination mid-round and turn-order repair: Captured pieces are removed from the board; turn order alternates between the two players without skipping.
- Resource exhaustion: Drop phase terminates deterministically after exactly 18 plies when hand inventories reach 0.
- Termination guarantee: The combination of the 50-move no-capture counter and the 3-fold repetition rule bounds total game length to a finite number of plies, guaranteeing deterministic termination.
## State representation
- Persistent state:
- `board`: Map of vertex ID .
- `hand`: Map of player ID integer unplaced count .
- `active_player`: ID .
- `ply_count_since_capture`: Integer .
- `position_history`: Frequency table of board hash states.
- Ephemeral state:
- `pending_capture`: Boolean indicating whether active player must submit a capture action before turn ends.
- Observable information: Perfect information; complete board state is fully observable to both players.
## Action space
- `place_piece(vertex)`: Place unplaced piece on empty vertex (precondition: Phase 1, `hand[active] > 0`).
- `slide_piece(from_vertex, to_vertex)`: Slide piece along edge to vacant vertex (precondition: Phase 2, adjacent edge).
- `fly_piece(from_vertex, to_vertex)`: Jump piece to any vacant vertex (precondition: Phase 3, ).
- `capture_piece(target_vertex)`: Remove eligible opponent piece (precondition: mill formed on current ply).
## Playability notes
- Single-player-vs-AI: Perfect domain for alpha-beta minimax or MCTS engines.
- Group reduction: Already a native 2-agent zero-sum game.
- Physical-skill games: Purely strategic board game with no physical dexterity elements.
- What is lost: Tactile handling of smooth river stones and wooden carving aesthetics.
## Implementation hints
Represent the 24 vertices as bitboards (three 8-bit rings) or a flat graph with precomputed mill bitmasks (16 bitmasks of 3 vertices). First milestone: implement drop phase and mill-detection bitwise checks before adding movement and flying transitions.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
The Mill (Belarusian Nine Men's Morris) (Belarus). (n.d.). Games of Countries. https://gamesofcountries.com/games/by-belarus/mlyn
@misc{gamesofcountries-by-belarus-mlyn,
title = {The Mill (Belarusian Nine Men's Morris) (Belarus)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/by-belarus/mlyn}
}