Formal Specification
Omani Four-Row Mancala — Formal Specification
Oman · board-abstract · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 1
# Al-Hawalis — AI-optimized specification
## General idea
A 2-player deterministic four-row mancala game with continuous relay sowing and cross-row frontal capture mechanics. Players circulate counters in private 14-hole loops (inner and outer rows), triggering multi-lap cascades to land in empty inner holes that sweep opponent columns.
## Formal model
- **Abstraction taken:** Direct discrete state representation `board: Array[4][7] of int`. Full deterministic zero-sum state machine.
- **Player/agent count:** 2 agents (Player 0 owns rows 0-1; Player 1 owns rows 2-3).
- **Turn model:** Sequential alternating turns with deterministic multi-lap relay loops.
## Formal rules
R1. Board Initialization:
- Rows `0..3`, Columns `0..6`.
- Player 0 territory: Row 0 (Outer), Row 1 (Inner). Loop order: `(0,0)->(0,6) -> (1,6)->(1,0)`.
- Player 1 territory: Row 2 (Inner), Row 3 (Outer). Loop order: `(2,6)->(2,0) -> (3,0)->(3,6)`.
- `board[r][c] = 2` for all 28 holes (56 counters total).
R2. Legal Turn Selection:
- Active player chooses hole `(r, c)` within their territory where `board[r][c] >= 2`.
R3. Relay Sowing Execution:
- Pick up all counters `K = board[r][c]`, set `board[r][c] = 0`.
- Sow 1 counter per hole advancing along player's private loop.
- If last counter lands in hole `(r_last, c_last)` where `board[r_last][c_last] > 1`:
- Relay continues: Pick up all counters from `(r_last, c_last)` and continue sowing.
- Sowing ends when last counter lands in an empty hole (`board[r_last][c_last] == 1`).
R4. Capture Mechanism (*Al-Kans*):
- If sowing ends in an inner-row hole (`r_last == 1` for P0, `r_last == 2` for P1):
- Corresponding opponent inner hole `opp_inner = (2, c_last)` (for P0) or `(1, c_last)` (for P1).
- Corresponding opponent outer hole `opp_outer = (3, c_last)` (for P0) or `(0, c_last)` (for P1).
- If `board[opp_inner] > 0`:
- Captured count: `board[opp_inner] + board[opp_outer]`.
- `board[opp_inner] = 0`, `board[opp_outer] = 0`.
- `captured_pieces[player] += captured_count`.
R5. Win and Draw Conditions:
- **Win Condition 1:** All opponent pieces captured.
- **Win Condition 2:** Opponent has no hole with `>= 2` counters (immobilized).
- **Draw Condition:** 50 consecutive non-capture plies. [gap-fill]
## Edge cases
- **Tie at the end condition:** Draw triggers on 50 non-capture plies.
- **A player with no legal move:** Player with no hole holding `>= 2` counters loses immediately by immobilization.
- **Repetition / cycles:** Multi-lap relay is strictly finite per turn because each loop consumes total available counters.
- **Simultaneous claims on holes:** Not applicable; strictly sequential turns.
- **Player elimination mid-round:** Complete counter loss terminates match immediately.
- **Resource exhaustion:** 56 finite counters; captures monotonically reduce board material.
- **Termination guarantee:** Guaranteed by 50-move non-capture rule and monotonic material reduction.
## State representation
- **Persistent state:**
- `board: Array[4][7] of int`.
- `captured_pieces: Tuple[int, int]`.
- `current_player: int` (0 or 1).
- `non_capture_ply_count: int`.
- **Information set:** Perfect information, fully observable.
## Action space
- `sow(row: int, col: int)`: Precondition: hole in player territory with `board[row][col] >= 2`.
## Playability notes
- **Single-player-vs-AI:** Excellent fit for Alpha-Beta search or MCTS with deep capture-chain heuristics.
- **Group games:** Strictly 2-player zero-sum abstract.
- **Physical-skill model:** None (pure combinatorial calculation).
- **What is lost:** Tactile sea-shell handling and coffee-house social ambience.
## Implementation hints
Precompute the 14-hole looping index arrays for Player 0 and Player 1 to execute relay sowing in tight loops.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Omani Four-Row Mancala (Oman). (n.d.). Games of Countries. https://gamesofcountries.com/games/om-oman/al-hawalis
@misc{gamesofcountries-om-oman-al-hawalis,
title = {Omani Four-Row Mancala (Oman)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/om-oman/al-hawalis}
}