Formal Specification
Hide and Seek — Formal Specification
Afghanistan · hide-seek · Confidence: low
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: discretizedGap-fills: 5
# Chashm-potakān — AI-optimized specification
## General idea
A spatial graph-based hide-and-seek and base-racing game. A seeker counts at home base while hiders disperse across connected hiding nodes. When searching begins, the seeker attempts to gain direct line-of-sight to hiders, correctly identify them, and sprint back to tap the home base (*sok-sok*) before the hider can race in, while free hiders attempt sneak dashes to base to liberate all captured teammates (*azādī*).
## Formal model
- **Abstraction taken:** The continuous 3D physical environment (alleys, compounds, trees) is discretized into an undirected topological graph . Node is designated as the Home Base (*Mokān*). Line-of-sight is defined by an edge-visibility matrix .
- **Player/agent count:** 1 Seeker agent (), Hider agents (, ).
- **Turn model:** Two phases: initial setup phase (Hiders move for ticks while Seeker is blinded at ), followed by simultaneous-tick active play.
## Formal rules
R1. **Setup Phase:** Seeker is locked at Home Base for ticks. Each tick, all hiders may move along graph edges up to their movement speed (1 step/tick) to reach a concealment node . [gap-fill: count length discretized to 10 ticks].
R2. **Active Phase Simultaneous Movement:** Every tick , all non-captured agents simultaneously submit a movement or interaction action:
- `MOVE(target_node)`: Move to an adjacent node connected by an edge.
- `STAY()`: Remain stationary (reduces detection profile).
- `CALL_SOK_SOK(target_hider_id)`: (Seeker only) Trigger base-tag attempt on a spotted hider.
- `TAG_BASE_SAFE()`: (Hider only) Touch home base to secure immunity / trigger team rescue.
R3. **Visibility and Spotting:** A hider at node is visible to Seeker at node if and only if .
- When Seeker is at node with , may issue `CALL_SOK_SOK(H_i)`.
- Issuing this call initiates a deterministic race: both and race toward along the shortest path in .
- If , is captured and moved to the `Jail` state at .
- If , touches base first, earns safety, and remains immune from capture.
- [gap-fill: shortest-path distance race resolution for simultaneous base rushes].
R4. **False Spotting Penalty (*Kalagh*):** If Seeker issues `CALL_SOK_SOK(H_i)` when is not visible, a *Kalagh* (false call) penalty is incurred: Seeker is frozen at current position for 2 ticks. [gap-fill: 2-tick freeze penalty for false spotting].
R5. **Mass Rescue (*Azādī*):** If any active hider reaches without being challenged by the seeker and executes `TAG_BASE_SAFE()`, all hiders currently in `Jail` are instantly liberated and relocated to adjacent nodes . [gap-fill: liberated hiders placed in adjacent neighbor nodes].
R6. **Round Victory & Role Transfer:**
- The round ends in Seeker Victory if all hiders are in `Jail` simultaneously. The first hider captured becomes the Seeker for the subsequent round.
- The round ends in Hider Victory if a mass rescue occurs and ticks elapse without full capture.
## Edge cases
- Tie at the end condition: If Seeker and a Hider reach Home Base on the exact same tick during a contest, the tie goes to the Seeker (the defender of the base). [gap-fill: tie-breaker at base favors seeker].
- A player with no legal move: Not applicable; `STAY()` is always legal.
- Repetition / cycles: Bounded by maximum tick limit . If all hiders are not captured by tick 100, the round terminates in Hider Victory.
- Simultaneous claims on the same resource or position: Graph nodes have unlimited agent capacity; multiple hiders may occupy the same node. If multiple hiders reach simultaneously, any one can trigger the mass rescue.
- Player elimination mid-round; turn order repair: Captured hiders enter the passive `Jail` state; they do not submit movement actions but can be reactivated by a mass rescue. Simultaneous tick engine requires no turn order repair.
- Resource exhaustion (pieces, tokens, space, time): The tick counter strictly exhausts at .
- Termination guarantee: Provably terminates because the global tick counter increments monotonically from 1 to 100.
## State representation
- **Persistent state:**
- `graph`: adjacency list and line-of-sight lookup table
- `tick`: integer (1..100)
- `seeker`: `{node: , freeze_ticks: integer}`
- `hiders`: list of `{id, node: , status: ACTIVE | JAILED | SAFE}`
- `capture_history`: list of captured hider IDs (preserves first-captured order)
- **Per-turn ephemeral state:**
- `submitted_actions`: map of `agent_id -> Action`
- `visibility_map`: map of visible pairs `(S, H_i)`
- **Observable information:**
- **Seeker:** Observes own position, base status, and only hiders at nodes where .
- **Hiders:** Observe own position, base status, and seeker position if .
## Action space
- `move(target_node)`: Precondition: `(current_node, target_node) in E` and `freeze_ticks == 0`.
- `stay()`: Precondition: `status == ACTIVE`.
- `call_sok_sok(hider_id)`: Precondition: Agent is Seeker and `status[hider_id] == ACTIVE`.
- `tag_base_safe()`: Precondition: Agent is Hider, `status == ACTIVE`, and `current_node == v_0`.
## Playability notes
- Single-player-vs-AI: Highly engaging. The player can play as the Seeker (exploring graph nodes and line-of-sight) against stealthy AI hiders, or as a Hider coordinating with AI teammates to orchestrate a diversion and mass rescue.
- Group games (n>4): Reduces directly to 2 agents (1 Seeker vs. 1 Hider). The mass rescue mechanic becomes inactive, turning the game into a pure 1v1 stealth and line-of-sight cat-and-mouse duel.
- Physical-skill games: Running speed and stealth are formalized as graph traversal rates and line-of-sight concealment states.
- What is lost in the adaptation: Physical concealment behind irregular terrain, vocal cues/whispers, and the sudden kinetic thrill of outdoor backyard sprinting.
## Implementation hints
Medium complexity due to graph pathfinding and imperfect information (fog-of-war). Breadth-first search (BFS) precomputes all-pairs shortest paths on the static graph for instant race resolution. Suggested first milestone: implement graph movement and line-of-sight checking on a simple 10-node cycle graph, then add seeker base-tag races and jail state tracking.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Hide and Seek (Afghanistan). (n.d.). Games of Countries. https://gamesofcountries.com/games/af-afghanistan/chashm-potakan
@misc{gamesofcountries-af-afghanistan-chashm-potakan,
title = {Hide and Seek (Afghanistan)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/af-afghanistan/chashm-potakan}
}