Skip to main content
Formal Specification

Algerian Spinning Top — Formal Specification

Algeria · top-spinning · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 2
# Zarbout — AI-optimized specification ## General idea A turn-based dexterity and collision contest where agents launch spinning tops into a 2D circle to attack stationary or spinning targets. Points are scored for direct hits and knock-outs, while throw failures convert the active top into a vulnerable target. ## Formal model - **Abstraction taken:** Physical cord-winding, wrist snap, and gyro-dynamics are parameterized by throw accuracy `Accuracy ~ N(aim_target, sigma)` and spin energy `Energy = f(Power, Skill)`. - **Player/agent count:** `N` agents (default `N = 4`, Player 0 through 3). - **Turn model:** Sequential attack rounds. Maximum 5 complete cycles (20 turns total). ## Formal rules R1. Setup: A circle of radius `R = 1.0m` centered at `(0, 0)`. Player 0's top is placed stationary at `(0, 0)` as the initial target. Players 1, 2, and 3 are in the attacking queue. R2. Attack Turn: The active agent chooses `(target_x, target_y)` and `throw_power in [0.5, 1.0]`. R3. Throw Resolution: - Landing point: `(land_x, land_y) = (target_x + epsilon_x, target_y + epsilon_y)`. - Spin success check: If `norm(land_x, land_y) > R`, top is `Out of Bounds` (fails). - If `P_spin(Skill, throw_power) < threshold`, top fails to spin (`Dud`). - A failed top transitions into a stationary target in the ring. R4. Collision & Damage: - If landing within collision radius `r_col = 0.15m` of an existing target, impact momentum transfers. - If target's resulting displacement exceeds `R`, target is `Knocked Out` (attacker earns `+3 points`). - If target remains inside, target suffers damage (`+1 point` to attacker). - Attacker top remains spinning inside the ring with active energy `E = throw_power * 100`. R5. Energy Decay: At the end of each round, all spinning tops inside the ring lose `20 energy`. A top reaching `0 energy` ceases spinning. R6. [gap-fill] Scoring & Win: The agent with the highest accumulated points when 5 cycles finish, or the last agent with a spinning top inside the circle, wins. ## Edge cases - Tie at the end condition: [gap-fill] If scores are tied after 5 cycles, a sudden-death single endurance spin round resolves the tie (longest spin duration wins). - A player with no legal move: Not applicable; throw action is always available. - Repetition / cycles: Bounded strictly by the 5-cycle upper limit. - Simultaneous claims on the same resource or position: Sequential throw order prevents simultaneous collisions. - Player elimination mid-round; turn order repair: Target knock-outs remove that target from the board without altering queue rotation order. - Resource exhaustion: Monotonic decrement of cycle counter. - Termination guarantee: Enforced by the 5-cycle round limit. ## State representation - Persistent state: `scores: Array[N][int]`, `active_tops: List[TopState]`, `cycle_num: int in [1..5]`. - Ephemeral state: `active_throw: (float, float, float)`. - Observability: Complete public visibility of circle geometry, target coordinates, and player scores. ## Action space - `launch_top(target_x, target_y, power)` where `target_x, target_y in [-1.0, 1.0]`, `power in [0.5, 1.0]`. ## Playability notes - Single-player-vs-AI: Highly playable as an arcade-style physics-aiming challenge against heuristic AI opponents. - Group games (n>4): Generalizes seamlessly to `N` players in a round-robin rotation. - Physical-skill games: Parameterized via variance parameters on landing coordinates and spin-energy transfer curves. - What is lost: The physical sensation of the cord peeling off the wood and the distinctive buzzing hum of a balanced top spinning on stone. ## Implementation hints 2D coordinate collision state machine. First milestone: implement circular boundary check and deterministic Euclidean distance collision detection before tuning stochastic noise distributions.

Download as JSON

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

Download JSON
Cite this page

Algerian Spinning Top (Algeria). (n.d.). Games of Countries. https://gamesofcountries.com/games/dz-algeria/zarbout-algeria

@misc{gamesofcountries-dz-algeria-zarbout-algeria,
  title = {Algerian Spinning Top (Algeria)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/dz-algeria/zarbout-algeria}
}