Skip to main content
Formal Specification

Cat and mouse (Finnish pair-relieving chase) — Formal Specification

Finland · chase-tag · Confidence: high

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: discretizedGap-fills: 3
# Kissa ja hiiri — AI-optimized specification ## General idea A dynamic pair-relief chase game where a single Cat pursues a solitary Mouse across an arena dotted with resting player pairs. When the fleeing Mouse attaches to either side of a resting pair, the player on the opposite outside end of the pair is instantly ejected to become the new Mouse. If tagged, roles reverse instantly, creating continuous state shifts between active sprinting, pursuing, and stationary resting. ## Formal model - **Abstraction taken:** Continuous physical movement and lying prone are discretized into a 2D grid where resting pairs occupy fixed 2-cell formations (Pi,1,Pi,2). Sprinting and attaching are modeled as grid movement into an attachment slot adjacent to a resting pair. - **Player/agent count:** N agents (N=2K+2, where K≥2 is the number of pairs; typically 6≤N≤30). Exactly 1 Cat, 1 Mouse, and K pairs of resting agents. - **Turn model:** Simultaneous discrete execution per tick. ## Formal rules R1. **Arena & Setup:** A 2D bounded grid G. K pairs of stationary resting agents are initialized at distinct fixed paired coordinates (Pk,left,Pk,right). One agent is initialized as `Cat`, and one as `Mouse`. R2. **Movement:** On each tick t: - Active `Cat` and active `Mouse` choose a movement vector m∈{(0,0),(±1,0),(0,±1),(±1,±1)}. - Resting pair agents execute `noop` (remain stationary in their cells). R3. **Attachment / Relief Mechanic (*Parin vaihto*):** - A pair k consists of two ordered positions (Pk,left,Pk,right). - If the `Mouse` moves into an attachment cell adjacent to Pk,left, the former Mouse becomes the new left member of pair k, Pk,left shifts to become the new right member, and Pk,right is instantly ejected into state `Mouse`. - Symmetrically, if the `Mouse` attaches adjacent to Pk,right, Pk,left is instantly ejected to become the new `Mouse`. - [gap-fill] The ejected new Mouse receives 1 tick of immunity during which the Cat cannot tag it, allowing the new Mouse to register its role change and take its first evasive step. R4. **Tagging Resolution:** - If at the end of tick resolution the `Cat` occupies the same cell as or an orthogonally adjacent cell to the active `Mouse` (and the Mouse did not legally attach to a pair during this tick): - The `Mouse` is tagged. - Roles instantly swap: the former `Mouse` becomes the new `Cat`, and the former `Cat` becomes the new `Mouse`. R5. **Action Conflicts:** - [gap-fill] If on the same tick the Cat reaches the Mouse's cell while the Mouse reaches a valid pair attachment cell, the attachment takes precedence: the relief occurs and the tag fails. R6. **Round and Victory:** [gap-fill] In formal match play, the game is played for a fixed budget of Tmatch=600 ticks. The agent with the lowest cumulative time spent in the `Cat` role (or highest evasion time as `Mouse`) is declared the winner. ## Edge cases - **Tie at the end condition:** If two or more agents share the minimum time spent as Cat, the tie is broken by the fewest number of times being tagged. - **A player with no legal move:** Resting agents always execute `noop`. Active runners blocked by obstacles or boundaries have (0,0) (stand still) as their legal fallback. - **Repetition / cycles:** The relief mechanic naturally produces frequent cyclic role changes; bounded strictly by the finite match duration Tmatch. - **Simultaneous claims on the same resource or position:** Resolved by R5 (attachment takes precedence over tagging). If Cat and an ejected Mouse attempt to enter the same non-pair cell, the Cat's move succeeds and the Mouse is deflected to an adjacent free cell. - **Player elimination mid-round; turn order repair:** Not applicable — no players are eliminated; players dynamically rotate between resting pair status, Mouse, and Cat. - **Resource exhaustion (pieces, tokens, space, time):** The number of pair slots and agents is invariant. Time bounded by Tmatch. - **Termination guarantee: why the game provably ends:** Guaranteed by the finite match horizon Tmatch after which scores are evaluated. ## State representation - **Persistent state:** Grid bounds (W,H); list of K pairs with ordered member IDs (Pk,left,Pk,right) and coordinates; match tick limit Tmatch. - **Per-player state:** Current (x,y); current role ∈{Cat,Mouse,Resting}; cumulative ticks spent as Cat; cumulative ticks spent as Mouse. - **Per-turn ephemeral state:** Movement intents; active attachment event (if any); immunity flag for newly ejected Mouse. - **Observable information:** Fully observable to all agents. ## Action space - `move(dx, dy)`: where dx,dy∈{−1,0,1} (active Cat and Mouse). - `attach(pair_id, side)`: (Mouse only) valid when adjacent to the specified pair side. - `noop()`: (Resting pair agents). ## Playability notes - **Single-player-vs-AI:** Highly playable. Human controls the Mouse navigating a field of AI resting pairs to dodge an AI Cat, triggering tactical pair reliefs. - **Group games (n>4):** Reduces cleanly to a 2-agent game with automated dummy pairs distributed across the grid acting as static relay stations. - **Physical-skill games:** Sprinting stamina and quick reaction time from prone positions are abstracted into discrete tick budgets and the 1-tick immunity rule. - **What is lost in the adaptation:** The physical comedy of sprawling on the lawn, scramble to get up from lying flat on the stomach, and physical jostling within the pairs. ## Implementation hints - Represent pairs as simple tuples of agent references mapped to grid cells. - Branching factor: 9 movement choices for active agents; resting agents have branching factor 1 (`noop`). - Suggested first milestone: Implement a grid with 2 static pairs, 1 Cat, and 1 Mouse, verifying that attaching to Pair 1 successfully ejects the opposite partner as the new Mouse.

Download as JSON

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

Download JSON
Cite this page

Cat and mouse (Finnish pair-relieving chase) (Finland). (n.d.). Games of Countries. https://gamesofcountries.com/games/fi-finland/kissa-ja-hiiri

@misc{gamesofcountries-fi-finland-kissa-ja-hiiri,
  title = {Cat and mouse (Finnish pair-relieving chase) (Finland)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/fi-finland/kissa-ja-hiiri}
}