Skip to main content
Formal Specification

Spinning Top Game — Formal Specification

Bulgaria · top-spinning · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 3
# Igra na pumpal — AI-optimized specification ## General idea A top-spinning contest combining duration-of-spin maximization with precision target collisions. Players parameterize string-pull force and launch release angles to cast wooden spinning tops into a 2D arena. The game evaluates gyroscopic stability, angular velocity decay, and impulse transfer upon collision with opponent tops. ## Formal model - **Abstraction taken:** The 3D rotational mechanics of a precessing gyroscopic top are abstracted into: (1) an initial angular velocity ω0 determined by string pull effort, (2) an exponential decay model ω(t)=ω0e−γt, and (3) a 2D translational coordinate trajectory with elastic collision impulses. - **Player/agent count:** K players (K∈[2,6]). - **Turn model:** Round-based, with alternating first-attacker roles. ## Formal rules R1. Setup: - Arena is a 2D circular boundary centered at (0,0) with radius Rarena=0.60 m. - Each top has physical attributes: Mass m∈[0.10,0.25] kg, Tip Friction coefficient γ∈[0.03,0.06], and Balance Rating B∈[0.8,1.0]. - Target victory score Twin=5 points. R2. Launch Action: - An agent submits launch parameters 𝐋=(pull_force F,aim_angle θ,target_radius r). - [gap-fill] Initial angular velocity is initialized as ω0=min⁡(100.0,F⋅1.2⋅Balance)+𝒩(0,σlaunch2). - Initial landing position: 𝐩0=(rcos⁡θ,rsin⁡θ)+𝒩(0,σaim2). R3. Dynamic Evolution per Simulation Tick Δt: - Angular velocity updates: ω(t+Δt)=ω(t)−γ⋅ω(t)⋅Δt. - Position precesses with drift velocity 𝐯drift=𝐰drift⋅(1.0−ω(t)/ω0). - If ω(t)≤ωcollapse (threshold ≈10.0 rad/s): Top loses balance, topples over, and transitions to state `Dead`. - If ||𝐩(t)||>Rarena: Top is designated as `OutOfBounds`. R4. Collision Dynamics: - If two spinning tops A and B satisfy ||𝐩A−𝐩B||≤rtopA+rtopB: - Elastic collision impulse is exchanged: Δ𝐯=2mBmA+mB(𝐯B−𝐯A). - [gap-fill] Stability penalty: Both tops suffer angular velocity drop Δω=−0.15⋅ω(t). R5. Round Scoring: - In Combat Arena Mode (2 players): - If Player 2's top strikes Player 1's top and forces it to become `Dead` or `OutOfBounds` while Player 2 remains spinning inside: Player 2 scores +2 points. - If Player 2 fails to topple Player 1 or goes `Dead`/`OutOfBounds` first: Player 1 scores +1 point. - In Pure Endurance Mode (multiplayer): - The player whose top achieves the longest time duration in state `Spinning` scores +1 point. R6. [gap-fill] Victory Condition: - Rounds repeat, alternating the first-launcher role, until at least one player accumulates ≥Twin points. The player with the highest score wins. ## Edge cases - Tie at the end condition: If multiple players reach Twin on the same round with equal points, one sudden-death endurance spin round is executed. - A player with no legal move: Not applicable — launch action is always available at round start. - Repetition / cycles: Bounded: The continuous friction decay γ>0 strictly forces ω(t)→0, guaranteeing that every top topples in finite time (typically <40 seconds / 80 ticks). - Simultaneous claims on the same resource or position: Physical positions are continuous 2D coordinates; collision resolution handles overlapping radii instantly. - Player elimination mid-round; turn order repair: If a player's top dies or exits the arena, it is marked inactive; remaining active tops continue simulating until all tops topple. - Resource exhaustion: Not applicable — tops and strings are persistent entities reset at the start of each round. - Termination guarantee: Enforced by the monotonic decay of angular momentum (ω(t)→0). ## State representation - Persistent state: Player scores [Score1,…,ScoreK], player equipment profiles (mi,γi,Bi), active first-launcher index. - Per-tick ephemeral state: Array of top dynamic states [(𝐩i,𝐯i,ωi,statei)], elapsed round time telapsed. - Observable information: Fully observable — all positions, spin rates, boundaries, and scores are public knowledge. ## Action space - `launch_top(pull_force, aim_angle, aim_dist)`: Precondition: Round open, caller is designated launcher. ## Playability notes - Single-player-vs-AI: Highly playable — Human adjusts aim and force to knock an AI top out of the circle or optimize pure endurance parameters. - Group games (n>4): Fully supported in Endurance Mode (all players launch simultaneously) or as a round-robin combat tournament. - Physical-skill games: String winding tightness and wrist snap release are abstracted into numerical force and balance scalars. - What is lost: The hypnotic visual beauty of a perfectly balanced wooden top "sleeping" on polished stone and the sharp auditory hum of rotation are formalized into numerical state variables. ## Implementation hints Low complexity. The 2D particle simulation with rotational decay can be written in under 100 lines of standard math. Suggested first milestone: implement the single-top exponential decay equation ω(t) and verify that spin duration scales logically with pull force and friction.

Download as JSON

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

Download JSON
Cite this page

Spinning Top Game (Bulgaria). (n.d.). Games of Countries. https://gamesofcountries.com/games/bg-bulgaria/igra-na-pumpal

@misc{gamesofcountries-bg-bulgaria-igra-na-pumpal,
  title = {Spinning Top Game (Bulgaria)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/bg-bulgaria/igra-na-pumpal}
}