Formal Specification
Border Guard / Boundary Dodgeball — Formal Specification
North Macedonia · ball-team · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 5
# Граничар — AI-optimized specification
## General idea
A discretized court dodgeball game played on a 2D partitioned grid. Two teams occupy opposing half-courts, each supported by an outfield Border Guard positioned behind enemy lines. Teams execute pincer passing across enemy territory to create high-probability attack angles, eliminating opponents with direct strikes while catching incoming balls to revive eliminated teammates.
## Formal model
- **Abstraction taken:** The court is discretized into a cell grid divided into Left Territory (cols ), Center Neutral Dividing Line (col ), Right Territory (cols ), and Outfield Border Zones (cols and ). Ball flight is discretized into targeted throws with stochastic hit/catch resolution.
- **Player/agent count:** 2 teams () of agents (), each with infielders and 1 Border Guard ().
- **Turn model:** Tick-based simultaneous movement and throw actions.
## Formal rules
R1. **Court Setup & Zoning:**
- Team A Infield: .
- Team B Infield: .
- Team A Guard Zone ( + eliminated players): .
- Team B Guard Zone ( + eliminated players): .
R2. **Agent State:** Each agent maintains:
- Position , Team ID .
- `Location` .
- `Lives` (Infielders , Border Guard [gap-fill]).
- `Active` .
R3. **Action Space per Tick:**
- Agents without ball: `move(dx, dy)` (, constrained to legal team zone).
- Agent possessing ball: `pass_ball(target_teammate)` or `throw_attack(target_enemy)`.
R4. **Throw & Hit Resolution:**
- Attack throw targeting enemy infielder at distance :
- Dodge probability: .
- Catch probability: (if targeted agent elects to attempt a catch).
- Direct strike probability: .
- If hit succeeds: Target loses 1 life (). If , agent transitions , moving to their respective outfield zone.
- If catch succeeds: Thrower misses, ball possession transfers to target , and the earliest-eliminated teammate in outfield with is revived () [gap-fill].
R5. **Border Guard Last Stand:** When a team has 0 infielders remaining, their Border Guard moves from the Outfield Zone into their team's Infield with their remaining lives ().
R6. [gap-fill] Ricochet Invariance:** A thrown ball that hits a player immediately drops dead to the ground; secondary ricochets cannot eliminate additional players.
R7. **Win Condition:** A team wins when all opposing agents (including the opposing Border Guard) are reduced to .
## Edge cases
- Tie at the end condition: Not applicable; ball possession is alternating and eliminations are strictly discrete until one team is eliminated.
- A player with no legal move: Inactive/eliminated players submit `wait()`; active players always have valid moves within their zone.
- Repetition / cycles: Bounded; passing without attacking is constrained by a 5-pass limit [gap-fill] forcing a throw attack.
- Simultaneous claims on the same resource or position: Grid cells permit multiple agents to occupy the same zone cell; ball possession is unique to one agent at a time.
- Player elimination mid-round; turn order repair: Eliminated agents move to the outfield zone and continue participating as outfield throwers without disrupting game flow.
- Resource exhaustion: Ball is persistent; players are finite.
- Termination guarantee: [gap-fill] Guaranteed by the finite life pool and positive non-zero hit probability per attack throw ().
## State representation
- **Persistent state:** Team rosters, total player counts, life counts per agent, match score.
- **Per-tick ephemeral state:** Agent coordinates, ball holder ID (or free ball coordinates), pass counter .
- **Observable information:** Fully observable; all player positions, life counts, and ball status are public.
## Action space
- `move(dx, dy)`: Parameters .
- `pass_ball(target_id)`: Pass to teammate within sight.
- `throw_attack(target_id)`: Strike throw at enemy agent.
## Playability notes
- Single-player-vs-AI: Playable with human controlling 1 infielder or Guard with AI teammates/opponents.
- Group games (n>4): Natively accommodates large multiplayer teams ( per side) via 2D spatial zoning.
- Physical-skill games: Real-time ball flight reaction and tactile catching grip are abstracted into range-dependent probabilities.
- What is lost in the adaptation: The loud gym hall echoes, frantic screaming of passing strategies, and diving onto hardwood floors.
## Implementation hints
Medium complexity. Requires 2D grid partitioning, line-of-sight checks for passing, and team AI positioning. First milestone: implement R1–R4 with 4v4 agents, validating that outfield transitions and revivals maintain legal state.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Border Guard / Boundary Dodgeball (North Macedonia). (n.d.). Games of Countries. https://gamesofcountries.com/games/mk-north-macedonia/granichar
@misc{gamesofcountries-mk-north-macedonia-granichar,
title = {Border Guard / Boundary Dodgeball (North Macedonia)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/mk-north-macedonia/granichar}
}