Skip to main content
Formal Specification

Tamil Fourteen-Pit Mancala — Formal Specification

Singapore · board-abstract · Confidence: high

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Pallanguzhi — AI-optimized specification ## General idea Pallanguzhi is a deterministic, two-player 14-pit mancala game characterized by continuous relay-sowing loops where turns do not terminate upon dropping the final seed into a occupied pit, but instead scoop the *subsequent* pit. Captures occur via trailing empty-pit pickups and real-time triggers when exactly 4 seeds accumulate in any pit (*Pasu*). ## Formal model - **Abstraction taken:** None; formal discrete state machine representing a 14-node circular array with 2 side stores. - **Player/agent count:** Exactly 2 agents (Player 1 controls pits 0..6; Player 2 controls pits 7..13). - **Turn model:** Strictly alternating sequential turns. ## Formal rules R1. Track Setup: A 14-element cyclic array P=(0..13) indexed anti-clockwise. - Initial state: Si=5 for all i∈0..13 (Total seeds = 70) [gap-fill: standard 5-seed setup]. Active mask Ai=true for all i. - Stores: K1=0,K2=0. R2. Active Move Selection: Player p selects pit i∈Pits(p) such that Ai∧Si>0. If no such pit exists, the turn skips. R3. Relay Sowing Engine: - C←Si,Si←0, current cursor pos←i. - While C>0: - pos←(pos+1)mod14. - If Apos==false, continue without dropping seed. - Spos←Spos+1,C←C−1. - Pasu Check: If Spos==4, the owner of pit pos (i.e. P1 if pos≤6 else P2) captures all 4 seeds into their store (Spos←0,Kowner←Kowner+4). - Relay / Termination Check (when C==0): - Lookahead to next pit next=(pos+1)mod14 (skipping burnt pits). - Case 1 (Relay Continuation): If Snext>0, C←Snext,Snext←0,pos←next, and loop continues. - Case 2 (Empty Pit Capture): If Snext==0: - capture_pit=(next+1)mod14 (skipping burnt pits). - If Scapture_pit>0, the active player captures all seeds from capture_pit (Kp←Kp+Scapture_pit,Scapture_pit←0). - Sowing terminates (*mati*); turn ends. R4. Round Reset & Burnt Pits (*Kollu*): - When all pits are empty, the round ends. - Each player counts store Kp and refills active pits with 5 seeds each starting from their leftmost pit. - Any pit that cannot be filled with 5 seeds is marked burnt (Ai←false). Remaining seeds return to store. R5. Win Condition: A player who starts a round with 0 active pits (Ai=false for all friendly pits) loses immediately. ## Edge cases - Tie at the end condition: If both players retain equal pits after 10 rounds, the player with the greater banked score wins [gap-fill]. - A player with no legal move: If all friendly pits are empty during a round, the agent's turn is skipped until seeds are sown into their side. - Repetition / cycles: Finite total seeds (70) and irreversible captures into non-sown stores guarantee round termination. - Simultaneous claims on the same resource or position: Pasu rule is deterministic based on pit ownership; turns are strictly sequential. - Player elimination mid-round: Pits burn only during the round-reset refilling phase. - Resource exhaustion: Conserved seed count (70 total seeds). - Termination guarantee: Captures strictly reduce on-board seeds, guaranteeing round convergence. ## State representation - Persistent state: - `pit_seeds`: array of 14 integers (0..70). - `active_pits`: array of 14 booleans. - `player_stores`: array of 2 integers (K1,K2). - `active_player`: integer ∈{1,2}. - `round_number`: integer. - Observable information: Perfect information, fully observed by both agents. ## Action space - `sow(pit_index)`: - `pit_index` ∈{0..6} for P1; ∈{7..13} for P2. Precondition: Apit∧Spit>0. ## Playability notes - Single-player-vs-AI: Perfect domain for minimax with alpha-beta pruning or MCTS. - Group games (n>4): Not applicable (2-player duel). - Physical-skill games: Not applicable (pure discrete strategy). - What is lost: Pleasant acoustic click of cowrie shells landing on hard teakwood. ## Implementation hints Extremely compact discrete state. Lookahead to `next` and `capture_pit` during empty-pit evaluations must properly skip burnt pit indices.

Download as JSON

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

Download JSON
Cite this page

Tamil Fourteen-Pit Mancala (Singapore). (n.d.). Games of Countries. https://gamesofcountries.com/games/sg-singapore/pallanguzhi

@misc{gamesofcountries-sg-singapore-pallanguzhi,
  title = {Tamil Fourteen-Pit Mancala (Singapore)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/sg-singapore/pallanguzhi}
}