Skip to main content
Formal Specification

Comorian Four-Row Mancala — Formal Specification

Comoros · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 3
# Mraha wa Bari — AI-optimized specification > **Reconstructed source.** The entry carries a provenance warning: its rules were written from > general knowledge, not read from the two works it cites (CNDRS; UNESCO Database). ## General idea The premier traditional four-row mancala board game of the Comoros archipelago (practiced on Ngazidja, Ndzuwani, and Mwali). Played on a 4x8 grid (or 4x10) of coral sand depressions or carved wooden boards with 64 seeds (*kori* or *tsindzo*), each player commands two rows (front and back) forming a private 16-hole circuit. Players lift seeds from any hole on their side containing 2 or more seeds and sow counter-clockwise. Landing in an occupied front-row hole opposite occupied enemy front holes captures all seeds in the opponent's front and rear holes. Crucially, **captured seeds are immediately re-sown into the captor's own territory in continuation**. Because captured seeds never leave the board, the total count of 64 seeds is strictly conserved, resulting in long tactical matches without monotone resource drain. ## Formal model - **Abstraction taken:** None. Discrete 4x8 grid topology, deterministic relay sowing, perfect information. - **Player/agent count:** Exactly 2 players, seated on opposite rows. - **Turn model:** Alternating sequential turns; each move initiates a counter-clockwise relay sowing sequence. ## Formal rules R1. Setup (entry §1, §2): a board of **4 rows of 8 holes** (32 holes total), 2 rows per player, initialized with **2 seeds per hole** (64 seeds total). R2. Sowing (entry §3): the active player lifts all seeds from an occupied hole on their side containing **2 or more seeds** and sows them 1 seed per hole in a **counter-clockwise direction** around their private 16-hole circuit. R3. Relay continuation (entry §3): if the last sown seed lands in an already occupied hole, sowing continues as long as pieces accumulate. R4. Dual-row capture (entry §4): if the last seed lands in an occupied hole in the player's **front (inner) row**, AND the opponent's directly opposite front-row hole is occupied, the player captures all seeds from the opponent's opposite front hole (and also from the back hole behind it, if occupied). R5. Immediate re-sowing (entry §5): captured seeds are **immediately re-sown into the player's own rows in continuation**, extending the active turn. R6. Win condition (entry §6): a player who has **no hole containing 2 or more seeds** loses the game immediately. R7. Singletons: [gap-fill: holes with exactly 1 seed cannot be lifted to initiate a turn per R2, and remain passive until another seed lands in them]. R8. Capture re-sowing start point: [gap-fill: the entry does not specify the precise hole from which captured seeds begin re-sowing; continuing from the capture-triggering front hole is standard]. R9. Sowing direction invariance: [gap-fill: counter-clockwise sowing is fixed invariant for all laps and players]. ## Edge cases - Tie at the end: not applicable; the entry defines only a decisive loss by immobilization (R6) and no draw or score-based tiebreak. - A player with no legal move: explicitly addressed as a loss condition in R6 (having no hole with >= 2 seeds). - Repetition / cycles: unaddressed; because seeds are continuously re-sown and conserved at 64 total pieces, infinite cyclic board states can occur without formal repetition limits. - Simultaneous claims on one position: not applicable; strictly alternating sequential turns in disjoint 16-hole private circuits. - Elimination mid-round and turn-order repair: seeds change territorial control upon capture (R4, R5), but players remain active; strict 2-player alternation is invariant. - Resource exhaustion: **no seeds are ever exhausted**. All 64 seeds remain in continuous circulation between the two players, with no banking or removal. - Termination guarantee: **not guaranteed.** Because total seed count is strictly conserved at 64, seeds are recycled via re-sowing (R5), and no repetition rule or turn ceiling is defined, games can loop indefinitely. ## State representation - Persistent state: `board[4][8]` ∈ {0..64} where sum is 64, `active_player` ∈ {0, 1}. - Per-turn ephemeral state: `current_hole`, `hand_seeds`, `laps_in_turn`. - Observable information: fully observable, perfect information. ## Action space - `sow(hole_coord)`: active player selects a hole on their side with `seeds >= 2` to begin counter-clockwise relay sowing (R2). Subsequent laps, dual-row captures (R4), and re-sowings (R5) resolve deterministically. ## Playability notes - Single-player-vs-AI: demanding and rich combinatorial search problem; evaluation must account for the dynamic influx of captured seeds back into one's own circuit. - Reducing n > 4 to 2 agents: not applicable; inherently two-player. - Physical-skill games: not applicable; pure abstract board game. - What is lost: the Indian Ocean maritime Swahili cultural heritage, coral sand hollow textures, and oral proverbs exchanged during play in Ngazidja villages. ## Implementation hints Map the board as two 16-hole loops: Player 0 inner row `[0..7]` and outer row `[8..15]`; Player 1 inner row `[0..7]` and outer row `[8..15]`. Opposing front hole for index `k` is `7 - k`. Capture triggers when landing in `own_inner[k] > 1` and `opp_inner[7-k] > 0`, scooping `opp_inner[7-k]` and `opp_outer[7-k]`. Append captured seeds to hand and continue counter-clockwise sowing from `own_inner[k]`. Check loss condition (`all(h < 2)`) at the start of each player's turn. Add a 200-ply move limit or cycle detection for engine safety. Suggested first milestone: 4x8 counter-clockwise relay loop with dual-row capture and re-sowing verification.

Download as JSON

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

Download JSON
Cite this page

Comorian Four-Row Mancala (Comoros). (n.d.). Games of Countries. https://gamesofcountries.com/games/km-comoros/mraha-wa-bari

@misc{gamesofcountries-km-comoros-mraha-wa-bari,
  title = {Comorian Four-Row Mancala (Comoros)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/km-comoros/mraha-wa-bari}
}