Skip to main content
Formal Specification

Mancala (Jordanian Al-Hows) — Formal Specification

Jordan · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Al-Hows — AI-optimized specification ## General idea A traditional two-player mancala game featuring 14 pits and 98 pebbles. Players scoop up pebbles from their side and sow them counter-clockwise, capturing stones from any pit (on either side) where the final sowed pebble makes the count exactly 2 or 4. It is structurally unique due to its high piece count (7 pebbles per pit initially) and its consecutive reverse-direction capture mechanism. ## Formal model - **Abstraction taken:** None required; Al-Hows is an abstract mathematical sowing game with discrete board slots and piece counts. - **Player/agent count:** 2 players. - **Turn model:** Strictly sequential, alternating. ## Formal rules R1. **Setup:** 1.1. The board consists of 14 pits, arranged in two rows of 7 pits. Row 1 (pits 0 to 6) belongs to Player 1; Row 2 (pits 7 to 13) belongs to Player 2. 1.2. At start, each of the 14 pits is filled with exactly 7 pebbles. Total active pebbles = 98. 1.3. Each player has a scoring reservoir (not sowed into) to store captured pebbles. R2. **Sowing Turn:** 2.1. On their turn, a player selects any pit on their own side containing at least 1 pebble. 2.2. The player removes all pebbles from the chosen pit and distributes them one-by-one into adjacent pits, moving counter-clockwise around the board. 2.3. Sowing is continuous, looping across both rows. R3. **Capturing:** 3.1. Sowing a pebble into a pit alters its pebble count. 3.2. If the very last pebble of a sowing lands in any pit and makes its total count exactly **2** or **4**, the player immediately captures all pebbles in that pit and moves them to their scoring reservoir. 3.3. **Consecutive Capture:** If a capture occurs, the player checks the pit immediately preceding the captured pit (clockwise). If that preceding pit also contains exactly 2 or 4 pebbles, those are also captured. This reverse check and capture continues until a pit is reached that does not contain exactly 2 or 4 pebbles. 3.4. If the last pebble lands in a pit and makes any other count, no pebbles are captured, and the turn ends. R4. **No Legal Move:** 4.1. [gap-fill] If a player has no pebbles in any pit on their side at the start of their turn, they cannot sow. The game immediately ends, and the opponent collects all remaining pebbles on their own side, adding them to their score. R5. **Winning:** 5.1. The game ends when either R4.1 is triggered or all pebbles are captured. 5.2. Players count their scoring reservoirs. The player with more pebbles (>= 50 pebbles out of 98) is declared the winner. ## Edge cases - **Tie at the end condition:** If both players end with exactly 49 pebbles, the game is a draw. - **A player with no legal move:** Handled by R4.1 (immediate termination and opponent sweeps remaining stones). - **Repetition / cycles:** Sowing decreases the concentration of pebbles, funneling them into captured scoring piles. However, rare circular movement loops can exist with low pebble counts. [gap-fill] If the same board state occurs 3 times within a game, the game ends in a draw. - **Simultaneous claims on the same resource:** Not applicable; sequential turns. - **Player elimination mid-round:** Not applicable. - **Resource exhaustion:** Pebble count is constant at 98, redistributed or scored. - **Termination guarantee:** Guaranteed by the strictly monotonic accumulation of pebbles in scoring reservoirs combined with the 3-fold state repetition draw rule. ## State representation - **Persistent state:** Board pits (1D array of size 14, storing pebble counts), player scores (captured pebbles per player), current turn, state repetition history map. - **Per-turn ephemeral state:** Selected pit to sow, final sowed pit position. - **Observable information:** Fully observed. ## Action space - `sow_pit(pit_index)`: Selects a pit index (0-6 for Player 1, 7-13 for Player 2) to scoop and distribute pebbles. ## Playability notes - **Single-player-vs-AI:** Highly suitable; can be implemented with high-efficiency Minimax, Alpha-Beta pruning, or MCTS models since the branching factor is at most 7. - **Group games:** Not applicable. - **What is lost in the adaptation:** None; the mathematical structure maps perfectly. ## Implementation hints Represent the 14 pits as a 1D circular array of size 14 where modulo arithmetic handles the counter-clockwise and clockwise indexing. Implement the circular sowing and consecutive capture loop as the first milestone.

Download as JSON

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

Download JSON
Cite this page

Mancala (Jordanian Al-Hows) (Jordan). (n.d.). Games of Countries. https://gamesofcountries.com/games/jo-jordan/al-hows

@misc{gamesofcountries-jo-jordan-al-hows,
  title = {Mancala (Jordanian Al-Hows) (Jordan)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/jo-jordan/al-hows}
}