Skip to main content
Formal Specification

Trench Game / Trench Crossing and Evasion — Formal Specification

India · chase-tag · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 2
# Atya Patya — AI-optimized specification ## General idea Atya Patya is an ancient Indian territorial grid-evasion and pursuit sport. Played on a field partitioned by nine transverse trenches (*patis*) and a bisecting longitudinal trench (*Sur-pati*), nine attackers attempt to infiltrate and cross all nine compartments to reach the far end zone. Eight defenders are strictly constrained to lateral motion along their individual horizontal trenches, while a specialized ninth defender (*Sur*) commands both the front trench and the central vertical corridor to intercept attackers. ## Formal model - **Abstraction taken:** The 27.74 m × 7.01 m court is discretized into a 2D grid of size L×W (90×24 discrete spatial cells). The 9 transverse trenches T1,…,T9 occupy fixed horizontal rows. The longitudinal *Sur-pati* Spati occupies a central vertical column segment intersecting T1 through T5. Movement is executed in simultaneous discrete time ticks Δt=0.2 seconds. - **Player/agent count:** 2 teams of 9 agents (Tattack,Tdefend). - **Turn model:** 2 innings per match. Each inning contains two 7-minute turns (2100 ticks at 5 Hz), where teams alternate between offensive (Attackers) and defensive (Defenders) roles. ## Formal rules R1. **Court Architecture & Initial Positions:** - Field partitioned into 9 horizontal trench zones T1,…,T9 spaced evenly, with 8 rectangular intermediate compartments C1,…,C8 between them. - *Sur-pati* Spati bisects compartments C1 through C4, creating dual left/right sub-compartments. - Defenders D1,…,D8 are assigned to trenches T2,…,T9 respectively (Di restricted to y-coordinate of Ti+1). - Defender D0 (*The Sur*) is assigned to T1∪Spati. - All 9 Attackers A1,…,A9 start behind T1 in the offensive staging zone. R2. **Movement Constraints:** - **Trench Defenders (D1…D8):** May only move laterally along the x-axis within their assigned trench Ti (y=y(Ti)). They cannot step into compartments Ck. - **The Sur (D0):** May move laterally along T1, and longitudinally along the central strip Spati between T1 and T5. - **Attackers (A1…A9):** May move in 2D space (x,y) inside compartments Ck and sprint across trenches Ti. Attackers can advance or retreat within already-breached compartments. R3. **Tagging & Elimination:** - A Defender tags an Attacker if their distance in the grid ≤1 cell and the Defender's position remains strictly within their designated trench / *Sur-pati* boundary. - A tagged Attacker is declared "Out" and removed from the active turn immediately. - Any Attacker who steps outside the outer field boundary (x<0 or x>W) is declared "Out". - Defenders cannot reach backwards beyond their trench line into a preceding compartment [gap-fill: standard federation forward-tag rule]. R4. **Scoring & Lona:** - **Successful Crossing:** Any Attacker Aj who safely crosses past T9 into the final end zone without being tagged scores +1 point for Tattack. - **Lona Bonus:** If all remaining non-eliminated Attackers successfully cross T9, and at least 1 attacker scored, a **Lona** is awarded: +4 bonus points to Tattack. - Upon a Lona, all surviving Attackers reset to the staging area to launch a new offensive wave within their remaining turn time. R5. **Turn & Match Resolution:** - An attacking turn terminates when all 9 Attackers are eliminated, or when the 7-minute clock (2100 ticks) expires. - Roles swap: Tattack↔Tdefend. - The team with the highest aggregate points across both innings wins the match. - [gap-fill] If scores are tied after 2 innings, a 1-inning sudden-death tiebreaker (3.5-minute turns) is conducted. ## Edge cases - **Tie at the end condition:** Handled by R5 (sudden-death tiebreaker inning). - **A player with no legal move:** Not applicable — players always have at least a `hold_position()` option. - **Repetition / cycles:** Attackers hovering in a safe compartment without advancing are bounded by the strict 7-minute turn countdown. - **Simultaneous claims on the same resource or position:** Multiple attackers may occupy the same compartment simultaneously. Tags are resolved on instantaneous spatial contact during tick updates. - **Player elimination mid-round; turn order repair:** Eliminated attackers are removed from active play; surviving attackers continue their run independently without turn re-indexing. - **Resource exhaustion (pieces, tokens, space, time):** Hard time limit of 7 minutes per turn guarantees turn termination. - **Termination guarantee: why the game provably ends:** Ticked countdown from 2100 to 0 guarantees that every turn, inning, and match terminates in finite time. ## State representation - **Persistent state:** - Inning index ∈{1,2}; Turn index ∈{1,2}. - Match scores (SteamA,SteamB). - Active offensive team ID ∈{Team A,Team B}. - **Per-tick ephemeral state:** - time_remaining_ticks∈[0,2100]. - Attacker states: (xj,yj,statusj) for j∈{1,…,9}, where status∈{staging,active,scored,eliminated}. - Defender coordinates: (xi,yi) for i∈{0,…,8}. - **Observable information:** Fully observable 2D positional state. ## Action space - `move_attacker(agent_id, dx, dy)`: where (dx,dy)∈{(0,0),(±1,0),(0,±1),(±1,±1)}. - `move_defender(agent_id, dx)`: for D1…D8, lateral movement along assigned trench. - `move_sur(dx, dy)`: for D0, movement constrained to T1∪Spati. - `tag(target_id)`: Defenders only. Checks collision and tag validity. ## Playability notes - **Single-player-vs-AI:** Highly suited for tactical multi-agent pathfinding. The human controls the offensive squad using wave tactics and feints against an algorithmic defensive line. - **Group games (n>4):** Natural 9 vs 9 team game reduces cleanly to a 2-agent Commander model: Offensive Coach (commanding 9 attackers) vs Defensive Coach (commanding 9 defenders). - **Physical-skill games:** Physical agility and reach are discretized into grid velocity limits and tag radii. - **What is lost in the adaptation:** The physical thrill of diving across chalk lines and lateral hip feints under sunlit dirt conditions. ## Implementation hints - Implement the court as a 2D integer matrix where trenches and compartments have distinct region tags for instantaneous collision detection. - Branching factor: At the commander level, each attacker has 9 movement directions and each defender has 3 movements, leading to a large joint action space. Decouple into individual agent decision loops or hierarchical macro-actions (e.g. `feint_left`, `cross_trench(k)`). - Suggested first milestone: Build the 9-trench geometry and Sur-pati corridor; simulate 1 attacker trying to cross against 3 defenders to validate the collision and tag mechanics.

Download as JSON

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

Download JSON
Cite this page

Trench Game / Trench Crossing and Evasion (India). (n.d.). Games of Countries. https://gamesofcountries.com/games/in-india/atya-patya

@misc{gamesofcountries-in-india-atya-patya,
  title = {Trench Game / Trench Crossing and Evasion (India)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/in-india/atya-patya}
}