Formal Specification
Traditional Pakistani Hide-and-Seek — Formal Specification
Pakistan · hide-seek · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 3
# Chhapan Chhopai — AI-optimized specification
## General idea
An imperfect-information spatial pursuit and base-race game played on a 2D environment containing occluding obstacles. Hiding agents seek optimal occluded positions during an initial countdown, then attempt to reach a central Home Base node unnoticed, while the Seeker explores the environment using ray-casted line-of-sight to discover hiders and race them back to the base.
## Formal model
- **Abstraction taken:** The 2D play environment is a grid `[-20, 20] x [-20, 20]` containing static polygon obstacles (walls, cover). The Home Base is located at `(0, 0)`. Line of sight is computed via 2D ray-casting with maximum visual range `R_vision = 15.0` meters and field-of-view `FOV = 120` degrees.
- **Player/agent count:** `N` agents: 1 Seeker `S`, `N-1` Hiders `H_1..H_{N-1}` (standard `N = 5`).
- **Turn model:** Phased: Phase 1 (Countdown, `t in {1..50}`), followed by Phase 2 (Simultaneous search & base race ticks `Delta_t = 0.5` seconds).
## Formal rules
R1. Setup: Home Base is at `(0, 0)`. Seeker is frozen at `(0, 0)` with `eyes_closed = True` for `t in {1..50}` ticks. Hiders scatter to positions `pos_i` behind obstacles.
R2. Phase 2 Start (`t > 50`): Seeker's vision activates. Seeker and all active hiders submit movement vectors `||(dx, dy)|| <= v_max`.
R3. Vision and Detection:
- On each tick, Seeker casts vision rays across its forward FOV.
- If hider `H_k` intersects an unoccluded vision ray from Seeker: `spotted_flag[H_k] = True`.
- Both Seeker and `H_k` observe the detection event.
R4. Base Race Resolution:
- If Seeker reaches `dist(S, (0, 0)) <= 1.0` and executes `thappa_claim(H_k)` while `spotted_flag[H_k] == True`:
- Hider `H_k` is captured (`captured[H_k] = True`).
- First captured hider is recorded as `next_seeker_candidate`.
- If Hider `H_k` reaches `dist(H_k, (0, 0)) <= 1.0` and executes `thappa_safe()`:
- Hider `H_k` is safe (`is_safe[H_k] = True`).
R5. Round Termination:
- The round terminates when every hider `H_k` has resolved to either `captured[H_k] == True` or `is_safe[H_k] == True`.
R6. Role Transition:
- If at least 1 hider was captured: `next_seeker_candidate` becomes the Seeker for the next round.
- If all hiders achieved `is_safe == True`: The original Seeker must seek again.
R7. [gap-fill] Turn cap: Phase 2 has a hard cap of 400 ticks. Any hider remaining hidden without touching the base at tick 400 is automatically captured.
R8. [gap-fill] Match scoring: Each safe hider earns 10 points. Seeker earns 5 points per capture. Match runs `N` full rounds.
## Edge cases
- **Tie at the end condition:** Point accumulation across `N` rounds (R8).
- **A player with no legal move:** Movement vectors always permit `(0, 0)`.
- **Repetition / cycles:** Bounded by the hard 400-tick cap in R7.
- **Simultaneous claims on the same resource or position:** If Seeker and Hider reach `(0, 0)` on the exact same tick, [gap-fill] priority is given to the Hider (`is_safe`).
- **Player elimination mid-round:** Captured or safe hiders transition to inactive spectator status; game continues over remaining active hiders.
- **Resource exhaustion:** Active hiders decrement monotonically to 0.
- **Termination guarantee:** Guaranteed by finite round tick limit (400 ticks) and monotonic hider resolution.
## State representation
- **Persistent state:** `scores[1..N]`, `round_index in {1..N}`, `current_seeker_id`.
- **Per-tick ephemeral state:** Coordinates and orientations `(x, y, theta)` for all agents, obstacle occlusion map, `spotted_flags[1..N]`, `is_safe[1..N]`, `captured[1..N]`.
- **Observable information:**
- Seeker observes only its current FOV and obstacle geometry.
- Hiders observe their local surroundings and can track Seeker position when in line-of-sight.
## Action space
- `move(dx, dy)`: Displacement vector.
- `thappa_claim(hider_id)`: Seeker base-tagging action.
- `thappa_safe()`: Hider base-tagging action.
## Playability notes
- **Single-player-vs-AI:** Natural; human player can play as the Seeker managing search paths or as a Hider timing the sprint back to base.
- **Group games (n>4):** Native multi-agent design (3 to 15 agents).
- **Physical-skill games:** Sprint speeds and stealth movements are modeled via obstacle visibility ray-casting.
- **What is lost:** The heart-pounding thrill of hiding in a tight dark space behind a wooden wardrobe hearing footsteps approach.
## Implementation hints
Medium complexity due to 2D ray-cast line-of-sight in obstacle environments. Standard 2D shadow-casting or Bresenham ray-casting against a grid map resolves vision efficiently.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Traditional Pakistani Hide-and-Seek (Pakistan). (n.d.). Games of Countries. https://gamesofcountries.com/games/pk-pakistan/chhapan-chhopai
@misc{gamesofcountries-pk-pakistan-chhapan-chhopai,
title = {Traditional Pakistani Hide-and-Seek (Pakistan)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/pk-pakistan/chhapan-chhopai}
}