Skip to main content
Formal Specification

Tiger and Goats Board Game — Formal Specification

Malaysia · board-abstract · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 3
# Main Harimau — AI-optimized specification ## General idea A two-player discrete zero-sum asymmetric hunt board game played on a 25-vertex grid graph. One agent commands 2 Tigers whose objective is to capture opposing pieces via straight jump moves, while the opposing agent controls 24 Goats whose objective is to drop onto vertices and coordinate positional blockades to completely immobilize both Tigers. ## Formal model - **Abstraction taken:** Direct representation. The traditional board is modeled directly as an undirected graph G=(V,E) with |V|=25 vertices (5x5 grid with full orthogonal and diagonal connectivity). - **Player/agent count:** 2 agents: Player T (Tiger, 2 pieces) and Player G (Goats, 24 pieces total: Kreserve=24, initially off-board). - **Turn model:** Sequential alternating turns. Player G acts first. ## Formal rules R1. Graph topology G=(V,E): - V={(r,c)|r∈[0..4],c∈[0..4]}. - Edges E connect all orthogonal neighbors |r−r′|+|c−c′|=1, and all diagonal neighbors |r−r′|=1∧|c−c′|=1 if (r+c)(mod2)=0 (standard Alquerque grid topology). R2. Initial state: - Tigers T1,T2 start placed at (0,0) and (0,4) (or (2,2) in single-tiger mode). - Goats on board: BG=∅. Goat reserve count: RG=24. - Active turn: Player G. R3. Goat turn actions: - Phase 1 (Drop Phase: RG>0): Player G must select a vacant vertex v∈V∖(BG∪{T1,T2}) and place 1 goat: BG←BG∪{v}, RG←RG−1. - Phase 2 (Move Phase: RG=0): Player G selects one on-board goat g∈BG and moves it to an adjacent vacant vertex v′∈Adj(g)∖(BG∪{T1,T2}). R4. Tiger turn actions: - Player T selects one tiger Tk∈{T1,T2} and performs either: - **Simple move:** Move Tk to an adjacent vacant vertex v′∈Adj(Tk)∖(BG∪{T1,T2}). - **Jump capture:** Leap over an adjacent goat g∈Adj(Tk)∩BG along a straight edge into a vacant vertex vdest satisfying vdest−g=g−Tk. - If a jump is executed, g is removed from BG (|BG|←|BG|−1), and Tk←vdest. - [gap-fill] Multi-jumps: Consecutive jumping captures in a single turn are optional and permitted if straight landing spots remain available. R5. Win and termination conditions: - Goat Victory: If at the start of Player T's turn, both tigers have 0 legal simple moves and 0 legal jump captures, Player G wins immediately. - Tiger Victory: If the count of remaining goats |BG|+RG<10, Player T wins immediately (as 9 or fewer goats cannot geometrically trap 2 tigers on a 25-vertex graph). R6. [gap-fill] Threefold repetition draw: If the exact same board configuration (positions of tigers and all goats, and active player) repeats 3 times, the game is declared a draw. R7. [gap-fill] Move limit bound: If 100 plies pass without a goat capture or goat drop, the game terminates in a draw. ## Edge cases - Tie at the end condition: Standard folk rules are decisive win/loss; draws occur strictly through the threefold repetition rule or 100-ply non-progress bound. - A player with no legal move: - If Tiger has no legal move: Tiger is trapped; Goats win. - If Goat has no legal move in Phase 2: Goats are deadlocked; Tiger wins. - Repetition / cycles: Resolved cleanly by the R6 threefold repetition draw rule. - Simultaneous claims on the same resource or position: Not applicable; strictly alternating discrete turns. - Player elimination mid-round; turn order repair: Captured goats are permanently removed from play. - Resource exhaustion (pieces, tokens, space, time): Goats reserve decrements to 0, smoothly transitioning from Drop Phase to Move Phase. - Termination guarantee: Enforced by monotonic goat depletion (|BG|≤24) and the R7 100-ply non-progress draw bound. ## State representation - State tuple: `(tiger_pos[2], goat_positions_bitboard, reserve_goats, active_player, halfmove_clock, state_history)`. - Board representation: 25-bit integer for goat locations, 2 integers ∈[0..24] for tiger coordinates. - Observable information: Perfect information zero-sum game. ## Action space - Goat actions: - `drop(vertex_id)`: vertex_id∈[0..24] (valid when RG>0). - `move(from_vertex, to_vertex)`: (u,v)∈E (valid when RG=0). - Tiger actions: - `step(tiger_idx, to_vertex)`: (Tk,v)∈E. - `jump(tiger_idx, captured_goat_vertex, dest_vertex)`. ## Playability notes - Single-player-vs-AI: Ideal candidate for Alpha-Beta search with transposition tables or Monte Carlo Tree Search (MCTS). - Group games (n>4): Strictly a 2-player abstract strategy contest. - Physical-skill games: Direct symbolic representation; no physical approximation needed. - What is lost in the adaptation: None; the discrete graph model preserves 100% of authentic strategic play. ## Implementation hints Map vertices to indices 0..24. Pre-compute adjacency lists and jump lookup tables `JUMP_MAP[from_v][over_v] -> dest_v`. Branching factor: ~15 for goats in drop phase, ~4 for tigers. First milestone: implement minimax search with depth 4 and basic piece-count / mobility heuristic.

Download as JSON

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

Download JSON
Cite this page

Tiger and Goats Board Game (Malaysia). (n.d.). Games of Countries. https://gamesofcountries.com/games/my-malaysia/main-harimau

@misc{gamesofcountries-my-malaysia-main-harimau,
  title = {Tiger and Goats Board Game (Malaysia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/my-malaysia/main-harimau}
}