Formal Specification
Castle Dodgeball — Formal Specification
Türkiye · ball-team · Confidence: low
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: discretizedGap-fills: 1
# Kaleli Yakan Top — AI-optimized specification
## General idea
A physical team dodgeball game where teams throw a ball at each other across a divided court. Each team features a "castle" zone behind the enemy lines. Eliminated players migrate to the castle to continue attacking from the rear, establishing a continuous crossfire dynamic that requires agents to balance frontal and rear threat vectors.
## Formal model
- **Abstraction taken:** The 18x9 meter court is discretized into two primary 9x9 halves (South: Team 0, North: Team 1), with two corresponding rear Castle zones. Positions are represented as coordinate grids. [gap-fill] The physical action is simulated in discrete ticks.
- **Player/agent count:** 2 teams of equal size `K` (where `K ∈ [6..12]`).
- **Turn model:** Real-time ticked. Each tick, all agents simultaneously declare their action.
## Formal rules
R1. Grid Zones:
- Main Court South (`S`): `y ∈ [-9.0, 0.0]`, `x ∈ [-4.5, 4.5]`. Occupied by Team 0 builders.
- Main Court North (`N`): `y ∈ [0.0, 9.0]`, `x ∈ [-4.5, 4.5]`. Occupied by Team 1 builders.
- Castle South (`CS`): `y > 9.0` (behind Team 1's half). Occupied by Team 0 goalkeepers/castle players.
- Castle North (`CN`): `y < -9.0` (behind Team 0's half). Occupied by Team 1 goalkeepers/castle players.
R2. Agent States:
- `lives[p]: integer` (builders start with 1, goalkeepers start with 3 when they enter the court).
- `zone[p]: Zone` (determines where they stand).
- `alive[p]: boolean` (starts true).
R3. Turn actions per tick:
- **Movement:** `move_to(coordinate)` within the agent's designated zone.
- **Passing:** `pass_to(teammate)` inside the home half or the castle.
- `P(Pass) = skill(passer) * (1.0 - distance / 20.0)`.
- **Throwing:** `throw_at(opponent_agent)`.
- `P(Catch) = skill(target) * 0.35` (only if ball is thrown from front).
- `P(Hit) = skill(thrower) * (1.0 - distance / 15.0)`.
R4. Action resolution hierarchy:
- 1. Passing actions are updated. If failed, ball is dropped (free ball).
- 2. Throws are updated:
- If `Catch` succeeds:
- Target agent gains ball possession.
- Target agent gains "+1 Can": `lives[target] += 1`.
- If `Catch` fails and `Hit` succeeds:
- Target agent loses a life: `lives[target] -= 1`.
- If `lives[target] == 0`:
- Target is eliminated from main court. Their zone changes: `zone[target] = Castle`.
- They migrate immediately to their team's castle. Their lives are set to 1.
R5. Goalkeeper Entry (Kaleci Girişi):
- If the number of active agents inside Main Court South becomes 0:
- Team 0's goalkeeper (who started in Castle South) must immediately enter Main Court South: `zone[gk_0] = Main_Court_South`, `lives[gk_0] = 3`.
- Same logic applies to Team 1.
R6. End condition:
- If a team has zero players remaining in the main court (including their goalkeeper), and no players left to enter, the other team wins the round: `scores[winner_team] += 1`.
R7. Win condition: Best of three rounds (first team to 2 points wins).
## Edge cases
- **Tie at the end condition:** Not applicable (strict elimination).
- **A player with no legal move:** Not applicable.
- **Repetition / cycles:** Bounded, because catches do not restore eliminated players to the main court; once a player enters the castle, they cannot return to the main court. Thus, main court populations strictly decrease monotonically, guaranteeing game termination.
- **Simultaneous claims on the same resource:** If two players on the same team attempt to claim a free ball on the same tick, possession is resolved in favor of the closer agent.
- **Player elimination mid-round:** Handled directly by R4's zone change.
- **Resource exhaustion:** Not applicable.
- **Termination guarantee:** Guaranteed by the irreversible transition of players from the main court to the castle.
## State representation
- Persistent state:
- `scores: Array[2] of integer`.
- `lives: Array[2 * K] of integer`.
- `zones: Array[2 * K] of Zone`.
- `ball_carrier_index: integer` (-1 if ball is free, with ball coordinate).
- Ephemeral state:
- `active_throws: List of Throw`.
- Information set: Public, fully observable.
## Action space
- `move_agent(coordinate)`: move within designated zone.
- `pass_ball(target_id)`: pass to teammate.
- `throw_ball(target_id)`: throw to hit opponent.
## Playability notes
- Single-player-vs-AI: Excellent. Can be implemented as a tactical action game where the player dodges AI throws from both the front and rear castle zones while timing passes to teammates.
- Group games: Generalizes to any even team sizes.
- Physical-skill games: Fully abstracted via zone geometry and distance-based success probability curves.
- What is lost: The pure physical thrill of catching and dodging a fast-moving ball with real-time body contortions.
## Implementation hints
Medium-high complexity. The core challenge is tracking the coordinates of all K players, identifying which zone they belong to, and handling the goalkeeper transition (R5). First milestone: build the 4-zone state array, implement the passing and throwing resolvers, and track player coordinates.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Castle Dodgeball (Türkiye). (n.d.). Games of Countries. https://gamesofcountries.com/games/tr-turkiye/kaleli-yakan-top
@misc{gamesofcountries-tr-turkiye-kaleli-yakan-top,
title = {Castle Dodgeball (Türkiye)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/tr-turkiye/kaleli-yakan-top}
}