Formal Specification
The Bear is Sleeping — Formal Specification
Sweden · singing-circle · Confidence: high
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: discretizedGap-fills: 5
# Björnen sover — AI-optimized specification
## General idea
A dramatic singing-circle and sudden-scatter chase game where ring dancers rotate around a stationary central "Bear" while advancing a rhythmic verse countdown. On the terminal syllable trigger ("tro!"), the circle dissolves into a real-time spatial evasion chase where the Bear attempts to tag one fleeing dancer before they reach boundary safety or survive a fixed chase tick window. The tagged player becomes the Bear for the subsequent iteration.
## Formal model
- **Abstraction taken:** The continuous physical singing, ring dancing, and room scattering are discretized into a two-phase state machine: Phase 1 (Singing Ring) is a deterministic step counter (7 lyrics measures); Phase 2 (The Scatter Chase) is a discrete 2D grid/graph simulation over discrete time ticks where agents execute directional movement vectors. Physical tagging is modeled as agent co-location on the same grid cell.
- **Player/agent count:** agents (; default benchmark : 1 Bear , 5 Dancers ).
- **Turn model:** Phase 1 advances via synchronized lyric ticks; Phase 2 executes simultaneous movement ticks ().
## Formal rules
R1. **Setup:** The arena is an grid with a central den cell . One agent is assigned role `BEAR`, and agents are assigned role `DANCER`. Dancers start on a circle of radius centered at , linked in an ordered ring.
R2. **Phase 1 (The Song Countdown):**
- The song progresses through 7 discrete meter beats ().
- On each beat , all Dancers advance 1 step clockwise along the perimeter of radius .
- The Bear must maintain state `SLEEPING` at and cannot issue movement actions.
- [gap-fill] If the Bear executes an action before beat , a false start foul is incurred, resetting the song to beat 1.
R3. **Phase 2 (The Awakening Trigger):**
- Exactly upon beat (the word *"tro!"*), the Bear transitions to state `AWAKE` and the Dancers transition to state `SCATTERING`.
- The linked ring breaks; all agents act independently.
R4. **Chase Ticks:**
- Phase 2 runs for a maximum of ticks [gap-fill].
- In each tick , all agents simultaneously submit a movement vector .
- Bear maximum speed is ; Dancer maximum speed is [gap-fill].
R5. **Capture Condition:**
- If at the end of any tick , , Dancer is tagged.
- The round ends immediately upon the first tag. is designated the Bear for the next round.
R6. **Survival / Timeout Condition:**
- [gap-fill] If ticks elapse without a tag, the Bear fails to catch any dancer; the current Bear remains the Bear for the next round, or the slowest fleeing dancer is selected by tie-break.
## Edge cases
- Tie at the end condition: If the Bear simultaneously reaches the same cell as two Dancers on the same tick, the Bear tags the dancer with the lowest index [gap-fill].
- A player with no legal move: An agent against the boundary grid wall may only select movement vectors directed into open grid cells; if fully cornered, is executed.
- Repetition / cycles: Phase 1 has a strictly monotonic counter ; Phase 2 is strictly bounded by ticks. No infinite loop can occur within a round.
- Simultaneous claims on the same resource or position: Multiple Dancers may occupy the same grid cell during the scatter phase; cell occupancy is non-exclusive.
- Player elimination mid-round: Not applicable, as this is a non-elimination continuous role-rotation game. If an agent disconnects, decreases by 1 and the ring reforms.
- Resource exhaustion (pieces, tokens, space, time): Spatial bounds are fixed by the grid boundary (). Time is bounded by .
- Termination guarantee: Each round terminates in at most ticks. A full session terminates after a preset number of rounds with individual scores tracking successful evasions and tags.
## State representation
- **Persistent state:**
- `round_number`: integer.
- `agent_scores`: mapping of agent ID to `{times_bear: int, successful_tags: int, escapes: int}`.
- `current_bear_id`: agent ID.
- **Per-turn ephemeral state:**
- `phase`: `SINGING` or `CHASE`.
- `song_beat`: integer .
- `chase_tick`: integer .
- `positions`: map of agent ID .
- `tagged_agent_id`: optional agent ID.
- **Observable information:**
- Fully observable: All agent positions, the song beat counter, and role assignments are public knowledge to all agents.
## Action space
- `sing_step()`: Executed during Phase 1 by Dancers (advances along circular trajectory).
- `sleep()`: Executed during Phase 1 by the Bear (maintains position ).
- `move(dx, dy)`: Executed during Phase 2 by any agent, subject to .
## Playability notes
- Single-player-vs-AI: Natural — A single human player can play as the Bear against heuristic evader bots, or as a single Dancer attempting to evade an AI Bear pursuing the nearest target.
- Group games (n>4): The native 6–12 player game reduces cleanly to 2 agents (1 Bear vs 1 Dancer) by collapsing the ring to an initial distance separation followed by the trigger sprint.
- Physical-skill games: Physical running speed, agility, and acoustic reflex timing are mapped into the differential speed parameters () and the instantaneous trigger tick.
- What is lost in the adaptation: The social choral joy of collective singing, eye contact, theatrical roars, and tactile hand-holding are abstracted into numeric state transitions.
## Implementation hints
Low complexity. Modeled as a simple discrete 2D kinematic simulation with a 2-state finite automaton (`SINGING` `CHASE`). Branching factor during chase is 9 discrete directions per agent. First milestone: implement the 7-beat countdown trigger and verify that an evader pursuing boundary escape can be intercepted by a pursuer with speed.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
The Bear is Sleeping (Sweden). (n.d.). Games of Countries. https://gamesofcountries.com/games/se-sweden/bjornen-sover
@misc{gamesofcountries-se-sweden-bjornen-sover,
title = {The Bear is Sleeping (Sweden)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/se-sweden/bjornen-sover}
}