Skip to main content
Formal Specification

Zanzibari Bao Mancala — Formal Specification

Tanzania · board-abstract · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 1
# Bao la Zanzibar (Bao) — AI-optimized specification ## General idea A 4x8 mancala game with an opening seed-placement phase (Namua) followed by a relay-sowing and capture phase (Mtaji), played on a board with a house pit (nyumba) per player. Identical core mechanics to Bao La Kiswahili's spec; this entry differs in having a Tanzania/Zanzibar-attested starting distribution. ## Formal model - **Abstraction taken:** none needed — a discrete deterministic board game. - **Player/agent count:** 2. - **Turn model:** strictly alternating. ## Formal rules R1. Board: 2 players x 2 rows x 8 pits = 32 pits. Row nearest the opponent is the "front"/inner row; the row behind it is the "back"/outer row. Pit 5 (from the left) of each player's front row is the nyumba (house). R2. Setup: each player places 6 seeds in their nyumba and 2 more seeds distributed across two other front-row holes, and holds the remaining seeds in reserve for the Namua phase. R3. Namua phase: on each turn, place one reserve seed into an empty hole in your own front row. Namua ends for a player once their reserve is exhausted. [gap-fill: whether a capturing placement is mandatory when available during Namua, as documented for the closely related Kenyan-coast ruleset, was not independently confirmed for this specific Tanzanian source — implementers should treat this as an open rule-variant question.] R4. Mtaji phase (once both players have exhausted Namua reserve): select a non-empty pit with 2+ seeds on your own side and relay-sow counter-clockwise, one seed per pit, continuing into a new lap whenever the last seed lands in an already-occupied pit. R5. Capture: a sowing move captures when its final seed lands in an empty front-row pit of the mover, directly opposite an occupied enemy front-row pit; the mover takes both that pit and the enemy back-row pit directly behind it, then sows them onward. R6. Win condition: a player loses when they have no legal move (front row too depleted to capture, and no pit holds 2+ seeds to sow). ## Edge cases - **Tie at the end:** unaddressed in source; player with no legal move loses immediately, so a tie does not occur in normal play. - **A player with no legal move:** in Mtaji phase, the player with no legal move loses immediately (R6); no pass mechanic exists. - **Repetition / cycles:** relay-sowing can in principle cycle; not formally guaranteed to terminate in general, so implementers should impose a move-count cap as a safety bound. - **Simultaneous claims on one position:** not applicable — strictly sequential turns, each fully resolved before the opponent acts. - **Elimination mid-round and turn-order repair:** not applicable; two-player game with no player elimination; pieces captured into player banks. - **Resource exhaustion:** seeds on the board deplete into captured banks over time. - **Termination guarantee:** not formally guaranteed; relay-sowing mancala games can in principle cycle, though captures steadily reduce material in practice; implementers should impose a move-count cap as a safety bound. ## State representation - `board`: array[2][2][8] of seed counts (player, row, pit). - `reserve`: array[2] of int — seeds not yet placed (Namua phase only, per player). - `phase`: enum {namua, mtaji}, tracked per player independently. - `to_move`: player index. ## Action space - `place_reserve(pit)` — Namua phase: place one reserve seed into empty front-row `pit`. - `sow(pit)` — Mtaji phase: sow all seeds from a front- or back-row `pit` holding 2+ seeds. ## Playability notes - Deterministic, perfect-information combinatorial game — directly suited to minimax/MCTS with no probabilistic modeling needed. - Branching factor is small in Namua (≤8 empty front-row pits) and moderate in Mtaji (bounded by non-empty own-side pits, ≤16). ## Implementation hints Implement Mtaji's relay-sow and capture logic first and validate it against the source's description before adding the Namua opening phase and its R3 gap-fill question.

Download as JSON

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

Download JSON
Cite this page

Zanzibari Bao Mancala (Tanzania). (n.d.). Games of Countries. https://gamesofcountries.com/games/tz-tanzania/bao-zanzibari

@misc{gamesofcountries-tz-tanzania-bao-zanzibari,
  title = {Zanzibari Bao Mancala (Tanzania)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/tz-tanzania/bao-zanzibari}
}