Formal Specification
Tigers and Goats — Formal Specification
Nepal · board-abstract · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 2
# Bagh-Chal — AI-optimized specification
## General idea
Bagh-Chal is an asymmetric 2-player abstract strategy board game played on a 5×5 grid with diagonal links (25 nodes). One agent commands 4 tigers aiming to capture 5 goats via orthogonal/diagonal leaping captures, while the opponent commands 20 goats aiming to trap all 4 tigers so they have no legal moves. It is fully discrete, deterministic, and complete.
## Formal model
- **Abstraction taken:** Direct representation. The traditional 5×5 grid is modeled as an undirected graph with and edges along horizontal, vertical, and diagonal lines.
- **Player/agent count:** Exactly 2 agents: Agent 0 (Goats) and Agent 1 (Tigers).
- **Turn model:** Strictly alternating sequential turns. Agent 0 (Goats) always takes the first move.
## Formal rules
R1. Grid Topology: Graph where . Edges exist between and if adjacent horizontally/vertically () or diagonally when and . Total .
R2. Setup: 4 Tigers occupy the 4 corner vertices: . 20 Goats begin in reserve.
R3. Phase 1 (Placement, turns 1 to 40):
- On turn (), Goat agent places 1 goat on any unoccupied vertex .
- On turn , Tiger agent chooses 1 tiger and either moves it along an edge to an adjacent vacant vertex, or executes a capture jump.
R4. Tiger Capture Jump: A tiger at vertex may jump over a goat at adjacent vertex to land on an unoccupied vertex if , , and are collinear. The goat at is permanently removed from the board (captured). Capturing is voluntary.
R5. Phase 2 (Movement, turn > 40):
- Once all 20 goats have been placed, Goat agent moves 1 goat along an edge to an adjacent vacant vertex. Goats cannot jump or capture.
- Tiger agent continues moving or jumping.
R6. [gap-fill] Loop-breaking: If any identical board state (exact positions of all tigers and goats on board + goats remaining in reserve + turn indicator) occurs 3 times, the game terminates immediately as a Draw.
R7. Win / Loss Conditions:
- Tiger Agent wins immediately if count of captured goats reaches 5.
- Goat Agent wins immediately if all 4 tigers have zero legal moves (adjacent moves or legal capture jumps) on Tiger Agent's turn.
## Edge cases
- Tie at the end condition: Possible only via R6 threefold repetition draw rule.
- A player with no legal move: If Tigers have no legal move, Goats win immediately (R7). If Goats have no legal move during Phase 2 (all trapped), [gap-fill] Tigers win immediately.
- Repetition / cycles: Resolved by R6 (threefold repetition ends in a draw).
- Simultaneous claims on the same resource or position: Not applicable — turns and vertex occupancy are mutually exclusive.
- Player elimination mid-round: Not applicable — 2-player non-elimination match.
- Resource exhaustion: Goat reserve exhausts after turn 40, triggering Phase 2 movement transition.
- Termination guarantee: Guaranteed by R6 (threefold repetition cap) and monotonic capture progression toward the 5-goat threshold.
## State representation
- `board`: Array of 25 values .
- `goats_in_reserve`: Integer (initial 20).
- `goats_captured`: Integer (initial 0).
- `current_player`: Enum .
- `state_history`: Map of state hash occurrence count.
## Action space
- `place_goat(vertex_id)`: Valid when `current_player == GOAT`, `goats_in_reserve > 0`, and `board[vertex_id] == EMPTY`.
- `move_goat(from_id, to_id)`: Valid when `current_player == GOAT`, `goats_in_reserve == 0`, `board[from_id] == GOAT`, `board[to_id] == EMPTY`, and edge exists.
- `move_tiger(from_id, to_id)`: Valid when `current_player == TIGER`, `board[from_id] == TIGER`, `board[to_id] == EMPTY`, and edge exists.
- `jump_tiger(from_id, jumped_goat_id, land_id)`: Valid when `current_player == TIGER`, `board[from_id] == TIGER`, `board[jumped_goat_id] == GOAT`, `board[land_id] == EMPTY`, and collinear edge continuity holds.
## Playability notes
- Single-player-vs-AI: Fully natural directly using Minimax / Alpha-Beta pruning or MCTS.
- Group games (n>4): Not applicable (inherently 2-player).
- Physical-skill games: Not applicable (pure abstract strategy).
- What is lost in the adaptation: None; perfect mathematical parity with the living tradition.
## Implementation hints
Extremely high suitability for reinforcement learning and search algorithms. State space is , branching factor is to . First milestone: implement board graph generation, legal move generator for both placement and movement phases, and terminal state checks.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Tigers and Goats (Nepal). (n.d.). Games of Countries. https://gamesofcountries.com/games/np-nepal/bagh-chal
@misc{gamesofcountries-np-nepal-bagh-chal,
title = {Tigers and Goats (Nepal)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/np-nepal/bagh-chal}
}