Skip to main content
Formal Specification

German Bat-and-Ball — Formal Specification

Germany · ball-team · Confidence: high

← Back to game page

Implementation Suitability

Suitability: adaptation-requiredFidelity: discretizedGap-fills: 1
# Schlagball — AI-optimized specification ## General idea A multi-agent team bat-and-ball invasion game played on a 2D rectangular field (100 m×30 m). The batting team strikes a ball into the field and attempts to run between two safe zones (*Schlagmal* and *Laufmal*), scoring 1 point per completed round trip. The fielding team recovers the ball, executing short relay passes to throw the ball at active runners in open territory (*Abwerfen*) or catch fly balls to trigger instantaneous role inversions. ## Formal model - **Abstraction taken:** The continuous field is discretized into a 2D grid with safe haven zones Zhome=[0,10]×[0,30] and Zbase=[60,70]×[0,30], separated by open transit territory Zopen=(10,60)×[0,30]. Real-time motion is discretized into synchronized ticks Δt=0.2 s. Ball contact on a runner is modeled as a line-of-sight projectile throw with a distance-dependent hit probability Phit(d). - **Player/agent count:** 2 teams (A and B), 12 agents per side. - **Turn model:** Synchronized ticks within timed innings; dynamic role swaps upon changeovers (*Wechsel*). ## Formal rules R1. **Field Dimensions & Safe Zones:** Field spans x∈[0,100],y∈[0,30]. - Home base (*Schlagmal*): x∈[0,10]. - Outpost base (*Laufmal*): x∈[60,70]. - An agent located inside Zhome or Zbase has safety status `SAFE = True` and cannot be put out by thrown balls. R2. **Batting Action:** The designated batter at Zhome executes `bat(aim_angle, power)`: - Ball launch vector (vx0,vy0) is sampled with dispersion based on power. - If fair (landing in x>10,y∈[0,30]), the batter transitions to `Runner` and may enter Zopen. R3. **Fly Catch Rule (*Fliegenball*):** If a fielder catches the ball on the fly (z>0) before it touches the ground: - Batter is declared out (`Out`). - Cumulative fly-catch counter increments: FlyCatches←FlyCatches+1. - If FlyCatches=3, an immediate clean changeover occurs (roles swap without chase). R4. **Runner Movement & Scoring:** - Runners in Zopen execute `run(dx, dy)` at maximum speed vrun=7.0 m/s. - A runner reaching Zbase may shelter safely. - A runner who completes Zhome→Zbase→Zhome scores +1 point for the batting team: Scorebat←Scorebat+1. R5. **Tagging / Hitting Runners (*Abwerfen*):** A fielder holding the ball within range d≤20 m of a runner in Zopen may submit `throw_at_runner(target_runner_id)`: - Hit probability: Phit=max⁡(0,1.0−d/20.0)×Skillthrower. - If hit succeeds, an immediate **Dynamic Changeover** is triggered: - The fielding team must run to enter Zhome safely. - The former batting team picks up the live ball and attempts to hit any fleeing opponent in Zopen. - If they succeed in counter-tagging an opponent before all reach Zhome, the batting right is retained; otherwise, the role swap is finalized. R6. **Inning & Match Structure:** The match is played over 2 timed halves of Thalf=3000 ticks (10 minutes each), or 4 completed innings. R7. [gap-fill] Tie-Breaking Rule:** If total run points are tied at the end of regulation time, one extra inning (both teams batting once) is played; if still tied, the team with fewer total outs conceded wins. ## Edge cases - Tie at the end condition: Resolved via R7 extra inning and out-concession tiebreaker. - A player with no legal move: Inactive runners shelter in Zhome or Zbase awaiting favorable batted balls. - Repetition / cycles: Bounded by the running match clock Thalf and out limits. - Simultaneous claims on the same resource or position: Multiple runners can occupy Zbase or Zhome simultaneously without collision restrictions. - Player elimination mid-round; turn order repair: If a batter is tagged out, they return to the batting queue at Zhome without scoring a point; team batting order advances to the next player. - Resource exhaustion (pieces, tokens, space, time): The single leather ball is tracked continuously; when dead, it resets to the home plate pitcher. - Termination guarantee: why the game provably ends: Guaranteed because regulation time Thalf strictly decrements each tick. ## State representation - **Persistent state:** Scoreboard (ScoreA,ScoreB), active inning, batting team ID, remaining match time trem. - **Per-player state:** 2D position (xi,yi), role (`Batter`, `Runner`, `Fielder`), base status (`In_Home`, `In_Transit`, `At_Base`), out counter. - **Per-turn ephemeral state:** Ball 3D state (x,y,z,vx,vy,vz), ball possession holder ID, live changeover flag. - **Observable information:** Perfect information; 2D positions of all 24 players, ball position, safe zones, and scoreboard are common knowledge. ## Action space - `run(dx, dy)`: spatial displacement vector. Precondition: agent is active on field. - `bat(aim_angle, power)`: batting swing. Precondition: agent is the active batter at Zhome. - `pass_ball(target_fielder_id)`: relay throw between fielders. Precondition: agent possesses ball. - `throw_at_runner(target_runner_id)`: put-out attempt against exposed runner. Precondition: agent possesses ball in range. ## Playability notes - Single-player-vs-AI: Natural; 1 human player controlling the batter/runner with AI teammates and fielders executing defensive coverage. - Group games (n>4): 24 agents reduce cleanly to a 2-agent strategic simulation (1 manager per team dictating batting choices, base-running greenlights, and fielder positioning). - Physical-skill games: Batting trajectory and ball-tag accuracy are parameterized by 2D Gaussian error functions scaled by agent skill. - What is lost in the adaptation: Sand beach sprint friction, physical dodge maneuvers, and the electric tension of a live island rivalry match. ## Implementation hints Discrete 2D spatial grid with state-machine changeover transitions. Milestone 1: implement batting dispersion, base-running state machine (Zhome↔Zbase), and *Abwerfen* tag checks, then verify scoring and clean role inversions.

Download as JSON

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

Download JSON
Cite this page

German Bat-and-Ball (Germany). (n.d.). Games of Countries. https://gamesofcountries.com/games/de-germany/schlagball

@misc{gamesofcountries-de-germany-schlagball,
  title = {German Bat-and-Ball (Germany)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/de-germany/schlagball}
}