Skip to main content
Formal Specification

Sahrawi two-row pit sowing mancala (Crur / Umm ad-Diyar) — Formal Specification

Western Sahara · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 3
# Al-Krour — AI-optimized specification ## General idea A deterministic, perfect-information two-row mancala game played on 12 pits with 48 seeds. Players lift seeds from their home pits and sow them counter-clockwise one by one into consecutive pits. Captures occur when the last sown seed lands in an opponent's pit and results in exactly 2 or 4 seeds, triggering consecutive backward captures along the opponent's row. ## Formal model - **Abstraction taken:** Direct discrete representation. The board is modeled as a circular array of 12 pits indexed 0…11, where pits 0…5 belong to Player 0 and pits 6…11 belong to Player 1. - **Player/agent count:** 2 agents, Player 0 and Player 1. - **Turn model:** Sequential alternating turns. ## Formal rules R1. **Initial Setup:** Pits 0…11 each hold 4 seeds (`seeds[i] = 4` for all i∈{0,…,11}). Score piles S0=0,S1=0. R2. **Legal Moves:** - Player 0 can select any pit p∈{0,…,5} such that `seeds[p] > 0`. - Player 1 can select any pit p∈{6,…,11} such that `seeds[p] > 0`. R3. **Sowing Execution:** - Let k=seeds[p]. Set seeds[p]=0. - For step=1…k: - Advance index idx←(p+step)(mod12). - If idx==p, skip idx←(idx+1)(mod12). - seeds[idx]←seeds[idx]+1. - Let last_pit be the final destination pit of the sowing sequence. R4. **Capture Resolution:** - If last_pit belongs to the opponent (i.e. last_pit∈{6…11} for Player 0, or last_pit∈{0…5} for Player 1) AND seeds[last_pit]∈{2,4}: - Capture all seeds in last_pit: Sactive←Sactive+seeds[last_pit]; seeds[last_pit]=0. - Check previous pit prev←(last_pit−1)(mod12). While prev belongs to the opponent and seeds[prev]∈{2,4}: - Sactive←Sactive+seeds[prev]; seeds[prev]=0. - prev←(prev−1)(mod12). R5. **Feed Obligation (Anti-Starvation):** - If the opponent has 0 total seeds on their side of the board (`sum(seeds[opponent_pits]) == 0`), the active player MUST choose a move that sows at least one seed into the opponent's side, if any such move exists. R6. [gap-fill] **End Condition & Remaining Seed Allocation:** - If a player cannot make a legal move (because their side is empty and no feed was possible), the game ends immediately. - Any seeds remaining on the board are swept into the score pile of the player on whose side they currently lie. R7. [gap-fill] **Loop-Breaking Rule:** If 40 consecutive moves occur without any capture, the game terminates and all remaining seeds on the board are divided equally between both players. R8. **Win / Loss / Draw:** - If S0>S1, Player 0 wins. - If S1>S0, Player 1 wins. - If S0==S1, the game is a draw. ## Edge cases - **Tie at the end condition:** Possible when both players capture exactly 24 seeds (S0=24,S1=24), resolving as an explicit draw. - **A player with no legal move:** Handled by Rule R5 (feed obligation) and R6 (immediate end and board sweep). - **Repetition / cycles:** Bounded by Rule R7 ( [gap-fill] 40 non-capture move threshold). - **Simultaneous claims on the same resource or position:** Turns are strictly sequential; pit states are updated deterministically. - **Player elimination mid-round; turn order repair:** Not applicable (2-player game). - **Resource exhaustion:** Total seed count is invariant (48=S0+S1+∑seeds). - **Termination guarantee:** Seeds permanently exit the board into score piles upon capture, and non-capturing cycles are terminated by R7. ## State representation - **Persistent state:** - `pits`: array of 12 integers representing seed counts. - `scores`: `[score_p0, score_p1]`. - `active_player`: `0` or `1`. - `non_capture_counter`: integer tracking moves since last capture. - **Observable information:** Fully observable game. Perfect information. ## Action space - `sow(pit_index)`: where `pit_index` ∈{0…5} for Player 0, and ∈{6…11} for Player 1, with precondition `pits[pit_index] > 0` (and adhering to feed constraint R5). ## Playability notes - **Single-player-vs-AI:** Natural 1v1 game. Easily implemented with alpha-beta search, minimax with depth evaluation based on capture potential and pit control, or MCTS. - **Group games (n>4):** Not applicable; 2-player board abstract. - **Physical-skill games:** Not applicable; discrete board abstract. - **What is lost in the adaptation:** Tactile experience of scooping sand pits and handling date seeds in the desert. ## Implementation hints - Small state size: 12 bytes for pits, 2 bytes for scores. - Highly efficient bitwise or array representations enable search depths of 15+ ply in milliseconds. - First milestone: Implement simple sowing loop and single pit capture (2 or 4 seeds) before adding backwards multi-pit capture chains and anti-starvation validation.

Download as JSON

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

Download JSON
Cite this page

Sahrawi two-row pit sowing mancala (Crur / Umm ad-Diyar) (Western Sahara). (n.d.). Games of Countries. https://gamesofcountries.com/games/eh-western-sahara/al-krour

@misc{gamesofcountries-eh-western-sahara-al-krour,
  title = {Sahrawi two-row pit sowing mancala (Crur / Umm ad-Diyar) (Western Sahara)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/eh-western-sahara/al-krour}
}