Skip to main content
Formal Specification

Philippine Mancala / Sungka — Formal Specification

Philippines · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Sungka — AI-optimized specification ## General idea A two-player discrete mancala board game played on a (2×7)+2 pit topology with 98 counters. Players sow counters sequentially or simultaneously clockwise, chaining extra turns by landing in their store pit (*ulo*) and capturing opposite pits (*taga*) when landing in an empty home pit. Deficits at round reset result in burnt pits (*sunog*), causing monotonic board territorial reduction until one player loses all pits. ## Formal model - **Abstraction taken:** Fully discrete combinatorial state graph. Board is modeled as an array of 16 pits: Pits 0..6 (Player 0 home pits), Pit 7 (Player 0 store *ulo*), Pits 8..14 (Player 1 home pits), Pit 15 (Player 1 store *ulo*). - **Player/agent count:** Exactly 2 agents (P0,P1). - **Turn model:** Strictly sequential turns for formal AI simulation (sequential variant standard in formal game engines), with active player retaining turn upon landing in own store. ## Formal rules R1. Setup: - Pits 0..6 and 8..14 initialized with 7 counters each. Pits 7 and 15 initialized with 0 counters. - All 14 small pits marked active (`burnt = false`). R2. Legal Action Set: - Active player Pi can select action `sow(pit_index)` where `pit_index` is an active unburnt pit in their territory (0..6 for P0, 8..14 for P1) containing C>0 counters. R3. Sowing Execution: - Counters in selected pit k are emptied: n=counters[k],counters[k]=0. - While n>0: - k=(k+1)(mod16). - If k is the opponent's store pit (15 for P0, 7 for P1) or is a burnt pit (`burnt[k] == true`), skip pit: k=(k+1)(mod16) [gap-fill]. - counters[k]+=1, n−=1. R4. Landing Resolution: - Case A (Landing in own store): If the final counter lands in player's own store pit (7 for P0, 15 for P1), player earns an extra move (`subong_sunod`); player selects another legal pit. - Case B (Landing in occupied small pit): If final counter lands in an active small pit with counters[k]>1, player immediately picks up all counters in pit k and continues sowing from pit k (chain sowing). - Case C (Capture / *Taga*): If final counter lands in an empty active pit on player's own side (counters[k]==1), and the directly opposite pit opp=14−k contains M>0 counters: - Player collects the 1 counter at k plus all M counters from opp, adding 1+M counters directly to their own store pit. - Turn ends. - Case D (Empty landing / *Patay*): If final counter lands in an empty small pit without capture conditions, turn terminates and passes to opponent. R5. Round Reset & Elimination (*Sunog*): - When all counters enter stores 7 and 15, a round concludes. - Each player re-fills their home pits sequentially with 7 counters each from their store. - Any pit unable to receive 7 full counters becomes burnt (`burnt = true`) for subsequent rounds and remains permanently closed. - Excess counters return to store. - Game terminates when one player has 0 active pits; the surviving player wins. ## Edge cases - Tie at the end condition: If both players have insufficient counters to hold 7 pits and exactly equal counters (49 each) after multiple rounds, the match is declared a draw [gap-fill]. - A player with no legal move: If active player has 0 counters across all active home pits during a turn, their turn is skipped (`pass`), and opponent takes consecutive turns until counters are sown into player's side. - Repetition / cycles: In single-round continuous chaining, loops are impossible as each capture or store landing strictly reduces circulating counters on small pits. - Simultaneous claims on the same resource or position: Not applicable under sequential turn model. - Player elimination mid-round: Handled formally at round reset via the *sunog* mechanic. - Resource exhaustion: Counters are conserved exactly (N=98 invariant across all states). - Termination guarantee: Monotonic accumulation in stores and the strictly decreasing count of unburnt pits ensure finite game depth. ## State representation - Persistent state: - `board`: array of 16 integers (counter counts). - `burnt`: array of 16 booleans. - `active_player`: integer 0 or 1. - `round_number`: integer. - Observable information: Fully observable public state. ## Action space - `sow(pit_index)`: integer 0..6 for P0, 8..14 for P1, precondition: board[pit_index]>0∧burnt[pit_index]==false. ## Playability notes - Single-player-vs-AI: Ideal and direct; minimax / alpha-beta or MCTS engines operate with high tactical performance. - Group games (n>4): Inapplicable; Sungka is inherently a 1v1 duel. - Physical-skill games: Inapplicable; purely discrete strategic mancala. - What is lost in the adaptation: The real-time physical hand dexterity of simultaneous opening subo is normalized to sequential play. ## Implementation hints Branching factor is at most 7 per turn. State can be packed into a 64-bit or 128-bit integer structure for ultra-fast bitboard simulation. First milestone: Implement single-round sequential sowing with capture and store-continuation rules.

Download as JSON

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

Download JSON
Cite this page

Philippine Mancala / Sungka (Philippines). (n.d.). Games of Countries. https://gamesofcountries.com/games/ph-philippines/sungka

@misc{gamesofcountries-ph-philippines-sungka,
  title = {Philippine Mancala / Sungka (Philippines)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ph-philippines/sungka}
}