Skip to main content
Formal Specification

Tunisian Desert Draughts — Formal Specification

Tunisia · board-abstract · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 1
# Kharbga Tounissia — AI-optimized specification ## General idea A pure abstract strategy game played on a 7x7 grid. Players alternate placing pairs of pieces during an initial setup phase while keeping the center cell vacant, followed by an orthogonal step-and-capture phase where sandwiched opponent pieces are eliminated via custodian captures and optional cascading chains. ## Formal model - **Abstraction taken:** Direct discrete formalization on a 7x7 coordinate grid `{(r, c) | 0 <= r, c <= 6}`. - **Player/agent count:** 2 players (0 and 1). - **Turn model:** Sequential alternating turns. Phase 1: drop 2 pieces per turn. Phase 2: orthogonal step and custodian capture. ## Formal rules R1. Setup: Board is a 7x7 matrix initialized to `Empty`. Each player has 24 pieces in reserve. R2. Phase 1 (Tanzil): - Player 0 places 2 pieces on any 2 distinct empty cells except `(3, 3)`. - Player 1 places 2 pieces on any 2 distinct empty cells except `(3, 3)`. - Placement alternates until all 48 pieces are placed, leaving only cell `(3, 3)` empty. R3. Phase 2 Transition: Player 1 (the second to place) takes the first movement turn into `(3, 3)`. R4. Legal Moves (Machy): - A piece at `(r, c)` can move to an orthogonally adjacent empty cell `(r', c')` where `|r - r'| + |c - c'| == 1`. R5. Custodian Capture: - If moving to `(r', c')` creates a sandwich configuration `[P_friendly, P_enemy, P_friendly]` along an orthogonal axis, the trapped enemy piece is removed immediately. - If multiple orthogonal enemy pieces are trapped simultaneously, all are captured in that single turn. - If a capture occurs, the player may optionally continue moving the same piece if another immediate custodian capture is legal. - Moving voluntarily into a sandwich does NOT trigger capture. R6. Win Condition: A player wins immediately if the opponent has 0 pieces remaining or has no legal orthogonal moves available on their turn. ## Edge cases - Tie at the end condition: [gap-fill] If 40 consecutive moves occur without any piece capture, the game is declared a draw. - A player with no legal move: Treated as an immediate loss for the blocked player. - Repetition / cycles: Handled by the 40-move non-capture draw counter. - Simultaneous claims on the same resource or position: Sequential turn execution prevents collisions. - Player elimination mid-round; turn order repair: 2-player game terminates upon final capture. - Resource exhaustion: Bounded by 49 cells and 24 pieces per player. - Termination guarantee: Enforced by monotonic piece elimination and the 40-move non-capture draw threshold. ## State representation - Persistent state: `board: Array[7][7] in {Empty, P0, P1}`, `phase in {Tanzil, Machy}`, `reserve: Array[2][int]`, `no_capture_ply_count: int`. - Ephemeral state: `active_chain_piece: Optional[(int, int)]`. - Observability: Complete, perfect information. ## Action space - `place_pair((r1, c1), (r2, c2))`: Drop 2 pieces during Tanzil. - `step((r_src, c_src), (r_dst, c_dst))`: Orthogonal move during Machy. ## Playability notes - Single-player-vs-AI: Engine-ready; standard Minimax with Alpha-Beta pruning, bitboards, and heuristic mobility evaluation. - Group games (n>4): Not applicable; strictly 2-player. - Physical-skill games: Pure combinatoric board game. - What is lost: The tactile experience of carving smooth pits into fine oasis sand under date palms. ## Implementation hints Bitboard or 2D array representation. First milestone: implement two-phase state machine, 7x7 board state, and orthogonal custodian capture detection.

Download as JSON

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

Download JSON
Cite this page

Tunisian Desert Draughts (Tunisia). (n.d.). Games of Countries. https://gamesofcountries.com/games/tn-tunisia/kharbga-tunisia

@misc{gamesofcountries-tn-tunisia-kharbga-tunisia,
  title = {Tunisian Desert Draughts (Tunisia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/tn-tunisia/kharbga-tunisia}
}