Skip to main content
Formal Specification

Hiding the Scarf — Formal Specification

Cambodia · chase-tag · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 2
# Leak Kanseng — AI-optimized specification ## General idea A circular hidden-resource drop and sprint-tag game. A mobile walker traverses an N-node ring graph and secretly drops a token behind one seated node. Seated agents have imperfect backward observability and must deduce whether a token was dropped behind them before the walker completes a full loop. If caught unaware, the sitter takes a penalty; if detected early, a directional race around the ring occurs to capture the vacant seat. ## Formal model - **Abstraction taken:** The circular physical space is modeled as a directed ring graph G=(V,E) with N vertices v0,v1,…,vN−1 where edges connect vi→v(i+1)(modN). - **Player/agent count:** N agents. One is designated `Walker` (W), the remaining N−1 occupy seats 0…N−2. - **Turn model:** Real-time ticked or discrete multi-step sub-rounds. ## Formal rules R1. Setup: N−1 agents occupy fixed node positions 0…N−2 around the ring. Walker W starts at node position 0, holding token `Scarf`. R2. Walk Phase: At each discrete tick t, W advances 1 node clockwise: posW←(posW+1)(modN). R3. Drop Action: While at node j, W may execute `drop_scarf()`. - If executed, `scarf_pos` is set to j, and `scarf_dropped` becomes `true`. W no longer holds the scarf. R4. [gap-fill] Detection Check: For seated agent k, visibility of behind-seat state is hidden. - At each tick after the walker passes node k, agent k receives a noisy signal s∈{0,1} with P(detect|scarf present)=δ×alertnessk. - Agent k may execute `check_and_grab()`. If the scarf is present, agent k enters Chase Phase (R5.2). If executed when no scarf is present, agent k commits a false-peek fault resulting in a 1-point penalty. R5. Chase Phase & Circuit Resolution: - R5.1: If W completes a full circuit (N ticks after drop) back to posscarf without agent k taking the scarf, W tags k. W earns 1 point and remains W for the next round. - R5.2: If agent k grabs the scarf at tick Δt<N, agent k immediately chases W. Both sprint clockwise toward the vacated seat k. - Race resolution: W reaches seat k in dW steps; Chaser k reaches W in dk steps. If dk<dW, k swats W (1 point for k); otherwise W sits safely. Agent k becomes the new W. R6. [gap-fill] Game Ends: After M=2×N total drop rounds, the agent with the highest accumulated score wins. ## Edge cases - **Tie at the end condition:** Highest score after M rounds; if tied, sudden-death 1v1 reaction test. - **A player with no legal move:** Sitter always has `wait()` or `check_and_grab()`; Walker always has `advance()` or `drop()`. - **Repetition / cycles (and the loop-breaking rule):** Bounded by round limit M (R6). - **Simultaneous claims on the same resource or position:** Seat k is claimed by the first agent whose movement-point accumulator reaches the target coordinate. - **Player elimination mid-round; turn order repair:** Not applicable — no player elimination; roles rotate. - **Resource exhaustion:** Scarf token is singular and preserved. - **Termination guarantee: why the game provably ends:** Guaranteed by finite round cap M (R6). ## State representation - `ring_size`: integer N. - `seat_assignments`: array of agent IDs of length N. - `walker_id`: agent ID. - `walker_pos`: integer in 0…N−1. - `scarf_pos`: integer ∈{0…N−1}∪{NONE}. - `scarf_held_by_walker`: boolean. - `scores`: map of `agent_id -> int`. - Observable information: Sitter i observes `walker_pos`, but cannot observe `scarf_pos` directly without executing `check_and_grab()` or receiving detection cue. ## Action space - For Walker: `advance()`, `drop_scarf()`. - For Sitter i: `wait()`, `check_and_grab()`. ## Playability notes - **Single-player-vs-AI:** Natural — 1 human player among N−1 AI agents, either as Walker or Sitter. - **Group games (n>4):** Native model designed for N≥6. - **Detection skill model:** δ∈[0.1,0.9] calibrated to simulate peripheral audio/visual awareness. - **What is lost:** Physical body language deception (feigning a drop, silent stepping) is mapped to stochastic detection math. ## Implementation hints Ring graph topology. The state transitions cleanly between `WALK_SEARCH`, `CHASE_RACE`, and `SEAT_RESET`. Suggested milestone: Build the graph node traversal and detection loop before wiring up sprint movement points.

Download as JSON

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

Download JSON
Cite this page

Hiding the Scarf (Cambodia). (n.d.). Games of Countries. https://gamesofcountries.com/games/kh-cambodia/leak-kanseng

@misc{gamesofcountries-kh-cambodia-leak-kanseng,
  title = {Hiding the Scarf (Cambodia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/kh-cambodia/leak-kanseng}
}