Skip to main content
Formal Specification

Libyan Mancala Sowing Game — Formal Specification

Libya · board-abstract · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 1
# Manqala Libiya — AI-optimized specification ## General idea A deterministic two-row mancala sowing game played on 12 pits with 48 counters. Players sow pebbles counter-clockwise in multi-lap cascades. When sowing terminates in an empty pit on the opponent's side, the final counter and all opposing counters in the facing pit are captured into the player's store. ## Formal model - **Abstraction taken:** Direct discrete formalization on a 12-pit circular buffer `Pits[0..11]` with stores `Store_0` and `Store_1`. Player 0 owns `Pits[0..5]`; Player 1 owns `Pits[6..11]`. - **Player/agent count:** 2 players (0 and 1). - **Turn model:** Sequential alternating turns. ## Formal rules R1. Setup: `Pits[i] = 4` for all `i in [0..11]`. `Store_0 = 0`, `Store_1 = 0`. Total counters = 48. R2. Turn Selection: Active player `p` selects a non-empty home pit `k in HomePits(p)`. R3. Sowing Execution (Multi-Lap): - Scoop all `m = Pits[k]` counters; set `Pits[k] = 0`. - Distribute counters 1-by-1 counter-clockwise into subsequent pits `(k + 1) mod 12, (k + 2) mod 12, ...`. - Let `last_pit` be where the final counter is deposited. - If `Pits[last_pit] > 1` (was occupied before the drop), scoop all counters from `last_pit` and continue sowing. - Sowing halts when `Pits[last_pit] == 1` (lands in an empty pit). R4. Capture Condition: - If `last_pit in OpponentPits(p)` AND `Pits[Opposite(last_pit)] > 0`: - `Store_p += 1 + Pits[Opposite(last_pit)]`. - `Pits[last_pit] = 0`, `Pits[Opposite(last_pit)] = 0`. R5. Starvation Obligation: If opponent's home pits are all empty (`sum(Pits[opp]) == 0`), player must choose a move that sows counters into the opponent's row if available. R6. Win Condition: When no legal sowing moves exist, remaining board counters are awarded to their respective row owners. The player with `Store_p > 24` wins. ## Edge cases - Tie at the end condition: If both players store exactly 24 counters, the game is a draw. - A player with no legal move: Triggers game end; remaining board counters are swept to their row owners. - Repetition / cycles: [gap-fill] If 40 consecutive single-counter turns occur without any capture, remaining pieces are claimed by row owners and game terminates. - Simultaneous claims on the same resource or position: Sequential turn execution prevents collision. - Player elimination mid-round; turn order repair: 2-player game ends cleanly. - Resource exhaustion: Exactly 48 counters conserved across pits and stores. - Termination guarantee: Enforced by monotonic counter reduction via stores and finite pit states. ## State representation - Persistent state: `pits: Array[12][int]`, `stores: Array[2][int]`, `active_player: int in {0, 1}`, `no_capture_turns: int`. - Ephemeral state: `active_sowing_hand: int`, `current_pit_index: int`. - Observability: Complete, perfect information. ## Action space - `sow_pit(pit_index)` where `pit_index in HomePits(active_player)` and `pits[pit_index] > 0`. ## Playability notes - Single-player-vs-AI: Engine-ready; standard Alpha-Beta Minimax with evaluation based on store advantage and forward mobility. - Group games (n>4): Strictly 2-player. - Physical-skill games: Pure combinatorial arithmetic. - What is lost: The soothing rhythmic clatter of smooth limestone pebbles dropping into palm-wood troughs. ## Implementation hints 12-element 1D array with modulo arithmetic. First milestone: implement multi-lap sowing loop and opposite-pit capture logic before adding Minimax search.

Download as JSON

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

Download JSON
Cite this page

Libyan Mancala Sowing Game (Libya). (n.d.). Games of Countries. https://gamesofcountries.com/games/ly-libya/manqala-libya

@misc{gamesofcountries-ly-libya-manqala-libya,
  title = {Libyan Mancala Sowing Game (Libya)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ly-libya/manqala-libya}
}