Formal Specification
Kiela (Sudanese Mancala) — Formal Specification
Sudan · board-abstract · Confidence: medium
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 1
# Al-Kiela — AI-optimized specification
## General idea
A deterministic count-and-capture sowing game played on a 2x6 pit board with 48 seeds. Agents execute counter-clockwise multi-lap relay sowing, capturing seeds from opposite pits upon landing in empty home pits to accumulate a majority store of seeds.
## Formal model
- **Abstraction taken:** None; pure discrete arithmetic board game mechanics.
- **Player/agent count:** 2 agents (Player 0 controlling pits 0..5, Player 1 controlling pits 6..11).
- **Turn model:** Sequential alternating turns with deterministic multi-lap relay sowing.
## Formal rules
R1. The board consists of 12 circular pits indexed in counter-clockwise order:
- Player 0 home pits: . Opposite pits are (opposite of pit is ).
- Player 1 home pits: . Opposite of pit is .
R2. Initial State: Each of the 12 pits contains exactly 4 seeds (48 seeds total). Captured stores: `store_0 = 0, store_1 = 0`.
R3. Turn Action: Active player selects a non-empty home pit with .
R4. Relay Sowing Execution:
- Pick up all seeds: , set .
- Current pit index: .
- While :
- Advance to next pit: .
- Drop 1 seed: , decrement .
- If (final seed dropped):
- If : Scoop up all seeds in pit : , set (continue relay).
- If (landed in previously empty pit): Relay ends; evaluate capture.
R5. Capture Resolution:
- If the relay ended on pit (player's own side) and :
- Let opposite pit be .
- If :
- Capture all seeds: `captured = pits[opp] + 1`.
- Add `captured` to active player's store; set .
R6. Feed Rule: If an opponent has 0 seeds in all 6 home pits, active player must choose a move that drops seed into the opponent's side if legally possible.
R7. [gap-fill] Starvation / Game End: If a player has no legal moves and cannot be fed, all remaining seeds on the board are awarded to the player with remaining seeds.
R8. Win condition: The player with captured seeds wins immediately. If , the game is a draw.
## Edge cases
- Tie at the end condition: Exactly 24 captured seeds each results in an official draw.
- A player with no legal move: Handled by R6 (mandatory feed) and R7 (remaining seeds swept).
- Repetition / cycles: Sowing redistributes seeds, and every capture strictly reduces the circulating seed supply on the board, preventing infinite non-capture cycles.
- Simultaneous claims on the same resource or position: Turns are strictly sequential.
- Player elimination mid-round; turn order repair: Game terminates when a player accumulates seeds.
- Resource exhaustion (pieces, tokens, space, time): Seeds are conserved (total = 48 invariant).
- Termination guarantee: Monotonic accumulation of captured seeds into stores ensures finite termination.
## State representation
- Persistent state:
- `pits`: array of 12 integers in `0..48`.
- `stores`: `{PLAYER_0: int, PLAYER_1: int}`.
- `current_player`: `PLAYER_0 | PLAYER_1`.
- Observable information: Fully observable by both agents.
## Action space
- `sow(pit_index)`: select integer in player's home pit range where `pits[pit_index] > 0`.
## Playability notes
- Single-player-vs-AI: Engine-ready; standard Alpha-Beta or MCTS with mancala domain heuristics functions out of the box.
- Group games (n>4): Not applicable; strictly 2-player game.
- Physical-skill games: Direct translation; fully discrete arithmetic rules.
- What is lost in adaptation: The tactile rhythm of scooping dried lalob seeds and wood trough acoustics.
## Implementation hints
Extremely compact discrete state (12-integer array + 2 store counters). First milestone: implement relay while-loop and verify that counter-clockwise pit indexing correctly executes multi-lap pick-ups and opposite pit captures.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Kiela (Sudanese Mancala) (Sudan). (n.d.). Games of Countries. https://gamesofcountries.com/games/sd-sudan/kiela
@misc{gamesofcountries-sd-sudan-kiela,
title = {Kiela (Sudanese Mancala) (Sudan)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/sd-sudan/kiela}
}