Formal Specification
German Bat-and-Ball — Formal Specification
Germany · ball-team · Confidence: high
← Back to game pageImplementation 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 (). 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 and , separated by open transit territory . Real-time motion is discretized into synchronized ticks . Ball contact on a runner is modeled as a line-of-sight projectile throw with a distance-dependent hit probability .
- **Player/agent count:** 2 teams ( and ), 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 .
- Home base (*Schlagmal*): .
- Outpost base (*Laufmal*): .
- An agent located inside or has safety status `SAFE = True` and cannot be put out by thrown balls.
R2. **Batting Action:** The designated batter at executes `bat(aim_angle, power)`:
- Ball launch vector is sampled with dispersion based on power.
- If fair (landing in ), the batter transitions to `Runner` and may enter .
R3. **Fly Catch Rule (*Fliegenball*):** If a fielder catches the ball on the fly () before it touches the ground:
- Batter is declared out (`Out`).
- Cumulative fly-catch counter increments: .
- If , an immediate clean changeover occurs (roles swap without chase).
R4. **Runner Movement & Scoring:**
- Runners in execute `run(dx, dy)` at maximum speed .
- A runner reaching may shelter safely.
- A runner who completes scores point for the batting team: .
R5. **Tagging / Hitting Runners (*Abwerfen*):** A fielder holding the ball within range of a runner in may submit `throw_at_runner(target_runner_id)`:
- Hit probability: .
- If hit succeeds, an immediate **Dynamic Changeover** is triggered:
- The fielding team must run to enter safely.
- The former batting team picks up the live ball and attempts to hit any fleeing opponent in .
- If they succeed in counter-tagging an opponent before all reach , the batting right is retained; otherwise, the role swap is finalized.
R6. **Inning & Match Structure:** The match is played over 2 timed halves of 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 or awaiting favorable batted balls.
- Repetition / cycles: Bounded by the running match clock and out limits.
- Simultaneous claims on the same resource or position: Multiple runners can occupy or simultaneously without collision restrictions.
- Player elimination mid-round; turn order repair: If a batter is tagged out, they return to the batting queue at 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 strictly decrements each tick.
## State representation
- **Persistent state:** Scoreboard , active inning, batting team ID, remaining match time .
- **Per-player state:** 2D position , role (`Batter`, `Runner`, `Fielder`), base status (`In_Home`, `In_Transit`, `At_Base`), out counter.
- **Per-turn ephemeral state:** Ball 3D state , 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 .
- `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 (), 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 JSONCite 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}
}