Skip to main content
Formal Specification

Handkerchief Game — Formal Specification

Andorra · chase-tag · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 3
# Joc del mocador — AI-optimized specification ## General idea A discretized team tag-and-sprint game where two numbered teams duel 1-on-1 per round. Upon having their number called, two active runners sprint to a center line. The core dilemma is whether to grab the central token and race home under chase, or tempt the opponent into grabbing it and immediately tag them. ## Formal model - **Abstraction taken:** The 1D/2D running pitch is discretized into a 1D grid of positions `[-L, +L]` where Team A's baseline is `-L`, Team B's baseline is `+L`, and the referee holds the token at `x = 0`. - **Player/agent count:** 2 teams of N agents (minimum N = 1, standard N = 4..8). - **Turn model:** Round-based. Each round is a 1v1 contest resolved in discrete synchronous time steps (ticks). ## Formal rules R1. Setup: Team A occupies `-L`; Team B occupies `+L`. Agents on each team hold an index `1..N`. Match score starts at `0:0`. R2. At the start of a round, the referee randomly samples an active index `k in 1..N`. Agents `A_k` and `B_k` become active. R3. At each discrete tick `t`: R3.1. Agents choose an action: `advance(speed)`, `feint()`, or `retreat(speed)`. R3.2. Prior to the handkerchief being grabbed, crossing the center line `x = 0` into opposing territory is illegal and results in an immediate foul point conceded to the opponent. R3.3. When an agent reaches `x = 0` and executes `grab()`, that agent becomes the `Carrier` and the opponent becomes the `Chaser`. R3.4. If `Carrier` reaches their home baseline (`-L` for A, `+L` for B) without being tagged, their team scores 1 point. R3.5. If `Chaser` occupies the same or adjacent grid cell as `Carrier` and executes `tag()`, the `Chaser`'s team scores 1 point. R4. [gap-fill] Round timeout: If neither agent grabs the handkerchief within 50 ticks, the round is declared void (0 points) and a new number is called. R5. Match ends when a team reaches a target score `Target_Score = 5` points. R6. [gap-fill] Elimination rule for asymmetric rosters: When playing elimination mode, the eliminated player's number is reassigned randomly to an active teammate. ## Edge cases - Tie at the end condition: If both teams reach the win threshold simultaneously, play continues until one team leads by 1 point. - A player with no legal move: Not applicable — movement or staying in place is always available. - Repetition / cycles: Bounded by the 50-tick round cap (R4) and the monotonic target score accumulation (R5). - Simultaneous claims on the same resource or position: If both agents execute `grab()` at `x = 0` on the exact same tick, [gap-fill] a coin-flip awards possession to one agent while the other instantly becomes `Chaser` with zero movement penalty. - Player elimination mid-round: Turn order reassignment is managed via R6. - Resource exhaustion: Not applicable — the handkerchief is reset every round. - Termination guarantee: Guaranteed by the finite tick limit per round and monotonic point scoring. ## State representation - Persistent state: `scores` (map Team -> int), `team_rosters` (map Team -> list of agent_ids), `target_score` (int). - Per-round ephemeral state: `active_index` (int), `carrier_id` (agent_id or null), `pos_A` (int in [-L, 0]), `pos_B` (int in [0, +L]), `round_tick` (int 0..50). - Observable information: Fully observable by both active agents. ## Action space - `move(delta_x)`: Advance toward center or retreat toward baseline. - `grab()`: Available only at `x = 0` when unpossessed. - `tag()`: Available only to the Chaser when distance to Carrier <= 1. ## Playability notes - Single-player-vs-AI: Natural — 1 human vs. 1 AI agent controlling the active runner per round. - Group games (n>4): The 1v1 duel sub-problem preserves full strategic depth while bench players observe. - Physical-skill games: Sprint speed and acceleration discretized into integer step distances per tick. - What is lost: The physical micro-feints, subtle eye contact, and physical body dodging of live play. ## Implementation hints Extremely lightweight turn engine. Implement as a 1D board with 21 cells (`[-10, +10]`). First milestone: Verify the state transition from neutral approach to carrier-chaser chase.

Download as JSON

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

Download JSON
Cite this page

Handkerchief Game (Andorra). (n.d.). Games of Countries. https://gamesofcountries.com/games/ad-andorra/joc-del-mocador

@misc{gamesofcountries-ad-andorra-joc-del-mocador,
  title = {Handkerchief Game (Andorra)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/ad-andorra/joc-del-mocador}
}