Skip to main content
Formal Specification

Polish Hide-and-Seek (with Base Tagging and Liberation) — Formal Specification

Poland · hide-seek · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: adaptation-requiredFidelity: discretizedGap-fills: 4
# Gra w chowanego — AI-optimized specification ## General idea An asymmetric traditional Polish hide-and-seek game set on an obstacle-rich grid with a single home base (*męta*). The Seeker must locate hidden agents using line-of-sight rays and race back to the base to tag them out via named identification (*zaklepywanie*), while hiders execute stealthy approaches to reach the base first to self-secure or trigger a collective team liberation (*pobite gary*). ## Formal model - **Abstraction taken:** The physical hiding environment is represented as a 2D discrete grid `W×H` (default 20×20 cells) with solid obstacle cells blocking both movement and line-of-sight (LOS). The home base (*męta*) occupies cell `(0, 0)`. The Seeker's visual perception is modeled as a raycast cone (range `R_vis = 8` cells, FOV 180° in facing direction). Sprinting and base tagging are modeled as simultaneous movement ticks. - **Player/agent count:** `N` agents (`N >= 3`, default 4 to 8). Exactly 1 Seeker (`S`) and `N-1` Hiders (`H_1 .. H_{N-1}`). - **Turn model:** Two-phase structure: (1) Hiding Phase (Seeker is stationary with FOV disabled at `(0, 0)` for `T_hide = 10` ticks while Hiders disperse), followed by (2) Active Search & Base-Sprint Phase (simultaneous movement ticks up to `T_max = 60` ticks). ## Formal rules R1. **Setup:** - Arena size `20×20` with fixed obstacle layout. Base cell `B = (0, 0)`. - Seeker `S` starts at `B`. All Hiders `H_i` start at `B`. - Hiding Phase: For `t = 1..10`, `S` executes `count_at_base()`; Hiders move up to 1 cell per tick to reach concealment positions behind obstacle cells. R2. **Line of Sight & Discovery:** - From `t = 11` onward, `S` moves up to 1 cell per tick and chooses facing direction `Dir ∈ {N, E, S, W}`. - At each tick, `S` calculates raycasts to all cells within `R_vis = 8` and facing hemisphere. - If a ray connects `S` to an active Hider `H_i` without intersecting obstacle cells, `H_i` transitions to state `SPOTTED`. R3. **Base Race & Tagging Resolution:** - When `H_i` is `SPOTTED`, both `S` and `H_i` attempt to reach base `B`. - Movement cost is 1 tick per orthogonal cell. Agents can use `sprint()` (move 2 cells in 1 tick at the cost of 1 stamina point, max stamina = 3). - If `S` reaches `B` before or on the same tick as `H_i` and executes `tag_out(H_i, location_cell)`: - If `location_cell` matches the true cell where `H_i` was spotted, `H_i` is tagged out (`CAPTURED`) and placed in the prison queue `P`. - If `S` inputs the wrong location, a `false_tag` penalty freezes `S` at base for 2 ticks. R4. **Self-Tagging (*Zaklepanie się za siebie*):** - If an active Hider `H_i` (whether `SPOTTED` or unspotted) enters base cell `B` while `S` is not occupying `B` and executes `tag_self_safe()`, `H_i` transitions permanently to state `SAFE`. R5. **Group Liberation (*Pobite gary*):** - If the last uncaptured active Hider (or any unspotted Hider) enters `B` and executes `liberate_all()`, all agents currently in prison queue `P` transition back to `ACTIVE` and are teleported to a random obstacle cell, resetting `S`'s captured list for the round. R6. **Round Conclusion:** - The round terminates when all `N-1` Hiders are in either `CAPTURED` or `SAFE` state, or when `t >= T_max = 60`. - The first agent added to prison queue `P` becomes the Seeker for the subsequent round. - If all Hiders achieved `SAFE` (or a successful liberation occurred on the final tick), [gap-fill] the current Seeker remains Seeker for the next round. R7. [gap-fill] **Match Score:** Over a series of `N` rounds, each agent's individual score is `Score = (Rounds as Hider Survived to SAFE) * 2 + (Captures Made as Seeker)`. Highest score wins. ## Edge cases - **Tie at the end condition:** If cumulative match scores are equal after `N` rounds, [gap-fill] the tied agent who spent fewer total rounds as Seeker wins. - **A player with no legal move:** Obstacle configurations must guarantee connected corridors; if boxed in, an agent may always execute `hold_position()`. - **Repetition / cycles:** The active round has a strict upper time bound of `T_max = 60` ticks, preventing infinite evasion or camping loops. - **Simultaneous claims on the same resource or position:** If `S` and `H_i` enter the base cell `B` on the exact same tick, [gap-fill] `S` receives priority if `S` was running directly toward `B`, tagging `H_i` out. - **Player elimination mid-round; turn order repair:** Captured agents enter queue `P` and become inert spectators for the remainder of the round; the round loop continues seamlessly over the active agent subset. - **Resource exhaustion:** Stamina points are finite (3 points per agent per round); once exhausted, agents move at baseline speed (1 cell/tick). - **Termination guarantee:** The round clock `t` increments strictly by 1 per tick and terminates unconditionally when `t == 60` or when all Hiders are resolved. ## State representation - **Persistent state:** `match_round` (1..N), `current_seeker_id`, `player_scores` (Map[AgentId, Int]). - **Per-round state:** `tick` (1..60), `seeker_pos` (Coord), `seeker_facing` (Dir), `seeker_stamina` (0..3), `hider_states` (Map[AgentId, {HIDDEN, SPOTTED, SAFE, CAPTURED}]), `hider_positions` (Map[AgentId, Coord]), `hider_staminas` (Map[AgentId, Int]), `prison_queue` (List[AgentId]). - **Observable information:** Imperfect information. Seeker observes only cells within unobstructed raycast FOV and base state. Hiders observe base state, own position, and Seeker position if Seeker is within their LOS. ## Action space - `move(direction ∈ {N, E, S, W})`: Move 1 step in cardinal direction. - `sprint(direction ∈ {N, E, S, W})`: Move 2 steps in 1 tick (costs 1 stamina). - `tag_out(target_agent: AgentId, location: Coord)`: Seeker action at base cell `B` to capture spotted hider. - `tag_self_safe()`: Hider action at base cell `B` to secure individual safety. - `liberate_all()`: Hider action at base cell `B` to free all prisoners. - `hold_position()`: Remain stationary. ## Playability notes - **Single-player-vs-AI:** Highly engaging — human can play as Seeker managing base defense vs stealthy AI heuristic hiders, or as a lone Hider timing sprints around AI patrol routes. - **Group games (n>4):** Natively multi-agent. In a 2-agent reduction (1 Seeker vs 1 Hider), the `liberate_all()` action is omitted and the game functions as a pure 1v1 sprint-and-stealth duel. - **Physical-skill games:** Visual reaction and sprint speed are discretized into raycast field-of-view checks and stamina-managed movement point systems. - **What is lost in the adaptation:** The physical thrill of holding one's breath behind a tree, 3D audio cues of rustling leaves, and creative decoy disguise tricks are abstracted into discrete grid coordinates and line-of-sight math. ## Implementation hints Standard 2D grid raycasting (Bresenham line algorithm) is sufficient for line-of-sight checks. The Seeker AI can alternate between an exploratory patrol state machine and a greedy sprint-to-base state upon spotting a target. Suggested first milestone: implement the 2D grid with deterministic raycasting and base sprint races for 1 Seeker and 2 Hiders.

Download as JSON

Download the full game corpus entry for this game as structured JSON.

Download JSON
Cite this page

Polish Hide-and-Seek (with Base Tagging and Liberation) (Poland). (n.d.). Games of Countries. https://gamesofcountries.com/games/pl-poland/chowany

@misc{gamesofcountries-pl-poland-chowany,
  title = {Polish Hide-and-Seek (with Base Tagging and Liberation) (Poland)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/pl-poland/chowany}
}