Skip to main content
Formal Specification

Whipping Top (Spinning Top with Whip) — Formal Specification

Czechia · top-spinning · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 3
# Káča s bičíkem — AI-optimized specification ## General idea A resource-management and timing contest where agents maintain the angular momentum and spatial trajectory of a physical spinning top. In each discrete time tick, an agent decides the timing, force, and strike angle of whip actions to maximize rotational energy and stability while mitigating the risk of tipping over due to mistimed impacts or decay. ## Formal model - **Abstraction taken:** The continuous rotational mechanics and chaotic fluid contact between leather whip and wooden grooved top are replaced by a state-vector dynamic model tracking angular velocity ω∈[0,ωmax⁡], stability/precession angle θ∈[0,π/2], and 2D spatial coordinate (x,y). - **Player/agent count:** 2 agents in standard head-to-head heat (scalable from 1 to n). - **Turn model:** Synchronous discrete time ticks (e.g. 1 tick = 0.5s of simulated physical time). ## Formal rules R1. Setup: Each agent i starts with a top initialized at state (ω0,θ0,x0,y0) with ω0=100, θ0=0.0 (perfect vertical spin), and position in designated starting zone. R2. In each tick t, agent i chooses one action from the legal action set: - `whip(force, angle_offset)` where force∈[1,3] (integer power level) and angle_offset∈[−π/6,π/6]. - `steer(dir)` to nudge lateral trajectory along vector v→. - `pass` (let the top spin unassisted). R3. Physics & Stochastic Resolution (per tick): - Passive decay: ωt+1=ωt−γ−αsin⁡(θt) where γ=2.0 is ground/air friction and α=5.0 is wobble drag. - If `pass`: θt+1=θt+β/(ωt+1+1) (stability degrades as angular velocity drops). - If `whip(force, angle)`: - [gap-fill] Strike Success Check: Strike accuracy depends on current wobble θt and agent skill μi: P(clean hit)=max⁡(0.2,1.0−0.5θt−0.1×force+μi). - If Clean Hit: ωt+1=min⁡(ωmax⁡,ωt+1+25×force), and θt+1=max⁡(0,θt−0.2×force). - If Mistimed / Glancing Hit: ωt+1=ωt+1+5×force, and θt+1=θt+0.3×force (instability increases). R4. Top Fall Condition: A top falls ("dies") if ωt≤0 OR θt≥θcrit=π/3≈1.05 rad. R5. [gap-fill] Collision Resolution (Duel Mode): If distance ‖(x1,y1)−(x2,y2)‖≤rcollision, tops collide: higher kinetic energy (12Iω2) transfers momentum, inflicting +Δθ stability penalty on the weaker top. R6. Win / Loss / Draw: - In Endurance Mode: The last agent whose top remains spinning (ω>0∧θ<θcrit) wins 1 point. - If both tops fall on the exact same tick, the round is scored as a draw. R7. [gap-fill] Max Round Limit: If both tops remain spinning at Tmax⁡=120 ticks, the agent with higher accumulated angular velocity ω is declared the winner. ## Edge cases - Tie at the end condition: Resolved by comparing final residual ω at Tmax⁡, or declared a tie if within tolerance ϵ<0.1. - A player with no legal move: Not applicable; `pass` and `whip` actions are unconditionally available every tick. - Repetition / cycles: Strictly bounded by physical friction decay parameters and the absolute hard tick ceiling Tmax⁡=120. - Simultaneous claims on the same resource or position: Handled by R5 (physical collision resolver based on kinetic energy inequality). - Player elimination mid-round: An agent whose top dies transitions to eliminated state; remaining agents continue until one survivor remains. - Resource exhaustion: Not applicable; whip strikes are non-consumable, though energy efficiency governs strike frequency. - Termination guarantee: Guaranteed by monotonic friction decay γ>0, wobble instability amplification R3, and hard ceiling Tmax⁡. ## State representation - Persistent state: Match format (Endurance / Obstacle / Duel), cumulative match score, agent skill parameters. - Per-tick ephemeral state (per agent i): Angular velocity ωi∈[0,200], wobble angle θi∈[0,π/2], 2D coordinate (xi,yi), alive boolean, tick counter t∈[1,Tmax⁡]. - Observable information: Fully observable in standard matches (both agents observe exact ω,θ, and positions of both tops). ## Action space - `whip(force, angle_offset)`: force∈{1,2,3}, angle_offset∈[−π/6,π/6]. - `steer(dx, dy)`: normalized 2D direction unit vector. - `pass`: no-op (observe and let top coast). ## Playability notes - Single-player-vs-AI: Natural and highly engaging. A single agent can play a high-score endurance challenge (keeping top alive for maximum ticks) or compete against an AI opponent balancing risk-reward whipping strategies. - Group games (n>4): Scales cleanly as a multi-agent survival battle-royale in a shared collision arena. - Physical-skill games: Physical whip timing and tangential impact angle are modeled as a stochastic control problem balancing power vs. stability risk. - What is lost: The physical muscle memory of flicking a wrist, braided leather rope wear, and surface terrain irregularities are abstracted into scalar equations. ## Implementation hints Treat as a discrete-time Markov Decision Process (MDP). The optimal policy balances whipping when ω begins to dip while avoiding over-whipping when wobble θ is elevated. First milestone: implement single-top 1D state (ω,θ) with deterministic decay and stochastic whip responses; second milestone: add 2D spatial arena and multi-agent collision mechanics.

Download as JSON

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

Download JSON
Cite this page

Whipping Top (Spinning Top with Whip) (Czechia). (n.d.). Games of Countries. https://gamesofcountries.com/games/cz-czechia/kaca-s-bicikem

@misc{gamesofcountries-cz-czechia-kaca-s-bicikem,
  title = {Whipping Top (Spinning Top with Whip) (Czechia)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/cz-czechia/kaca-s-bicikem}
}