Skip to main content
Formal Specification

Nine Pellets — Formal Specification

Kyrgyzstan · board-abstract · Confidence: high

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Toguz korgool — AI-optimized specification ## General idea A deterministic 2-player perfect-information mancala game played on an 18-pit board with 162 counters. It differs from African mancala variants by its large stone volume (9 per pit), counter-clockwise distribution with retained starting stones, capture on even parity in the opponent's territory, and a permanent territory-acquisition mechanism (*tuz*) that converts an opponent's pit into a private capturing funnel. ## Formal model - **Abstraction taken:** None required; traditional rules form a complete, discrete, finite mathematical system. - **Player/agent count:** 2 (Player 1 / White, Player 2 / Black). - **Turn model:** Strictly sequential, alternating turns starting with Player 1. ## Formal rules R1. Setup: Board array `pits[0..17]` initialized to `9` for all `i in 0..17`. `kazan[0] = 0`, `kazan[1] = 0`. `tuz[0] = -1`, `tuz[1] = -1`. Active player `p = 0`. Pits `0..8` belong to Player 0; pits `9..17` belong to Player 1. R2. Legal Action: Player `p` chooses pit index `k in (p*9 .. p*9 + 8)` such that `pits[k] > 0`. R3. Sowing Logic: - Let `n = pits[k]`. - If `n == 1`: `pits[k] = 0`, `curr = (k + 1) mod 18`, `pits[curr] += 1`. - If `n > 1`: `pits[k] = 1`, `count = n - 1`, `curr = k`. While `count > 0`: `curr = (curr + 1) mod 18`, `pits[curr] += 1`, `count -= 1`. R4. Auto-Harvesting to Tuz: - If any pellet lands in `tuz[0]` (where `tuz[0] != -1`), that pellet is immediately moved: `pits[tuz[0]] -= 1`, `kazan[0] += 1`. - If any pellet lands in `tuz[1]` (where `tuz[1] != -1`), that pellet is immediately moved: `pits[tuz[1]] -= 1`, `kazan[1] += 1`. R5. Capture Resolution: - If the final pellet of the sowing landed at `curr` in opponent's territory `((1-p)*9 .. (1-p)*9 + 8)` and `curr != tuz[p]` and `curr != tuz[1-p]`: - If `pits[curr] % 2 == 0`: `kazan[p] += pits[curr]`, `pits[curr] = 0`. - Else if `pits[curr] == 3` and `tuz[p] == -1` and `curr != (1-p)*9 + 8` and `(curr - ((1-p)*9)) != (tuz[1-p] - (p*9))`: - `tuz[p] = curr`, `kazan[p] += 3`, `pits[curr] = 0` (Tuz declaration). R6. Win/Loss/Draw: - If `kazan[p] >= 82`: Player `p` wins immediately. - If `kazan[0] == 81` and `kazan[1] == 81`: Game ends in a draw. - Starvation (*Atsyz kaluu*): If at start of player `p`'s turn, `sum(pits[p*9 .. p*9 + 8]) == 0`, all remaining stones in the opponent's pits are transferred to `kazan[1-p]`, and game terminates with scoring evaluation. R7. [gap-fill] Threefold board state repetition or 150 consecutive moves without a capture/tuz declaration is ruled a draw to guarantee finite termination against infinite loop cycles. ## Edge cases - Tie at the end condition: Exactly 81–81 is an official draw. - A player with no legal move: Handled by Starvation (R6); remaining stones sweep to opponent and game terminates. - Repetition / cycles: Handled by [gap-fill] R7 (threefold repetition / move limit draw). - Simultaneous claims on the same resource: Not applicable; turns are strictly sequential. - Player elimination mid-round: Not applicable; 2-player non-elimination. - Resource exhaustion: Exactly 162 total counters preserved across pits and kazans throughout play. - Termination guarantee: Monotonically increasing kazan sums combined with R6/R7 guarantee termination. ## State representation - Persistent state: `pits` (array of 18 uint8), `kazan` (array of 2 uint8, sum <= 162), `tuz` (array of 2 int8, values -1..17), `active_player` (uint8, 0 or 1), `halfmove_clock` (uint16), `history_hashes` (set of uint64). - Ephemeral state: Last sowing path and landing pit. - Observability: Complete information, zero hidden state. ## Action space - `sow_pit(index)`: Integer `0..8` representing the chosen pit on the active player's side. Precondition: `pits[p*9 + index] > 0`. Maximum branching factor: 9. ## Playability notes - Single-player-vs-AI: Perfect direct implementation; highly suitable for Alpha-Beta Minimax with bitboard heuristics or MCTS / AlphaZero architectures. - Group games: Inherently 2-player. - Physical skill: None; purely strategic and mathematical. - What is lost: Nothing; 100% direct digital fidelity to the physical game. ## Implementation hints Extremely lightweight state (can be packed into a single 64-bit word + arrays). Branching factor <= 9 per ply. State evaluation should prioritize `kazan` material score, active `tuz` position, and control of pit mobility.

Download as JSON

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

Download JSON
Cite this page

Toguz Korgool (Kyrgyzstan). (n.d.). Games of Countries. https://gamesofcountries.com/games/kg-kyrgyzstan/toguz-korgool

@misc{gamesofcountries-kg-kyrgyzstan-toguz-korgool,
  title = {Toguz Korgool (Kyrgyzstan)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/kg-kyrgyzstan/toguz-korgool}
}