Formal Specification
Twelve Sticks — Formal Specification
Lithuania · hide-seek · Confidence: low
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: discretizedGap-fills: 8
# Dvylika pagaliukų — AI-optimized specification
## General idea
Dvylika pagaliukų is an asymmetric hide-and-seek and territory-defense game played on a 2D spatial graph with a central seesaw catapult. At round start, twelve wooden sticks are catapulted across the field, forcing the seeker to gather and restack all twelve sticks before commencing any search. Hiders utilize cover nodes to evade detection, execute decoy runs, and attempt high-stakes sprint strikes to kick the catapult board, which immediately scatters the sticks again and releases all captured prisoners.
## Formal model
- **Abstraction taken:** Discretized. The physical environment is modeled as a 2D planar graph featuring a central baseboard node , open traversal paths, and designated cover nodes with line-of-sight occlusion [gap-fill]. Continuous foot sprints and stick tosses are mapped to movement points per tick and random 2D scatter coordinates.
- **Player/agent count:** agents (): 1 designated seeker () and hiders ().
- **Turn model:** Synchronous discrete time ticks (). All agents submit movement and interaction actions concurrently; spatial updates, line-of-sight checks, and base interactions resolve in strict order.
## Formal rules
R1. Setup: Seeker is placed at . Hiders are placed at adjacent starting nodes. The catapult board at contains an inventory of 12 sticks ().
R2. The Launch Phase ():
- A designated hider executes `kick_catapult()`.
- The 12 sticks are scattered to nodes sampled uniformly within radius graph hops [gap-fill].
- All hiders receive a movement bonus of steps [gap-fill] to reach hiding cover while is immobilized.
R3. The Gathering Phase:
- must traverse the graph to collect all 12 sticks.
- executes `pickup_stick()` on occupied nodes (carrying capacity = 12) and returns them to via `deposit_sticks()`.
- is prohibited from initiating a spot/tag action until .
R4. The Search and Tapping Phase:
- Once , may search the graph.
- Line-of-Sight (LOS): observes a hider if is within visibility range and not fully occluded by an intervening cover node.
- Spot and Tap: If establishes LOS on , must move to and execute `tap_board(H_i)` to capture .
- If successful, transitions to `jailed` status and is moved to detention queue.
R5. The Rescue Strike:
- Any active hider (`status = free`) may move to and execute `kick_catapult()`.
- Precondition: is co-located at and is not actively occupying [gap-fill].
- Effect: All 12 sticks are re-scattered across the graph (); all jailed hiders are instantly freed (`status = free`) and granted a 3-tick sprint window [gap-fill]; is forced back into the Gathering Phase.
R6. End Condition and Inning Transition:
- The round terminates in a seeker victory when all hiders are simultaneously `jailed`.
- The first hider captured in the sequence is assigned as the new seeker for the next round.
- If the round exceeds a global timeout ticks, the game terminates as a hider victory [gap-fill].
## Edge cases
- Tie at the end condition: If a seeker attempts `tap_board(H_i)` and a hider attempts `kick_catapult()` at on the exact same tick, the kick takes priority, resolving as a rescue [gap-fill].
- A player with no legal move: Not applicable — `stay()` is always a legal action at any node.
- Repetition / cycles (and the loop-breaking rule): Infinite cycles of capture and rescue are bounded by the global tick limit ticks [gap-fill].
- Simultaneous claims on the same resource or position: Multiple hiders and sticks can co-exist on the same node without collision locks.
- Player elimination mid-round; turn order repair: Jailed hiders are temporarily immobilized at ; their turns become null operations until freed by a rescue strike.
- Resource exhaustion (pieces, tokens, space, time): Sticks are fixed at 12 and indestructible; expiration of time budget halts play.
- Termination guarantee: Provably terminates due to the deterministic bounded tick counter .
## State representation
- Persistent state:
- Graph topology .
- Seeker ID, Hider status table (, capture sequence queue).
- Stick location array: for .
- Global tick counter .
- Per-turn ephemeral state:
- Agent coordinate vector , movement vectors, LOS detection matrix, pending baseboard interactions (`tap_board` vs `kick_catapult`).
- Observable information:
- Hiders observe global graph layout, stick positions, and seeker position when within line-of-sight.
- Seeker observes full graph layout, current stick locations, and only hiders with active unoccluded LOS.
## Action space
- `move(target_node)`: Traverse to an adjacent connected node in (all agents).
- `pickup_stick()`: Collect a stick present at current node (seeker only).
- `deposit_sticks()`: Unload carried sticks onto catapult board at (seeker only).
- `tap_board(hider_id)`: Execute formal capture announcement at for a spotted hider (seeker only).
- `kick_catapult()`: Trigger stick scatter and mass prison break at (hiders only).
- `stay()`: Remain in current cover node without movement (all agents).
## Playability notes
- Single-player-vs-AI: Highly compelling — player can control the seeker managing baseboard defense vs search risk, or play a stealth hider coordinating rescue kicks with AI teammates.
- Group games (n>4): Reducible to 2 agents (1 seeker vs 1 hider), but loses the essential multiplayer sacrifice/decoy and rescue-cascade dynamics.
- Physical-skill games: Physical foot sprints and stealth evasion are abstracted into graph shortest paths, line-of-sight polygons, and tick speeds.
- What is lost: The adrenaline rush of physical outdoor sprints, spatial hiding behind real shrubs/fences, and vocal shouting formulas are translated into discrete graph mechanics.
## Implementation hints
Graph representation requires precomputing line-of-sight occlusion masks for all pair-nodes. A discrete 2D grid with obstacle blocks () serves as an ideal spatial environment.
First milestone: Build the gathering phase state machine (stick scatter and 12-stick retrieval loop) before adding hider stealth and capture logic.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Twelve Sticks (Lithuania). (n.d.). Games of Countries. https://gamesofcountries.com/games/lt-lithuania/dvylika-pagaliuku
@misc{gamesofcountries-lt-lithuania-dvylika-pagaliuku,
title = {Twelve Sticks (Lithuania)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/lt-lithuania/dvylika-pagaliuku}
}