Skip to main content
Formal Specification

Mancala / Cowrie Shell Sowing Game — Formal Specification

Indonesia · board-abstract · Confidence: high

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Congklak — AI-optimized specification ## General idea A two-player Mancala-family sowing game played on a 16-pit board (2 rows of 7 small pits plus 2 end storehouses). Players pick up seeds from their pits and distribute them sequentially around the board, utilizing multi-lap laps, bonus turns upon landing in one's storehouse, and cross-board captures (*nembak*) when landing in an empty home pit opposite opponent pieces. ## Formal model - **Abstraction taken:** Fully discrete state and movement model. The physical sowing motion translates into a deterministic integer arithmetic cycle on a 16-node directed graph. - **Player/agent count:** 2 players (Agent 0 and Agent 1). - **Turn model:** Strictly sequential turns following initial opening (or initiated via coin-toss / first-player selection). ## Formal rules R1. State setup: Pits are indexed 0..15. Agent 0 owns pits 0..6 (small pits) and pit 7 (storehouse 0). Agent 1 owns pits 8..14 (small pits) and pit 15 (storehouse 1). Initial counts: `pits[0..6] = 7`, `pits[7] = 0`, `pits[8..14] = 7`, `pits[15] = 0`. R2. Active player selects any non-empty, non-burnt small pit i on their side. R3. Sowing loop: - Seeds in hand H=pits[i], pits[i]=0, current cursor c=i. - While H>0: - Advance cursor c=(c+1)(mod16). - If c is the opponent's storehouse (pit 15 for Agent 0, pit 7 for Agent 1), skip c=(c+1)(mod16). - If pit c is marked burnt (*kobongan*), skip c=(c+1)(mod16) [gap-fill]. - Deposit 1 seed: pits[c]=pits[c]+1, H=H−1. R4. Landing resolution: - If c is the active player's storehouse: active player gains an immediate bonus turn. If all small pits on active player's side have 0 seeds, bonus turn is forfeited and turn passes to opponent. - If c is a non-empty small pit (where count after deposit >1): active player scoops up all seeds in pit c (H=pits[c], pits[c]=0) and continues R3 sowing loop. - If c is an empty small pit on opponent's side (count after deposit ==1): turn ends immediately. - If c is an empty small pit on active player's side (count after deposit ==1): capture (*nembak*). Active player takes the 1 seed at pit c and all seeds in opposite pit 14−c, adding them directly to active player's storehouse. Both pit c and pit 14−c become 0. Turn ends. R5. Round recycling (*kobongan*): When ∑pits[0..6]==0 and ∑pits[8..14]==0, the round ends. - Each player takes all seeds from their storehouse. For each small pit on their side, they place 7 seeds if available. - Any pit unable to receive 7 seeds is flagged `burnt = true` for the next round. Remaining seeds <7 are returned to storehouse. R6. Win condition: If an agent starts a round with <7 total seeds, they are bankrupted and the opposing agent wins the match. ## Edge cases - Tie at the end condition: If both players have identical seed counts (49 each) after round 1 and mutually agree to stop, the game is a draw; in continuous match play, ties do not eliminate either player and lead to a standard round 2. - A player with no legal move: If all small pits on a player's side are 0 during a round, the player's turn is skipped; opponent continues sowing until seeds enter the stalled player's side or the round ends. - Repetition / cycles: Sowing distributes counters into storehouses monotonically across rounds; within a single lap, finite total seeds (98) strictly bounds multi-lap cascades. [gap-fill] Max single-turn lap limit of 100 iterations prevents infinite non-scoring cycles in anomalous custom states. - Simultaneous claims on the same resource or position: Not applicable; turns and sowing paths are strictly discrete and sequential. - Player elimination mid-round: Not applicable; elimination occurs strictly at the round recycling checkpoint R5. - Resource exhaustion: Seed count is conserved at 98 across the entire game. - Termination guarantee: Multi-lap sowing must terminate because every seed deposited into a storehouse is permanently removed from the active sowing pool, strictly reducing board entropy. ## State representation - Persistent state: - `pits`: array of 16 integers (indices 0..15). - `burnt`: array of 14 booleans (indices 0..13 for small pits). - `active_player`: 0 or 1. - `round_number`: integer. - Per-turn ephemeral state: `seeds_in_hand` (integer), `cursor` (0..15). - Observable information: Fully observable (perfect information). ## Action space - `sow(pit_index)`: Integer parameter i∈{0..6} for Agent 0 or {8..14} for Agent 1. Precondition: `pits[i] > 0` and `burnt[i] == false`. ## Playability notes - Single-player-vs-AI: Natural and engine-ready; minimax / alpha-beta search or MCTS can evaluate moves with zero adaptation. - Group games (n>4): Not applicable; Congklak is strictly a 2-agent duel. - Physical-skill games: Not applicable; 100% discrete combinatorial abstract. - What is lost in the adaptation: The fine tactile rhythm of scooping and dropping shells is lost; pure calculation remains. ## Implementation hints Branching factor is small (≤7 choices per turn). The multi-lap loop can run through several cycles in a single move, so state transitions should execute as an atomic generator until a terminal landing condition is reached. First milestone: Implement R1–R4 for a single-round match.

Download as JSON

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

Download JSON
Cite this page

Mancala / Cowrie Shell Sowing Game (Indonesia). (n.d.). Games of Countries. https://gamesofcountries.com/games/id-indonesia/congklak

@misc{gamesofcountries-id-indonesia-congklak,
  title = {Mancala / Cowrie Shell Sowing Game (Indonesia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/id-indonesia/congklak}
}