Formal Specification
Lao Pit-and-Pebble Mancala — Formal Specification
Laos · board-abstract · Confidence: high
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 3
# Mak Khoum — AI-optimized specification
## General idea
Mak Khoum is a traditional two-player mancala board game of Laos played on a carved board with two parallel rows of small pits (typically 5 or 7 pits per row) and two large end storehouses (*khum luang*). Players sow seeds counterclockwise in continuous multi-lap cycles, earning bonus turns when the final seed lands in their own storehouse, and capturing seeds when the final seed lands in an empty pit on their own side opposite an occupied enemy pit. Deficits across multi-round play lead to unpopulated "burnt pits" (*khum mai*) until complete bankruptcy is achieved.
## Formal model
- **Abstraction taken:** Direct discrete formalization. The board is represented as a directed cyclic graph with small pits and 2 storehouses. Standard formal variant uses pits per side with 5 counters per pit (50 total counters) or with 7 counters per pit (98 counters) [gap-fill: standard 5-pit specification formalized below].
- **Player/agent count:** Exactly 2 agents ().
- **Turn model:** Strictly alternating sequential turns with conditional bonus turns upon landing in one's storehouse.
## Formal rules
R1. Board & Counter Setup:
- small pits indexed . Player 1 owns pits and storehouse . Player 2 owns pits and storehouse .
- For , initial configuration: for all , and (Total seeds = 50).
R2. Legal Move Precondition:
- On their turn, an agent may choose any pit belonging to their side that is active (not burnt) and contains at least 1 seed ().
R3. Sowing Cycle (Counterclockwise Multi-Lap):
- The agent takes all seeds from the chosen pit, setting .
- Sowing path for : (skipping opponent storehouse ).
- Sowing path for : (skipping opponent storehouse ).
- Distribute 1 seed into each visited pit/storehouse in order until .
R4. Multi-Lap Continuation & Captures:
- Let be the location where the final seed () was dropped.
- Case A (Storehouse Bonus): If , the agent's turn does not end; the agent immediately chooses another valid pit on their side to start a new sowing.
- Case B (Occupied Small Pit): If is an active small pit and (including the dropped seed), the agent scoops all seeds from and continues sowing immediately without yielding the turn.
- Case C (Capture / *Kin Khum*): If is a small pit on the active agent's own side, (was empty before the drop), and the directly opposite pit contains :
- The agent captures the 1 seed at plus all seeds in .
- All captured seeds are placed into .
- , .
- Turn ends.
- Case D (Empty Pit / *Tai Khum*): If is an empty pit on the opponent's side, or on the player's side with empty, the turn "dies" and ends immediately.
R5. Round End & Multi-Round Bankruptcy:
- A round ends when the active player has no legal moves (all pits on their side are 0). All remaining seeds on the board are swept into their respective row owner's storehouse.
- Next Round Setup: Players repopulate their pits with 5 seeds each from their storehouse. If a player has fewer than seeds, pits they cannot fully fund are marked "burnt" (*khum mai*) and excluded from play [gap-fill: unfunded pits close from the outer edge inward].
- Match Victory: The match ends when an agent loses all pits (complete bankruptcy).
R6. [gap-fill] Repetition Draw: If the exact same board state (all pit counts and active player) repeats 3 times within a round, the round ends and board seeds are scored as in R5.
## Edge cases
- **Tie at the end condition:** If both players hold equal seeds (e.g. 25 each) at the end of a round and neither can force bankruptcy, the game is declared a draw.
- **A player with no legal move:** Triggers the immediate conclusion of the round under R5; remaining board seeds are collected to storehouses.
- **Repetition / cycles:** Sowing can potentially cycle in rare multi-lap configurations; bounded by R6 (threefold repetition rule) and the strict conservation of discrete counters.
- **Simultaneous claims on the same resource or position:** Not applicable; turns are strictly sequential.
- **Player elimination mid-round; turn order repair:** Not applicable; exactly 2 players.
- **Resource exhaustion:** Total counter sum is strictly conserved ().
- **Termination guarantee: why the game provably ends:** In every round, captures permanently move seeds into storehouses, strictly reducing active seeds in circulation until no legal moves remain, terminating each round in finite steps and driving the match to bankruptcy or draw.
## State representation
- Persistent state: Pit array `pits[0..9]`, storehouses `S[1..2]`, active pit masks `burnt_pits[0..9]`, current round index, repetition hash set.
- Per-turn ephemeral state: Current sowing hand count , current cursor position , active lap counter.
- Observable information: Fully observable — complete perfect information with zero hidden state and zero stochasticity.
## Action space
- `sow_pit(pit_index)`: Select an owned, unburnt pit with to initiate multi-lap sowing.
## Playability notes
- Single-player-vs-AI: Engine-ready. Highly strategic deterministic game suitable for alpha-beta minimax, negamax, or MCTS search.
- Group games (n>4): Strictly a 2-player abstract duel.
- Physical-skill games: Purely combinatorial board game.
- What is lost in the adaptation: The auditory clicking of polished tamarind seeds against hardwood pits and the fluid hand speed of traditional village elders.
## Implementation hints
Represent the board as an integer array of length 12 (10 pits + 2 storehouses). Sowing can be implemented via a fast `while (seeds > 0)` pointer loop. Branching factor is at most 5 actions per turn. Milestone 1: Implement single-round sowing, multi-lap continuation, and capture mechanics; Milestone 2: Implement multi-round pit closure / bankruptcy logic and minimax evaluator.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Lao Pit-and-Pebble Mancala (Laos). (n.d.). Games of Countries. https://gamesofcountries.com/games/la-laos/mak-khoum
@misc{gamesofcountries-la-laos-mak-khoum,
title = {Lao Pit-and-Pebble Mancala (Laos)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/la-laos/mak-khoum}
}