Formal Specification
Philippine Mancala / Sungka — Formal Specification
Philippines · board-abstract · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 2
# Sungka — AI-optimized specification
## General idea
A two-player discrete mancala board game played on a 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 (Player 0 home pits), Pit (Player 0 store *ulo*), Pits (Player 1 home pits), Pit (Player 1 store *ulo*).
- **Player/agent count:** Exactly 2 agents ().
- **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 and initialized with 7 counters each. Pits and initialized with 0 counters.
- All 14 small pits marked active (`burnt = false`).
R2. Legal Action Set:
- Active player can select action `sow(pit_index)` where `pit_index` is an active unburnt pit in their territory ( for , for ) containing counters.
R3. Sowing Execution:
- Counters in selected pit are emptied: .
- While :
- .
- If is the opponent's store pit ( for , for ) or is a burnt pit (`burnt[k] == true`), skip pit: [gap-fill].
- , .
R4. Landing Resolution:
- Case A (Landing in own store): If the final counter lands in player's own store pit ( for , for ), 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 , player immediately picks up all counters in pit and continues sowing from pit (chain sowing).
- Case C (Capture / *Taga*): If final counter lands in an empty active pit on player's own side (), and the directly opposite pit contains counters:
- Player collects the 1 counter at plus all counters from , adding 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 and , 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 ( 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 or .
- `round_number`: integer.
- Observable information: Fully observable public state.
## Action space
- `sow(pit_index)`: integer for , for , precondition: .
## 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 JSONCite 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}
}