Formal Specification
Sahrawi two-row pit sowing mancala (Crur / Umm ad-Diyar) — Formal Specification
Western Sahara · board-abstract · Confidence: low
← Back to game pageImplementation 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 , where pits belong to Player 0 and pits 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 each hold 4 seeds (`seeds[i] = 4` for all ). Score piles .
R2. **Legal Moves:**
- Player 0 can select any pit such that `seeds[p] > 0`.
- Player 1 can select any pit such that `seeds[p] > 0`.
R3. **Sowing Execution:**
- Let . Set .
- For :
- Advance index .
- If , skip .
- .
- Let be the final destination pit of the sowing sequence.
R4. **Capture Resolution:**
- If belongs to the opponent (i.e. for Player 0, or for Player 1) AND :
- Capture all seeds in : ; .
- Check previous pit . While belongs to the opponent and :
- ; .
- .
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 , Player 0 wins.
- If , Player 1 wins.
- If , the game is a draw.
## Edge cases
- **Tie at the end condition:** Possible when both players capture exactly 24 seeds (), 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 ().
- **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` for Player 0, and 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 JSONCite 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}
}