Formal Specification
Between Two Fires — Formal Specification
Serbia · ball-team · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 1
# Između dve vatre — AI-optimized specification
## General idea
A tactical multi-agent dodgeball and crossfire game played on a 2D partitioned grid. Two opposing teams attempt to eliminate defenders in the enemy center court through coordinate passing and thrown attacks between their front-line players and an Endzone Captain stationed behind enemy lines, while defenders dodge or execute live-ball catches to revive eliminated teammates.
## Formal model
- **Abstraction taken:** The 18×9m court is modeled as a 2D discrete grid of size , partitioned into 4 zones:
- `Endzone_B`: (occupied by Captain B and eliminated Team B agents)
- `Zone_A`: (occupied by Team A field agents)
- `Zone_B`: (occupied by Team B field agents)
- `Endzone_A`: (occupied by Captain A and eliminated Team A agents)
- **Player/agent count:** 2 teams of agents (3 Field Agents, 1 Captain).
- **Turn model:** Synchronous discrete-time ticks .
## Formal rules
R1. Initialization: Agents spawn in their respective zones. Initial ball possession is assigned to Captain A at . Captain lives initialized `captain_lives[A] = 3`, `captain_lives[B] = 3`.
R2. Movement Constraints:
- Agents in `Zone_A` must remain in .
- Agents in `Zone_B` must remain in .
- Agents in `Endzone_A` must remain in (unless Captain enters court under R5).
- Agents in `Endzone_B` must remain in .
R3. Ball Actions per Tick: An agent possessing the ball can execute:
- `PASS(target_teammate)`: Ball travels linearly across the grid toward the target agent.
- `THROW_ATTACK(target_enemy)`: Ball travels toward an enemy field agent.
R4. Ball Interception, Hit & Catch Mechanics:
- When a `THROW_ATTACK` reaches an enemy agent:
- Dodge / Catch resolution: Probability of clean catch .
- If caught cleanly: No elimination occurs; the catching team's stored lives counter increment: `stored_lives[team] += 1`. If an eliminated teammate is in the endzone, the teammate is instantly revived and respawns in their inner field zone.
- If not caught: Probability of hit . If hit, the target is marked `eliminated` and instantly transferred to their team's Endzone.
- If missed: Ball continues to the rear endzone, where an endzone teammate claims possession.
R5. Captain Entry: When all field agents of a team are eliminated, that team's Captain leaves their endzone and enters the central field zone with `captain_lives = 3`. Each time the Captain is struck and fails to catch, `captain_lives` is decremented by 1.
R6. Win Condition: When a team's Captain loses all 3 lives inside the central zone, that team is eliminated, and the opposing team wins the set.
R7. [gap-fill] Turn/Tick Cap: If a single set exceeds ticks, the team with more active field players (or more remaining Captain lives) is declared the set winner.
## Edge cases
- Tie at the end condition: Resolved under R7 by comparing active field counts and Captain lives; if identical, sudden-death 1-life Captain duel resolves the set.
- A player with no legal move: Not applicable; agents can always execute `MOVE(STAY)` or position shifts within their valid zone.
- Repetition / cycles: Bounded by R7's 500-tick cap and irreversible loss of lives.
- Simultaneous claims on the same resource or position: Ball possession is determined by proximity and priority to the designated pass recipient.
- Player elimination mid-round / turn order repair: Eliminated field agents shift to their team's Endzone, where they actively participate in catching and throwing.
- Resource exhaustion: Ball is a single persistent entity.
- Termination guarantee: Guaranteed by monotonic decrement of player lives and R7 tick cap.
## State representation
- Persistent state: `sets_won: {A: int, B: int}`, `captain_lives: {A: int, B: int}`.
- Per-tick state: `agent_positions: dict[AgentID, (int, int)]`, `agent_status: dict[AgentID, enum[FIELD, ENDZONE, OUT]]`, `ball_pos: (int, int)`, `ball_holder: Optional[AgentID]`, `ball_in_flight: Optional[FlightVector]`.
- Observable information: Fully observable 2D state for all agents.
## Action space
- `move(dx: int, dy: int)`: Zone-constrained grid movement.
- `throw_attack(target_id: int, speed: float)`: Attack throw.
- `pass_ball(target_id: int)`: Pass throw to teammate or captain.
- `attempt_catch()`: Reactive action when targeted.
## Playability notes
- Single-player-vs-AI: Highly playable; human player commands an agile field dodger/catcher against AI crossfire passing tactics.
- Group games (n>4): Benchmark multi-agent environment (MARL) featuring 2v2 cross-zone coordination.
- Physical-skill games: Reflex dodging and catching are mapped to velocity, distance, and player attribute functions.
- What is lost in the adaptation: Continuous body contortions, faking arm angles, and sting of the rubber ball are abstracted into discrete grid states.
## Implementation hints
Standard partitioned 2D gridworld. Implement zone movement masks first to strictly enforce team borders, then build linear projectile trajectories for passing and attacks.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Between Two Fires (Serbia). (n.d.). Games of Countries. https://gamesofcountries.com/games/rs-serbia/izmedju-dve-vatre
@misc{gamesofcountries-rs-serbia-izmedju-dve-vatre,
title = {Between Two Fires (Serbia)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/rs-serbia/izmedju-dve-vatre}
}