Formal Specification
Fourteen Pits / Many Pits Mancala — Formal Specification
India · board-abstract · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 2
# Pallanguzhi — AI-optimized specification
## General idea
Pallanguzhi is South India's classical two-player mancala game played on a 14-pit wooden board (two rows of seven) with 70 tamarind seeds. Players take turns sowing seeds counter-clockwise across multi-lap continuous relays, capturing seeds from pits following an empty depression (*thattu*), and harvesting four-seed "cows" (*pasu*) that form on their home territory. Across successive rounds, seed deficits convert unfilled pits into inactive "rubbish pits" (*kasavu kuzhi*), progressively shrinking the loser's playable domain until total bankruptcy.
## Formal model
- **Abstraction taken:** Direct representation of the 14-pit cyclic mancala array. Board pits are indexed cyclically , where Player 0 owns pits (South row) and Player 1 owns pits (North row).
- **Player/agent count:** 2 agents ().
- **Turn model:** Alternating sequential turns with deterministic multi-lap cascade resolutions.
## Formal rules
R1. **Initial Setup (Round 1):**
- 14 pits arranged in a directed ring .
- Each pit is populated with exactly 5 seeds (, total 70 seeds).
- Personal stores: , .
- Rubbish pit mask: for all .
R2. **Turn Initiation & Sowing:**
- On their turn, player selects an active, non-empty, non-rubbish pit where .
- Player scoops all seeds: , .
- Player sows seeds one by one into subsequent pits .
- **Rubbish Pit Bypass:** Any pit where is strictly skipped during sowing ( is not decremented, no seed is placed).
R3. **The "Cow" (*Pasu*) Instant Harvest:**
- During any sowing step, if the seed count of any pit reaches exactly 4 ():
- The 4 seeds are immediately harvested by the owner of the row containing pit :
- This harvest occurs instantly regardless of whose turn it is.
R4. **Multi-Lap Continuation & Captures:**
- When the last seed in is deposited into pit :
- Let and (skipping rubbish pits).
- **Case 1 (Lap Sowing):** If , player picks up all seeds from () and continues sowing counter-clockwise.
- **Case 2 (Capture / *Thattu*):** If :
- The player captures all seeds in pit : .
- [gap-fill: standard thattu rule] If the pit following the captured pit () is also empty, the player additionally captures all seeds in (double capture).
- The turn terminates.
- **Case 3 (Stall / *Kothu*):** If both and are empty, the turn terminates with zero capture.
R5. **Round Termination & Territory Reduction:**
- A round ends when the active player has no non-empty playable pits remaining on their side of the board. Any remaining seeds on the board are swept into the respective pit owners' stores.
- **Reset Phase for Next Round:**
- Both players attempt to repopulate their 7 home pits with 5 seeds each from their accumulated .
- Any surplus seeds beyond the required 35 are set aside as permanent profit.
- If player possesses fewer than 35 seeds, they fill as many full pits (5 seeds each) as possible from left to right.
- Any unfilled home pits are marked as "Rubbish Pits" ().
- Any remainder seeds () that cannot fill a full pit are retained in the player's store.
R6. **Match Victory:**
- A player who cannot fill even a single home pit (possessing seeds at round reset) is declared bankrupt.
- The opposing player wins the match.
- [gap-fill] If a single round exceeds 150 turns without a capture or pasu harvest, the round terminates and seeds are scored by current store counts.
## Edge cases
- **Tie at the end condition:** Not applicable — match ends only upon total seed bankruptcy of one player; total seed invariant (70 seeds) ensures asymmetry.
- **A player with no legal move:** When an active player has 0 seeds across all active home pits, the round ends immediately, triggering R5.
- **Repetition / cycles:** Multi-lap sowing loops are strictly finite because each seed placement and pasu harvest decrements or redistributes hand contents; the 150-turn cap in R6 breaks infinite non-capturing cycles.
- **Simultaneous claims on the same resource or position:** Pasu harvest (R3) resolves deterministically based on territorial ownership of the 4-seed pit.
- **Player elimination mid-round; turn order repair:** Not applicable — strictly 2 players; round resets handle territorial contraction.
- **Resource exhaustion (pieces, tokens, space, time):** Total seed mass is invariant ().
- **Termination guarantee: why the game provably ends:** Deficit rounds permanently convert pits to rubbish pits (), strictly reducing board capacity until one player reaches 0 pits.
## State representation
- **Persistent state:**
- Pits array: .
- Personal stores: .
- Rubbish pit mask: .
- Active player ; Round index .
- **Per-sowing ephemeral state:**
- : current seeds being distributed.
- .
- **Observable information:** Fully observable game state (perfect information).
## Action space
- `sow_pit(pit_index)`: where , subject to preconditions: and .
## Playability notes
- **Single-player-vs-AI:** Highly natural for alpha-beta search or Monte Carlo Tree Search. The deterministic cascade sowing and combinatorial depth create a profound abstract calculation space.
- **Group games ():** Not applicable; purely a 2-player duel.
- **Physical-skill games:** Not applicable; abstract strategy.
- **What is lost in the adaptation:** The sensory rhythm of dropping smooth tamarind seeds into hollowed rosewood pits and the communal chanting during night-long festival vigils.
## Implementation hints
- Implement the sowing cycle as a `while hand > 0` loop with a helper `get_next_valid_pit(idx)` that automatically skips rubbish pits.
- Branching factor: Exceptionally low: at most 7 choices per turn (often valid non-empty pits), allowing deep alpha-beta search depths ().
- Obvious representational trap: Forgetting that the "Pasu" (4-seed harvest) awards seeds to the *owner of that half of the board*, NOT necessarily to the player currently sowing.
- Suggested first milestone: Implement a single-round sowing engine with lap continuation, pasu harvest, and thattu capture; verify seed conservation ().
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Fourteen Pits / Many Pits Mancala (India). (n.d.). Games of Countries. https://gamesofcountries.com/games/in-india/pallanguzhi
@misc{gamesofcountries-in-india-pallanguzhi,
title = {Fourteen Pits / Many Pits Mancala (India)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/in-india/pallanguzhi}
}