Formal Specification
King ball — Formal Specification
Finland · ball-team · Confidence: low
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: discretizedGap-fills: 3
# Kuningaspallo — AI-optimized specification
## General idea
A historical Finnish bat-and-ball team game that served as the direct ancestor of modern Pesäpallo. Batters hit a vertically tossed ball from home base and sprint across an open rectangular field toward an outfield base and back. Unlike American baseball or cricket, the running channel features an intermediate sanctuary zone—the "King's Circle" (*kuninkaanympyrä*)—where multiple runners may take refuge simultaneously while fielders attempt to "burn" (*polttaa*) runners between bases with thrown balls.
## Formal model
- **Abstraction taken:** Continuous 2D field running and physical ball-throwing are discretized into a linear base graph consisting of four discrete nodes: . Batting trajectories, fly-catching, and throwing burns are resolved via parameterized stochastic models.
- **Player/agent count:** 2 teams of agents each (). At any time, Team is Batting and Team is Fielding.
- **Turn model:** Discrete turn-based batting sequence within sequential half-innings. When a ball is put into play, a sub-tick sequence resolves simultaneous runner advancements and fielding throws.
## Formal rules
R1. **Match Structure:** The match consists of fixed innings (default ). Each inning has two half-innings: Team 1 bats / Team 2 fields, then roles invert.
R2. **Batting Sequence:** Batters step up in a fixed circular batting order .
- The fielding Pitcher tosses the ball upward; the active batter selects a swing power and aim vector.
- Outcome distribution resolves to: `fly_out` (caught in air out), `fair_hit` (ball lands in fair territory), or `foul_miss` (strike). [gap-fill] 3 foul misses by a single batter equals 1 out.
R3. **Base Running & Sanctuary:**
- On a `fair_hit`, the active batter becomes an active runner and may advance from .
- Any runners already stationed in or may choose to `advance` or `hold`.
- **Sanctuary Property:** An unlimited number of friendly runners may hold safely inside or simultaneously. Runners inside sanctuary nodes cannot be burned.
R4. **Fielding & Burning Resolution:**
- While runners are in transit between graph nodes, the fielding team selects which active runner to target with a thrown ball.
- Burn outcome succeeds with probability .
- If burned, the runner is out.
R5. **Scoring:** A runner who reaches and returns safely to without being burned scores 1 run for their team.
R6. **Side Switch (Vuoronvaihto):** [gap-fill] Per standard 1903 Wilskman codification, a half-inning ends immediately upon accumulating 3 outs (or if 1 burn occurs under the historical sudden-switch variant).
R7. **Win Condition:** After full innings, the team with the higher cumulative run score wins. If tied, [gap-fill] 1 additional tie-breaker inning is played; if still tied, the game is declared a draw.
## Edge cases
- **Tie at the end condition:** Handled by R7 (1 tie-breaker inning, then draw).
- **A player with no legal move:** Fielders always have throw/hold actions; runners always have advance/hold actions; batters always have swing/pass actions.
- **Repetition / cycles:** Runners cannot loiter indefinitely; on every hit, active runners must either hold in sanctuary or advance. Maximum 3 outs per half-inning guarantees finite innings.
- **Simultaneous claims on the same resource or position:** Sanctuary nodes allow unlimited simultaneous co-occupation; no resource contention exists.
- **Player elimination mid-round; turn order repair:** An out runner is removed from the base paths and returned to the batting dugout; the circular batting order index simply advances to the next player.
- **Resource exhaustion (pieces, tokens, space, time):** Fixed team rosters and invariant discrete base nodes. Match terminates within innings.
- **Termination guarantee: why the game provably ends:** Each half-inning accumulates outs monotonically toward 3 (or batter exhaustion), and total innings are strictly finite.
## State representation
- **Persistent state:** Inning number ; half-inning phase ; team run scores ; out counter ; batting order indices.
- **Per-player state:** Role ; current node location ; runner speed attribute.
- **Per-turn ephemeral state:** Batted ball trajectory type; list of runners advancing; chosen fielding target runner; resolved burn outcomes.
- **Observable information:** Fully observable game state.
## Action space
- `batter_swing(power, direction)`: (Active batter).
- `runner_advance(runner_id)` / `runner_hold(runner_id)`: (For each runner on base paths).
- `fielder_throw_burn(target_runner_id)`: (Fielding team coordinator).
## Playability notes
- **Single-player-vs-AI:** Highly playable. Human acts as Batting Manager (deciding when base runners in King's Circle should risk sprinting home) against an AI Fielding Coordinator.
- **Group games ():** Reduces naturally to 2 agents: Agent 1 (Offensive Manager controlling all batters/runners) vs. Agent 2 (Defensive Manager controlling pitcher and fielders).
- **Physical-skill games:** Batting contact and throwing burns are modeled via standard logistic regression samplers parameterized by distance and skill attributes.
- **What is lost in the adaptation:** Physical ball flight perception, raw sprinting exertion, and the sting/impact of a tennis/leather ball thrown directly at a runner's torso.
## Implementation hints
- Implement as a discrete finite state machine (FSM) cycling through Batting Ball Resolution Running/Burning Sub-ticks Out/Run Accounting Inning Transition.
- Branching factor: Small: batting choices runner advance combinations () = approx. 40 actions per offensive step.
- Suggested first milestone: Implement a 1-inning game with 3 batters, 1 King's Circle node, and deterministic 50% burn rates to verify out accounting and run scoring.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
King ball (Finland). (n.d.). Games of Countries. https://gamesofcountries.com/games/fi-finland/kuningaspallo
@misc{gamesofcountries-fi-finland-kuningaspallo,
title = {King ball (Finland)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/fi-finland/kuningaspallo}
}