Skip to main content
Formal Specification

The Stork Lost His Cap — Formal Specification

Czechia · chase-tag · Confidence: high

← Back to game page

Implementation 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 (x,y) possesses a static categorical color attribute C(x,y)∈{RED, BLUE, GREEN, YELLOW, WHITE, BLACK}. - **Player/agent count:** 1 Stork agent (S), n Runner agents (R1,…,Rn, default n=4). - **Turn model:** Two-phase turn structure: (Phase 1) Stork broadcasts color c∗; (Phase 2) Real-time discrete tick execution (simultaneous movement) for T ticks until a tag occurs or time expires. ## Formal rules R1. Setup: Arena is a W×H grid (default 12×12). Each cell (x,y) is initialized with a static color from color set 𝒞. Stork S starts at center (6,6). Runners Ri start distributed across the perimeter. R2. Phase 1 (Color Announcement): S chooses an active color c∗∈𝒞 and broadcasts it to all agents. R3. Phase 2 (Pursuit Ticks): The game executes in synchronous discrete ticks t=1,2,…,Tmax⁡ (default Tmax⁡=30 ticks). - Every tick, each agent A∈{S,R1,…,Rn} chooses a movement vector (dx,dy) with |dx|+|dy|≤1 (von Neumann neighborhood or stay). - [gap-fill] Speed Differential: Stork S moves 1 cell per tick. Runners move 1 cell per tick, but cannot enter cells outside the arena bounds. R4. Immunity Condition: A runner Ri occupying cell (x,y) is **immune** if and only if C(x,y)==c∗. R5. [gap-fill] Cell Capacity: Each colored cell can grant immunity to at most K=2 runners simultaneously. If a third runner enters, the most recent entrant remains vulnerable until finding an uncrowded matching cell. R6. Tag Resolution: If Stork S occupies the same cell as runner Ri during tick t, and Ri is not immune, Ri is tagged immediately. R7. Role Transition & Scoring: - If a runner Ri is tagged, Ri receives a penalty point, becomes the Stork for the next round, and the current round terminates. - If tick timer reaches Tmax⁡ with no runner tagged, S receives 0 points, runners receive +1 survival point, and S must initiate a new round with a different color c∗. ## 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 (0,0) is always legal for all agents. - Repetition / cycles: Bounded strictly by the tick limit Tmax⁡=30 per round. - Simultaneous claims on the same resource or position: Handled by R5 (cell capacity K=2); 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 Tmax⁡=30 ticks or upon the first tag event, provably guaranteeing finite execution. ## State representation - Persistent state: Grid dimensions W×H, color map matrix C∈𝒞W×H, agent roles, cumulative scoreboard. - Per-tick ephemeral state: Coordinates (xS,yS), runner coordinates (xRi,yRi), active broadcast color c∗, tick counter t∈[1,Tmax⁡], per-cell runner occupancy counts. - Observable information: Fully observable. All agents know the full color grid map, agent positions, active color c∗, and tick timer. ## Action space - `call_color(color_id)`: Executed exclusively by the Stork at round start, selecting c∗∈𝒞. - `move(dx, dy)`: Executed simultaneously by all agents every tick; dx,dy∈{−1,0,1} with |dx|+|dy|≤1. ## 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 8×8 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 C(x,y)==c∗. The Stork AI should compute the minimum distance to the closest vulnerable runner and intercept their path. First milestone: build a 10×10 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 JSON
Cite 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}
}