Formal Specification
Hiding the Scarf — Formal Specification
Cambodia · chase-tag · Confidence: low
← Back to game pageImplementation 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 -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 with vertices where edges connect .
- **Player/agent count:** agents. One is designated `Walker` (), the remaining occupy seats .
- **Turn model:** Real-time ticked or discrete multi-step sub-rounds.
## Formal rules
R1. Setup: agents occupy fixed node positions around the ring. Walker starts at node position 0, holding token `Scarf`.
R2. Walk Phase: At each discrete tick , advances 1 node clockwise: .
R3. Drop Action: While at node , may execute `drop_scarf()`.
- If executed, `scarf_pos` is set to , and `scarf_dropped` becomes `true`. no longer holds the scarf.
R4. [gap-fill] Detection Check: For seated agent , visibility of behind-seat state is hidden.
- At each tick after the walker passes node , agent receives a noisy signal with .
- Agent may execute `check_and_grab()`. If the scarf is present, agent enters Chase Phase (R5.2). If executed when no scarf is present, agent commits a false-peek fault resulting in a 1-point penalty.
R5. Chase Phase & Circuit Resolution:
- R5.1: If completes a full circuit ( ticks after drop) back to without agent taking the scarf, tags . earns 1 point and remains for the next round.
- R5.2: If agent grabs the scarf at tick , agent immediately chases . Both sprint clockwise toward the vacated seat .
- Race resolution: reaches seat in steps; Chaser reaches in steps. If , swats (1 point for ); otherwise sits safely. Agent becomes the new .
R6. [gap-fill] Game Ends: After total drop rounds, the agent with the highest accumulated score wins.
## Edge cases
- **Tie at the end condition:** Highest score after 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 (R6).
- **Simultaneous claims on the same resource or position:** Seat 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 (R6).
## State representation
- `ring_size`: integer .
- `seat_assignments`: array of agent IDs of length .
- `walker_id`: agent ID.
- `walker_pos`: integer in .
- `scarf_pos`: integer .
- `scarf_held_by_walker`: boolean.
- `scores`: map of `agent_id -> int`.
- Observable information: Sitter 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 : `wait()`, `check_and_grab()`.
## Playability notes
- **Single-player-vs-AI:** Natural — 1 human player among AI agents, either as Walker or Sitter.
- **Group games (n>4):** Native model designed for .
- **Detection skill model:** 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 JSONCite 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}
}