Skip to main content
Formal Specification

Hide and Seek (Hapa dollapa) — Formal Specification

Albania · hide-seek · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 2
# Kukafshehtas — AI-optimized specification ## General idea A multi-agent pursuit-evasion game on a 2D grid with occlusion obstacles and a designated Base node. A Seeker searches the map; when line-of-sight is established with a Hider, a parallel sprint race begins toward the Base. If the Seeker touches Base first, the Hider is captured; if a Hider touches Base first, they achieve self-rescue or liberate all captured teammates. ## Formal model - **Abstraction taken:** The 2D arena is modeled as a discrete 2D grid `[-10..10] × [-10..10]` containing a set of opaque obstacle cells `O`. Home Base is fixed at `(0, 0)`. - **Player/agent count:** `N + 1` agents (1 Seeker, `N` Hiders, default `N = 4`). - **Turn model:** Two-phase model: Hiding Phase (Hiders move while Seeker is blinded), followed by Search and Sprint Phase over discrete ticks. ## Formal rules R1. Setup: Base is at `(0, 0)`. Seeker is immobilized at `(0, 0)` for `T_hide = 20` ticks with line-of-sight disabled. R2. Hiding Phase (`t ∈ [1..T_hide]`): Hiders execute movement to select concealment cells behind obstacle set `O`. R3. Search Phase (`t > T_hide`): - Seeker moves at `speed = 1.0` cell/tick and casts line-of-sight rays in 360 degrees. - Hiders move at `speed = 0.9` cell/tick or remain stationary. R4. Detection and Base Sprint Race: - Line-of-sight check: If an unblocked straight line connects Seeker and Hider `i` with distance `||pos_seeker - pos_hider_i|| <= 8.0`: - Hider `i` is `SPOTTED`. - Both Seeker and Hider `i` immediately target Base `(0, 0)`. - Seeker arrival time to Base: `t_seeker = ||pos_seeker|| / speed_seeker`. - Hider arrival time to Base: `t_hider = ||pos_hider_i|| / speed_hider`. - If `t_seeker < t_hider`: Seeker taps base first (`PIK_HIDER`). Hider `i` transitions to `status = CAPTURED`. - If `t_hider <= t_seeker`: Hider taps base first (`PIK_PER_VETE`). Hider `i` transitions to `status = SAVED`. R5. Group Liberation Mechanic (*Pik për të gjithë*): - If the last remaining unspotted Hider reaches Base `(0, 0)` without being spotted: - All currently `CAPTURED` hiders transition back to `SAVED`. - Seeker fails the round and must remain Seeker for round `r+1`. R6. Win and Role Swap: - Round ends when all `N` hiders are resolved to either `CAPTURED` or `SAVED`. - If `count(CAPTURED) >= 1`: The first captured hider becomes the new Seeker for round `r+1`. - Match terminates after `M = 5` rounds [gap-fill]; agent with fewest rounds as Seeker wins. ## Edge cases - Tie at the end condition: Agent with lowest total seeker rounds wins; if tied, a 1v1 sprint race to base breaks the tie. - A player with no legal move: Not applicable; 2D pathfinding around obstacles is always well-defined. - Repetition / cycles: Bounded because each round terminates within at most `T_max = 200` ticks [gap-fill]. - Simultaneous claims on the same resource or position: Base arrival tie is awarded to the Hider per R4 (`t_hider <= t_seeker`). - Player elimination mid-round; turn order repair: Captured hiders remain inactive at base until round conclusion or group rescue. - Resource exhaustion (pieces, tokens, space, time): Obstacle map and agent counts are constant. - Termination guarantee: why the game provably ends: Guaranteed because search time is capped at `T_max = 200` ticks, and match is capped at `M = 5` rounds. ## State representation - Persistent state: `rounds_as_seeker: array[N+1] of int`, `current_seeker_id: int`, `round_num: int`. - Per-turn ephemeral state: `agent_positions: array[N+1] of (float, float)`, `agent_status: array[N] of {HIDDEN, SPOTTED, CAPTURED, SAVED}`, `first_captured_id: int`, `tick_clock: int`. - Observable information: Seeker observes only cells within unobstructed line-of-sight. Hiders observe Seeker position if within line-of-sight. ## Action space - `move(dx: float, dy: float)`: Continuous 2D translation vector. - `sprint_to_base()`: Autonomous shortest-path sprint toward `(0, 0)`. ## Playability notes - Single-player-vs-AI: Natural; player acts as Seeker with field-of-view cone or as sneaking Hider against AI vision algorithms. - Group games (n>4): Natively structured for 4 to 10 agents with multi-agent pathing. - Physical-skill games: Physical sneaking and spatial stealth are abstracted into raycast occlusion geometry. - What is lost in the adaptation: The heart-pounding suspense of holding one's breath behind a narrow door while footsteps approach. ## Implementation hints 2D grid with raycasting occlusion and A* pathfinding. Branching factor is 4 (cardinal moves) or continuous 2D steering. First milestone: Implement 2D obstacle raycasting and Base sprint time-comparison resolver.

Download as JSON

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

Download JSON
Cite this page

Hide and Seek (Hapa dollapa) (Albania). (n.d.). Games of Countries. https://gamesofcountries.com/games/al-albania/kukafshehtas

@misc{gamesofcountries-al-albania-kukafshehtas,
  title = {Hide and Seek (Hapa dollapa) (Albania)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/al-albania/kukafshehtas}
}