Formal Specification
Chain tag (Dragon's tail) — Formal Specification
Finland · chase-tag · Confidence: high
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 4
# Ketjuhippa — AI-optimized specification
## General idea
A spatial chase-and-tag game where every captured player joins hands with the catcher to form an expanding connected human chain. As the chain grows in length and coverage, its turning agility decreases and only the two extreme ends of the chain retain the ability to tag, forcing the hunting team to coordinate flanking maneuvers while agile solitary runners dodge or slip through.
## Formal model
- **Abstraction taken:** Continuous physical running and hand-grasping are discretized into a 2D bounded grid (e.g., cells) with discrete synchronous time ticks. Hand-holding is modeled as a connectivity constraint graph where adjacent chain members must occupy orthogonally or diagonally adjacent cells.
- **Player/agent count:** agents (nominally ), configured as 1 initial tagger and free runners.
- **Turn model:** Simultaneous discrete execution per tick. Every agent commits a movement vector each tick, followed by global resolution.
## Formal rules
R1. **Arena Setup:** The arena is a bounded discrete 2D grid of size . All outer cells outside are out-of-bounds.
R2. **Initial State:** One agent is designated as the active Chain of length 1. All other agents are Free Runners initialized at distinct interior grid positions.
R3. **Movement Phase:** On each tick , every agent selects a movement action .
R4. **Chain Connectivity Constraint:** The Chain is an ordered sequence of agents . For the chain to be valid (unbroken), every adjacent pair must occupy adjacent cells (Chebyshev distance ). [gap-fill] If any adjacent pair exceeds distance 1 after movement, the chain is in a "broken" state for that tick.
R5. **Tagging Resolution:**
- Only the head and the tail are legal taggers, and only when the chain is unbroken.
- If or enters the cell of or becomes orthogonally adjacent to a free runner , is tagged.
- [gap-fill] If multiple runners are simultaneously tagged in the same tick, they are appended to the tagging end in ascending order of their agent IDs.
- A newly tagged runner is appended to the chain at the end that tagged them and ceases to be a free runner.
R6. **Boundary Infraction:** If a free runner executes a move outside grid , the runner is immediately tagged and appended to the nearest end of the chain.
R7. **Duck-Under / Pass-Through:** [gap-fill] A free runner may move through a cell between two interior chain members if the runner's speed vector crosses the segment connecting them, provided the runner does not touch or .
R8. **End Condition and Victory:** The game ends immediately when exactly one free runner remains uncaught (chain length ). That surviving runner is the sole winner.
## Edge cases
- **Tie at the end condition:** Not applicable — runners are eliminated sequentially or deterministically ordered by agent ID on simultaneous multi-tag ticks; exactly one final survivor is left.
- **A player with no legal move:** If an agent is completely blocked by grid boundaries and other agents, its legal action defaults to (stand still).
- **Repetition / cycles:** [gap-fill] To prevent infinite non-converging evasion cycles, an upper bound of ticks is enforced. If reached, the surviving free runners share victory ranked by distance from the chain.
- **Simultaneous claims on the same resource or position:** If two free runners attempt to enter the same empty cell on the same tick, both moves succeed if cell capacity , or the agent with lower ID claims the cell while the other remains in place.
- **Player elimination mid-round; turn order repair:** Free runners are not eliminated from the simulation upon being tagged; their controller transitions from free-runner evasion policy to chain-follower cooperative policy.
- **Resource exhaustion (pieces, tokens, space, time):** Spatial arena is invariant. The supply of free runners strictly decreases on each tag (), guaranteeing monotonic progress toward termination.
- **Termination guarantee: why the game provably ends:** Since the chain expands monotonically with every capture, its spatial reach increases while the number of evasive targets strictly decreases. Together with the bounded arena and limit, the game is guaranteed to terminate.
## State representation
- **Persistent state:** Grid dimensions ; total agent count ; tick counter ; chain list ; active status of each agent .
- **Per-player state:** Current coordinate; role identifier; chain index (if in chain).
- **Per-turn ephemeral state:** Vector of submitted movement intents ; chain broken flag .
- **Observable information:** Fully observable in standard gym/engine environments (all agent positions and chain connectivity are common knowledge).
## Action space
- `move(dx, dy)`: where .
- Preconditions: Target destination must not cross outer arena boundaries (unless invoking the voluntary out-of-bounds surrender rule R6). For chain interior members, selected move must preserve distance to adjacent chain neighbors.
## Playability notes
- **Single-player-vs-AI:** Highly playable. Human controls the solitary runner evading an AI-controlled coordinated multi-agent chain, or human controls the head of the chain steering AI followers.
- **Group games ():** Reduces naturally to 2 agents by having Agent 1 control the entire Chain (as an articulated snake/kinematic chain) and Agent 2 control a single Runner in a bounded maze.
- **Physical-skill games:** Physical endurance and grip strength are abstracted into discrete movement speed and connectivity constraints.
- **What is lost in the adaptation:** The physical sensation of arm pulling, momentum tug-of-war, and tactile hand-slips when the chain turns sharply.
## Implementation hints
- Model the chain as a linked list / deque of coordinate pairs with physics constraints.
- Branching factor: joint action space for uncoordinated agents, but collapses to when modeled as Chain-controller vs. Runner-controller.
- Suggested first milestone: Implement a 10×10 grid with 1 chain of length 2 and 1 runner, verifying that the chain head/tail can capture the runner upon contact.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Chain tag (Dragon's tail) (Finland). (n.d.). Games of Countries. https://gamesofcountries.com/games/fi-finland/ketjuhippa
@misc{gamesofcountries-fi-finland-ketjuhippa,
title = {Chain tag (Dragon's tail) (Finland)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/fi-finland/ketjuhippa}
}