Formal Specification
Grid Line Evasion / Hadang — Formal Specification
Indonesia · chase-tag · Confidence: high
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 3
# Gobak Sodor (Hadang) — AI-optimized specification
## General idea
A simultaneous-tick team evasion game on a 2D discrete grid representation of a 6-box court (15m x 9m). Attackers navigate from zone 0 to zone 3 and back while dodging 5 defenders constrained to linear rail paths (4 transverse lines + 1 central longitudinal spine). A single legal contact on an attacker causes elimination or role turnover.
## Formal model
- **Abstraction taken:** Court is discretized into a coordinate grid of size (0.5m grid units). Defenders are strictly constrained to 1D manifolds (transverse lines for defenders 0..3, plus defender 0 moving on ). Attackers move freely inside the interior bounding box .
- **Player/agent count:** 2 teams of 5 agents each (Team A = Attackers, Team D = Defenders).
- **Turn model:** Simultaneous discrete execution ticks ( step per round).
## Formal rules
R1. Setup:
- Defenders spawn on their assigned lines: at (capable of moving along and ), on , on , on , on or [gap-fill].
- Attackers spawn in the entry staging area .
R2. Action execution: Each tick, all active agents submit a movement vector .
- Defenders must maintain on their assigned line coordinates.
- Attackers must maintain .
R3. Collision & tagging resolution:
- An attacker is tagged at tick if grid unit and defender is on their legal line.
- If tagged, attacker is removed from active play (`eliminated = true`).
R4. Scoring:
- Forward crossing: An attacker crossing line records `phase = returning` and awards 1 point.
- Full circuit (*sodor*): An attacker with `phase == returning` who successfully re-crosses into the staging area awards 3 bonus points.
R5. Turn-over / match termination:
- A round ends when all 5 attackers are either eliminated or have completed the circuit, or when maximum tick limit is reached [gap-fill].
- Teams swap attacking/defending roles for Round 2. Aggregate score across both rounds decides the winner.
## Edge cases
- Tie at the end condition: If aggregate points are equal after 2 rounds, a sudden-death overtime round is played with 1 attacker vs 5 defenders with a 60-tick timer [gap-fill].
- A player with no legal move: In discrete grid movement, (stay in place) is always legal.
- Repetition / cycles: Bounded by max tick clock ( ticks per half), guaranteeing finite play even if attackers stall in a safe pocket.
- Simultaneous claims on the same resource or position: Multiple attackers may occupy the same grid cell or pass the same defender simultaneously; each is evaluated independently for tagging.
- Player elimination mid-round: Eliminated attackers are immediately removed from the board; other active attackers continue without state interruption.
- Resource exhaustion: Not applicable (infinite steps within time limit).
- Termination guarantee: Enforced by the finite match countdown timer .
## State representation
- Persistent state:
- `attacker_positions`: array of 5 coordinates .
- `defender_positions`: array of 5 coordinates .
- `attacker_status`: array of 5 enums (`STAGING`, `ADVANCING`, `RETURNING`, `COMPLETED`, `ELIMINATED`).
- `score_team_A`, `score_team_B`: integers.
- `current_tick`: integer .
- Observable information: Fully observable (all positions and rails are public).
## Action space
- `move(dx, dy)`: subject to Manhattan norm and rail/boundary constraints.
## Playability notes
- Single-player-vs-AI: Highly playable; a human player can control 1 attacker (or 1 defender) while heuristic/RL agents control teammates and opponents.
- Group games (n>4): Can be reduced to a 1-attacker vs 3-defender mini-court without altering underlying evasion dynamics.
- Physical-skill games: Physical feints and deceleration are abstracted into 4-way discrete direction decisions.
- What is lost in the adaptation: Continuous momentum, arm reach, and dynamic body feints are discretized into a static 1-grid-unit contact radius.
## Implementation hints
Simple 2D grid matrix with vector collision checks. Branching factor is joint actions per team per tick. First milestone: Implement 1 attacker vs 2 defenders on a 2-line mini-grid to validate collision and scoring logic.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Grid Line Evasion / Hadang (Indonesia). (n.d.). Games of Countries. https://gamesofcountries.com/games/id-indonesia/gobak-sodor
@misc{gamesofcountries-id-indonesia-gobak-sodor,
title = {Grid Line Evasion / Hadang (Indonesia)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/id-indonesia/gobak-sodor}
}