Formal Specification
The Stork Lost His Cap — Formal Specification
Czechia · chase-tag · Confidence: high
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 2
# Čáp ztratil čepičku — AI-optimized specification
## General idea
A spatial pursuit-evasion game with dynamic resource-based immunity. The primary pursuer ("Stork") selects and broadcasts a color attribute from a finite discrete color set. All runner agents must race across a 2D grid arena to occupy cells possessing the designated color attribute before being intercepted by the Stork. Immunity is granted only while occupying an active matching color cell.
## Formal model
- **Abstraction taken:** The continuous physical environment with varied real-world objects is abstracted into a discrete 2D grid where each cell possesses a static categorical color attribute .
- **Player/agent count:** 1 Stork agent (), Runner agents (, default ).
- **Turn model:** Two-phase turn structure: (Phase 1) Stork broadcasts color ; (Phase 2) Real-time discrete tick execution (simultaneous movement) for ticks until a tag occurs or time expires.
## Formal rules
R1. Setup: Arena is a grid (default ). Each cell is initialized with a static color from color set . Stork starts at center . Runners start distributed across the perimeter.
R2. Phase 1 (Color Announcement): chooses an active color and broadcasts it to all agents.
R3. Phase 2 (Pursuit Ticks): The game executes in synchronous discrete ticks (default ticks).
- Every tick, each agent chooses a movement vector with (von Neumann neighborhood or stay).
- [gap-fill] Speed Differential: Stork moves 1 cell per tick. Runners move 1 cell per tick, but cannot enter cells outside the arena bounds.
R4. Immunity Condition: A runner occupying cell is **immune** if and only if .
R5. [gap-fill] Cell Capacity: Each colored cell can grant immunity to at most runners simultaneously. If a third runner enters, the most recent entrant remains vulnerable until finding an uncrowded matching cell.
R6. Tag Resolution: If Stork occupies the same cell as runner during tick , and is not immune, is tagged immediately.
R7. Role Transition & Scoring:
- If a runner is tagged, receives a penalty point, becomes the Stork for the next round, and the current round terminates.
- If tick timer reaches with no runner tagged, receives 0 points, runners receive +1 survival point, and must initiate a new round with a different color .
## Edge cases
- Tie at the end condition: If multiple non-immune runners occupy the cell entered by the Stork on the same tick, the runner with the lowest index is tagged first.
- A player with no legal move: Passing/staying in the current cell is always legal for all agents.
- Repetition / cycles: Bounded strictly by the tick limit per round.
- Simultaneous claims on the same resource or position: Handled by R5 (cell capacity ); ties on simultaneous entry are broken by runner index.
- Player elimination mid-round: In single-round matches, a tag immediately concludes the round. In tournament elimination, tagged runners transition to inactive spectator state.
- Resource exhaustion: Not applicable; cell colors are immutable and persistent across all rounds.
- Termination guarantee: Each round terminates in at most ticks or upon the first tag event, provably guaranteeing finite execution.
## State representation
- Persistent state: Grid dimensions , color map matrix , agent roles, cumulative scoreboard.
- Per-tick ephemeral state: Coordinates , runner coordinates , active broadcast color , tick counter , per-cell runner occupancy counts.
- Observable information: Fully observable. All agents know the full color grid map, agent positions, active color , and tick timer.
## Action space
- `call_color(color_id)`: Executed exclusively by the Stork at round start, selecting .
- `move(dx, dy)`: Executed simultaneously by all agents every tick; with .
## Playability notes
- Single-player-vs-AI: Highly playable. Human as Stork tries to optimize color calling to trap AI runners far from matching zones; Human as Runner uses pathfinding (A*) to reach safe color zones while evading an aggressive interceptor Stork AI.
- Group games (n>4): Reduces cleanly to 1v1 (1 Stork vs. 1 Runner) on an grid without altering core dynamics.
- Physical-skill games: Physical scanning and sprinting are abstracted to shortest-path search and grid movement execution.
- What is lost: Visual camouflage tricks (e.g. noticing a subtle red button on someone's collar) and the tactile rush of touching a friend's sleeve are abstracted to cell coordinate lookups.
## Implementation hints
Represent the color map as a 2D integer matrix where each integer corresponds to an enum color. Pathfinding for AI runners can use standard BFS/Dijkstra toward the nearest coordinate with . The Stork AI should compute the minimum distance to the closest vulnerable runner and intercept their path. First milestone: build a randomized color grid with deterministic tick-based 1v1 pursuit and color-based immunity validation.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
The Stork Lost His Cap (Czechia). (n.d.). Games of Countries. https://gamesofcountries.com/games/cz-czechia/cap-ztratil-cepicku
@misc{gamesofcountries-cz-czechia-cap-ztratil-cepicku,
title = {The Stork Lost His Cap (Czechia)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/cz-czechia/cap-ztratil-cepicku}
}