Formal Specification
Drop the Handkerchief (Bati-bat) — Formal Specification
Albania · singing-circle · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 3
# Loja e shamisë — AI-optimized specification
## General idea
A ring-graph hidden placement and chase game. A Runner agent circumnavigates a discrete circular graph of seated agents and chooses a discrete seat index to secretly drop a handkerchief. Seated agents periodically query their back-space; if detected early, a directional pursuit race occurs around the ring to occupy the vacant vertex.
## Formal model
- **Abstraction taken:** The physical circle is modeled as a directed 1D ring graph `C_N` with vertices `v_0, v_1, ..., v_{N-1}`. Seated agents occupy vertices; one vertex becomes temporarily vacant during a chase.
- **Player/agent count:** `N + 1` agents (1 Runner, `N` Seated players, default `N = 6`).
- **Turn model:** Two-phase model: Secret Drop Phase on the ring graph, followed by a Chase Phase executed over discrete ticks.
## Formal rules
R1. Setup: Ring graph has `N` vertices `0..N-1`. Seated agents occupy vertices `0..N-1`. Runner starts at `pos_runner = 0` with `holding_handkerchief = true`.
R2. Drop Phase: Runner advances around the ring `pos_runner = (pos_runner + 1) % N` and selects a target vertex `d ∈ {0..N-1}` to execute `drop_handkerchief(d)`.
R3. Detection Model: For each tick the handkerchief sits behind vertex `d`:
- Seated agent at `d` performs a detection check with probability `P_detect = 0.25` per tick [gap-fill].
- If detected before Runner reaches `(d + N) % N` (completes full lap):
- Seated agent picks up handkerchief; vertex `d` becomes `VACANT`.
- Advance immediately to R4 (Chase Phase).
- If Runner reaches `d` without detection:
- Seated agent is tagged oblivious (`BATI_BAT`).
- Oblivious seated agent becomes the new Runner for round `r+1`. Round ends immediately.
R4. Chase Phase (Sprint Race):
- Runner starts at `pos_runner` and flees toward `target_vertex = d`.
- Chaser starts at `d` and pursues Runner along the clockwise ring.
- Per tick: Runner moves `speed_runner = 1.0` vertex/tick; Chaser moves `speed_chaser = 1.1` vertex/tick [gap-fill: chaser speed advantage].
- If Chaser reaches Runner's coordinate before Runner reaches `d`: Runner is `TAGGED`; Runner remains Runner for round `r+1`.
- If Runner reaches `d` before Chaser catches them: Runner occupies `d` and is safe; Chaser becomes the new Runner for round `r+1`.
R5. Win condition: Evaluated after `M = 10` rounds [gap-fill]; the agent who spent the fewest total rounds as Runner wins the match.
## Edge cases
- Tie at the end condition: Agent with lowest cumulative rounds as Runner wins; if tied, a 1v1 sprint lap around the ring determines the winner.
- A player with no legal move: Not applicable; legal movement along the ring graph is always well-defined.
- Repetition / cycles: Bounded because each round terminates within at most `2 * N` ticks, and match length is capped at `M = 10` rounds.
- Simultaneous claims on the same resource or position: Resolved strictly by the arrival check at vacant vertex `d` during R4.
- Player elimination mid-round; turn order repair: When roles invert, the previous runner becomes seated at `d` and the chaser becomes the active runner.
- Resource exhaustion (pieces, tokens, space, time): Exactly one handkerchief exists in the system.
- Termination guarantee: why the game provably ends: Guaranteed because drop laps and chase distances are strictly finite on graph `C_N`, and match rounds are capped at `M = 10`.
## State representation
- Persistent state: `rounds_as_runner: array[N+1] of int`, `current_runner_id: int`, `round_num: int`.
- Per-turn ephemeral state: `handkerchief_pos: int (-1 if held)`, `phase: {DROP, CHASE}`, `chaser_id: int`, `vacant_vertex: int`, `runner_pos_float: float`, `chaser_pos_float: float`.
- Observable information: Handkerchief drop location is private to Runner until detected by the target agent or until lap completion.
## Action space
- `drop_handkerchief(vertex_id: int)`: Runner action during Drop Phase.
- `check_behind()`: Seated agent perception action.
- `sprint_to(vertex_id: int)`: Runner/Chaser movement action during Chase Phase.
## Playability notes
- Single-player-vs-AI: Natural; player acts as Runner or Seated agent against heuristic bots.
- Group games (n>4): Natively designed for `N=6..15` agents on a ring topology.
- Physical-skill games: Tactile back-checks and sprinting speed differentials are modeled as tick movement rates and detection probabilities.
- What is lost in the adaptation: The group polyphonic chanting rhythm, deceptive eye contact, and physical adrenaline of circle sprinting.
## Implementation hints
Ring graph topology with discrete state machines. Branching factor is `N` for drop selection. First milestone: Implement ring distance tracking and chase race resolution for `N=6` agents.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Drop the Handkerchief (Bati-bat) (Albania). (n.d.). Games of Countries. https://gamesofcountries.com/games/al-albania/loja-e-shamise
@misc{gamesofcountries-al-albania-loja-e-shamise,
title = {Drop the Handkerchief (Bati-bat) (Albania)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/al-albania/loja-e-shamise}
}