Skip to main content
Formal Specification

Malaysian Draughts / Checkers — Formal Specification

Malaysia · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 2
# Dam Haji — AI-optimized specification ## General idea A deterministic two-player zero-sum abstract strategy game on an 8x8 chequered board. Ordinary pieces advance forward diagonally but capture diagonally in all four directions. Kings ("Haji") are flying pieces that travel and capture over arbitrary distances along diagonal rays. Captures are strictly mandatory with maximal-capture priority. ## Formal model - **Abstraction taken:** None; pure discrete board game with perfect information and deterministic transitions. - **Player/agent count:** 2 agents (Player 0 = Dark pieces, Player 1 = Light pieces). - **Turn model:** Sequential alternating turns. ## Formal rules R1. Board representation: An 8x8 grid indexed (r,c) for r,c∈[0..7]. Play occurs exclusively on dark squares where (r+c)mod2=1 (32 playable squares). R2. Initial placement: - Player 0 pieces at rows r∈[0..2] (12 pieces). - Player 1 pieces at rows r∈[5..7] (12 pieces). - Rows 3 and 4 start empty. - All pieces start as `MAN` (M). R3. Legal moves for `MAN`: - Non-capturing move: Move 1 square diagonally forward (r+1 for P0, r−1 for P1). - Capturing move: Jump over an adjacent opponent piece along any of the 4 diagonals into the immediately vacant square beyond (r±2,c±2). R4. Legal moves for `HAJI` (H): - Non-capturing move: Move any number of vacant squares along any of the 4 diagonal rays. - Capturing move: Jump over a single opponent piece along a diagonal ray at arbitrary distance (with empty intermediate squares) and land on any vacant square along the ray beyond the victim. R5. Capture priority & mandatory capture: - If any capturing move exists for active player P, non-capturing moves are strictly illegal. - If multiple capture paths exist, the player must select a path that maximizes the total number of captured pieces ( [gap-fill] standard tournament rule replacing manual Huffing). - Captured pieces are removed from the board only after the complete jump sequence finishes. R6. Promotion (`Naik Haji`): - A `MAN` belonging to P0 reaching r=7 (or P1 reaching r=0) is promoted to `HAJI` at the conclusion of the turn. R7. [gap-fill] Draw & loop breaking rules: - Threefold repetition of exact board position and active player results in an immediate draw. - 40 consecutive moves without a capture or piece promotion results in an immediate draw. R8. Win condition: A player wins if the opponent has no legal moves remaining on their turn (either all pieces captured or all remaining pieces completely blocked). ## Edge cases - Tie at the end condition: Enforced by threefold repetition or the 40-move non-capture rule (R7). - A player with no legal move: Loses the match immediately (R8). - Repetition / cycles: Strictly prevented by the threefold repetition and 40-move draw counter. - Simultaneous claims on the same resource: Not applicable; turns are strictly sequential. - Player elimination mid-round: The game ends immediately upon full elimination of one player's pieces. - Resource exhaustion: Pieces are removed upon capture; maximum 24 pieces. - Termination guarantee: Monotonic reduction in pieces or progress toward promotion/repetition bounds ensures finite game length. ## State representation - Persistent state: `board[32]` (categorical: `EMPTY`, `P0_MAN`, `P0_HAJI`, `P1_MAN`, `P1_HAJI`), `active_player` (0 or 1), `half_move_clock` (integer for 40-move rule), `history_hash_map` (for repetition checks). - Observable information: Fully observable by both agents (perfect information). ## Action space - `move(from_sq, to_sq)`: For non-captures. - `jump(path)`: Array of square indices visited during a single- or multi-capture sequence. ## Playability notes - Single-player-vs-AI: Engine-ready; standard Alpha-Beta / Negamax engines or MCTS with bitboard representations achieve superhuman performance. - Group games (n>4): Not applicable; strictly a 2-agent duel. - Physical-skill games: Not applicable; pure deterministic calculation. - What is lost: None; the mathematical formalization perfectly encapsulates traditional gameplay. ## Implementation hints Use a 32-bit integer bitboard representation (4 integers: P0_men, P0_kings, P1_men, P1_kings). Flying king ray-tracing can be precomputed as 32-bit bitmasks for high-throughput node evaluation.

Download as JSON

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

Download JSON
Cite this page

Malaysian Draughts / Checkers (Malaysia). (n.d.). Games of Countries. https://gamesofcountries.com/games/my-malaysia/dam-haji

@misc{gamesofcountries-my-malaysia-dam-haji,
  title = {Malaysian Draughts / Checkers (Malaysia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/my-malaysia/dam-haji}
}