Formal Specification
Mirror — Formal Specification
Finland · chase-tag · Confidence: high
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: discretizedGap-fills: 4
# Peili — AI-optimized specification
## General idea
A traditional stop-and-go stealth racing game. A designated "Mirror" (*peili*) stands at the finish line with their back turned away from advancing runners. Runners advance stealthily toward the Mirror while the Mirror's back is turned. The moment the Mirror spins around to face the field, all runners must freeze completely motionless; any runner caught moving or failing to stop in time is penalized and sent back to the starting line. The first runner to touch the Mirror's back wins.
## Formal model
- **Abstraction taken:** The continuous physical advance and visual motion detection are discretized into a 1D longitudinal racing lane of length with discrete time ticks. The Mirror's head orientation ( vs ) transitions between intervals, and the runners choose movement speeds with deceleration braking latency.
- **Player/agent count:** agents (), comprising 1 Mirror and Runners.
- **Turn model:** Real-time ticked synchronous execution.
## Formal rules
R1. **Track Setup:**
- A 1D track of length (e.g. grid steps).
- Start line is at . Finish line (where the Mirror stands) is at .
- All runners begin at with velocity .
R2. **Mirror State & Turning Dynamics:**
- The Mirror has state .
- While , the Mirror chooses either to remain facing away or initiate a `turn_around()` action.
- [gap-fill] The Mirror's turn takes 1 tick to complete, during which an audio/visual cue is generated.
R3. **Runner Advance & Braking:**
- On each tick while the Mirror is , each runner chooses acceleration , updating speed and position .
- When the Mirror initiates a turn, runners must execute `brake()` to reduce to 0. [gap-fill] If speed when the Mirror reaches state , the runner is flagged with `motion_detected = true`.
R4. **Motion Detection & Penalty:**
- When the Mirror is , all runners with `motion_detected == true` are identified.
- Any flagged runner is immediately reset to with .
- Unflagged runners maintain their current advanced position .
- [gap-fill] The Mirror remains for a dwell duration of ticks, after which the Mirror turns back to .
R5. **Victory Condition:**
- If any runner reaches position while the Mirror is in state , that runner touches the Mirror's back and wins the round immediately.
- [gap-fill] If multiple runners cross on the same tick, the runner who achieved higher final position (or lower agent ID) is declared the winner.
## Edge cases
- **Tie at the end condition:** Handled by R5 (distance beyond , then agent ID).
- **A player with no legal move:** Runners always have acceleration/braking options; Mirror always has wait/turn options.
- **Repetition / cycles:** Runners sent back to can try repeatedly. To guarantee termination, a global maximum match duration of ticks is enforced; if reached, the runner with highest position is declared the winner.
- **Simultaneous claims on the same resource or position:** Multiple runners can occupy the same coordinate without interference.
- **Player elimination mid-round; turn order repair:** Not applicable — runners are never eliminated; they are merely reset to upon penalty.
- **Resource exhaustion (pieces, tokens, space, time):** Fixed track length and finite duration .
- **Termination guarantee: why the game provably ends:** Enforced by the finite match horizon , and probabilistically by the fact that safe creep strategies () have non-zero probability of reaching before .
## State representation
- **Persistent state:** Track length ; total runners ; match tick ; active round state .
- **Mirror state:** Orientation ; time until next turn decision; scan timer.
- **Per-runner state:** Position ; current velocity ; motion flag .
- **Observable information:** Imperfect information. Runners observe the Mirror's state and audible turn cues. The Mirror observes runner motion only when .
## Action space
- `runner_action(accelerate_amount)`: where `accelerate_amount` (negative values represent braking).
- `mirror_turn()` / `mirror_wait()`: (Mirror only).
## Playability notes
- **Single-player-vs-AI:** Highly playable. Human plays a runner testing risk thresholds (sprinting fast vs creeping cautiously) against an AI Mirror with stochastic turn intervals.
- **Group games ():** Naturally generalizes to any number of runners without modifying game rules.
- **Physical-skill games:** Physical balancing and stillness are abstracted into kinematic velocity stopping constraints.
- **What is lost in the adaptation:** The physical trembling of maintaining an awkward freeze stance and the social comedy of suppressing laughter.
## Implementation hints
- Implement as a simple 1D kinematic simulation with a state machine for the Mirror.
- Branching factor: acceleration choices per runner; 2 choices for Mirror.
- Suggested first milestone: Implement a 1-runner 1-Mirror environment with 20 track steps, verifying that failing to brake before the Mirror turns resets position to 0.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Mirror (Finland). (n.d.). Games of Countries. https://gamesofcountries.com/games/fi-finland/peili
@misc{gamesofcountries-fi-finland-peili,
title = {Mirror (Finland)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/fi-finland/peili}
}