Formal Specification
The Handkerchief Game — Formal Specification
Spain · chase-tag · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 3
# El juego del pañuelo — AI-optimized specification
## General idea
A two-team discretized spatial chase-and-tag game on a 1D or 2D grid. Two symmetrical teams line up at opposite boundaries. A referee calls a paired agent ID; both agents race to a central target item (the handkerchief). Grabbing the item reverses roles: the grabber becomes the fugitive who must reach home safety, while the rival becomes the chaser who must tag the fugitive before they cross the boundary.
## Formal model
- **Abstraction taken:** The physical running space is discretized into a 1D grid with home base boundaries at and . Center item is at .
- **Player/agent count:** 2 teams of agents each (typically ).
- **Turn model:** Real-time ticked simulation (e.g. 0.1s ticks) or discrete simultaneous movement steps per tick.
## Formal rules
R1. Setup: Team A occupies , Team B occupies . Handkerchief sits at . Each team assigns unique secret IDs to their members. Target score is points (or full elimination).
R2. Call: The referee agent broadcasts a random number . Only agent and agent become active.
R3. Movement: Active agents move toward at speed cells per tick.
R4. Neutral zone constraint: Neither agent may cross into the opponent's half before the handkerchief has been grabbed. Crossing without the handkerchief is an immediate fault ( point to the opponent).
R5. Grab action: When an agent is at , it may execute `grab_handkerchief()`.
R6. Chase phase: The instant agent grabs the handkerchief:
- role ; must reach .
- role ; must reach .
R7. Round outcome:
- If fugitive crosses home baseline () untagged: Fugitive's team scores point.
- If chaser tags fugitive () before home baseline: Chaser's team scores point.
R8. [gap-fill] Standoff timer: If neither agent grabs the handkerchief within 15.0 seconds of arrival at , the round is declared void and a new number is called.
R9. Win condition: The first team to accumulate points wins the match.
## Edge cases
- **Tie at the end condition:** [gap-fill] If tied at , a deciding round is fought with all surviving players.
- **A player with no legal move:** Not applicable; move forward, move backward, fake, and grab are always valid actions.
- **Repetition / cycles:** Bounded by R8 standoff timer (15s cap per call).
- **Simultaneous claims on the same resource or position:** If both agents execute `grab_handkerchief()` on the exact same tick, the grab is awarded via uniform random coin toss.
- **Player elimination mid-round:** In elimination mode, the surviving team redistributes the eliminated player's number to an active player.
- **Resource exhaustion:** Point target monotonically approaches completion.
- **Termination guarantee:** Guaranteed by finite round timeouts (R8) and positive point accumulation every round.
## State representation
- **Persistent state:** `team_scores` , `active_rosters` (maps of ID agents), `current_round` ().
- **Per-round ephemeral state:** `called_id` (), `pos_A` (), `pos_B` (), `item_holder` (null / A / B), `standoff_time_elapsed` ().
- **Observable information:** Agent positions, item status, and scores are public; opponent number assignments are revealed when an agent responds to the call.
## Action space
- `step(direction, speed)`: Where `direction` , `speed` .
- `grab_handkerchief()`: Valid only when and item is unheld.
- `feint()`: Rapid speed perturbation to induce opponent overextension.
## Playability notes
- **Single-player-vs-AI:** Natural; human directly steers active runner while AI computes optimal pursuit/feint trajectories.
- **Group games (n>4):** Reduces to a series of 1v1 duels selected from the team roster.
- **Physical-skill games:** Physical sprinting speed is discretized into velocity parameters with reaction delay noise: [gap-fill] .
- **What is lost in the adaptation:** Physical breathlessness, ground turf slippage, and peripheral vision tracking.
## Implementation hints
Low complexity. A 1D line grid with 2 agents and a central point item provides complete mechanics. First milestone: Implement 1D movement, center boundary check, and grab/tag role reversal logic.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
The Handkerchief Game (Spain). (n.d.). Games of Countries. https://gamesofcountries.com/games/es-spain/el-panuelo
@misc{gamesofcountries-es-spain-el-panuelo,
title = {The Handkerchief Game (Spain)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/es-spain/el-panuelo}
}