Formal Specification
Demon Tag / Japanese Tag — Formal Specification
Japan · chase-tag · Confidence: low
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: discretizedGap-fills: 4
# Onigokko — AI-optimized specification
## General idea
A foundational chasing and pursuit game. One designated "Oni" (demon/it) pursues runners across a discretized arena with environmental sanctuary mechanisms (high-ground immunity in *Taka-oni*, color matching in *Iro-oni*, or teammate rescue in *Koori-oni*).
## Formal model
- **Abstraction taken:** Continuous physical running, dodging, tactile contact, and environmental obstacles are discretized onto a 2D grid graph `G = (V, E)`. Movement occurs in synchronous time ticks with differential speed parameters: the Oni has higher movement capacity per tick than runners.
- **Player/agent count:** 1 Oni agent vs `n-1` runner agents (minimum 2 players; standard: 1 Oni, 1 Runner).
- **Turn model:** Synchronous simultaneous agent movement ticks.
## Formal rules
R1. Arena setup: A 2D grid graph `G = (V, E)` where each node has a feature attribute `feature in {NORMAL, HIGH_GROUND, COLOR_RED, COLOR_BLUE, COLOR_YELLOW}`.
R2. Movement speeds:
- On each tick, the Oni agent may move up to 2 connected edges.
- Runner agents may move up to 1 connected edge per tick.
R3. Tag resolution:
- A tag occurs if the Oni occupies the same node `v` as a runner at the conclusion of a tick, provided the runner is not protected by an active sanctuary.
R4. Role transfer & No Tag-Backs (*Oni-gaeshi nashi*):
- When a runner is tagged, that runner becomes the new Oni for the subsequent round.
- The new Oni is forbidden from tagging the former Oni on the first tick of the new round.
R5. Sanctuary rules:
- High-ground (*Taka-oni*): A runner standing on a `HIGH_GROUND` node is immune to tagging.
- Color-tag (*Iro-oni*): Every 10 ticks, a target color is declared; only nodes matching the active color provide tag immunity.
R6. Freeze mode (*Koori-oni*):
- Tagged runners enter `FROZEN` state at their current node.
- An unfrozen runner co-occupying the node of a `FROZEN` teammate can execute `unfreeze()` to restore them to `ACTIVE` state.
R7. [gap-fill] Round time limit: A round lasts a maximum of 60 ticks. If the Oni fails to tag any runner within 60 ticks, the runners win the round.
R8. [gap-fill] High-ground duration limit: A runner may remain on a `HIGH_GROUND` node for a maximum of 5 consecutive ticks; staying beyond 5 ticks removes immunity.
R9. [gap-fill] Freeze mode victory: In *Koori-oni*, the Oni wins the game the instant all `n-1` runners are simultaneously `FROZEN`.
R10. [gap-fill] Simultaneous multi-runner tag: If the Oni enters a node occupied by multiple non-immune runners, the Oni selects exactly 1 runner to tag.
## Edge cases
- **Tie at the end condition:** Evaluated at tick 60: if a tag occurred, the Oni won; otherwise, runners won.
- **A player with no legal move:** Graph topology guarantees every node has at least one connected traversable neighbor; agents may choose to remain on current node.
- **Repetition / cycles:** Runners can loop around obstacles; bounded by the 60-tick round cap (R7).
- **Simultaneous claims on the same resource or position:** Multiple runners can occupy the same node peacefully.
- **Player elimination mid-round:** In *Koori-oni*, frozen players remain stationary until unfrozen by a peer.
- **Resource exhaustion:** Board space and tick budgets are finite.
- **Termination guarantee:** Guaranteed by the strict 60-tick round duration cap (R7) and the speed advantage of the chaser (R2).
## State representation
- **Persistent state:** `oni_id` (agent ID), `game_mode` (BASIC | TAKA_ONI | IRO_ONI | KOORI_ONI), `round_tick` (int in `[0..60]`).
- **Per-tick state:** `agent_positions` (dict: `agent_id -> node_id`), `agent_status` (dict: `agent_id -> ACTIVE | FROZEN`), `sanctuary_counters` (dict: `agent_id -> int`), `active_color` (color enum).
- **Observable information:** Fully observable game state across the grid.
## Action space
- `move(direction: NORTH | SOUTH | EAST | WEST | STAY)`: Commit edge traversal.
- `unfreeze(target_agent_id)`: Thaw an adjacent frozen teammate in *Koori-oni*.
## Playability notes
- **Single-player-vs-AI:** Highly playable pursuit-evasion benchmark; AI uses Minimax / A* pathfinding with Voronoi cell partitioning.
- **Group games (n>4):** Naturally supports 3 to 10 agents; multi-runner coordination in *Koori-oni* creates rich emergent rescue strategies.
- **Physical-skill games:** Physical agility and sprinting endurance are abstracted into graph edge speed differentials.
- **What is lost in the adaptation:** Physical feints, rapid direction shifts, breathless laughter, and spatial park environments.
## Implementation hints
Discrete 2D grid graph (e.g. 10x10 grid). Speed difference (Oni = 2 steps/tick, Runner = 1 step/tick) guarantees eventual pursuit convergence. First milestone: implement basic pursuit-evasion on a grid with obstacle walls, then add high-ground and freeze states.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Onigokko (Japan). (n.d.). Games of Countries. https://gamesofcountries.com/games/jp-japan/onigokko
@misc{gamesofcountries-jp-japan-onigokko,
title = {Onigokko (Japan)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/jp-japan/onigokko}
}