Skip to main content
Formal Specification

Syrian Peg-Top — Formal Specification

Syria · top-spinning · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: adaptation-requiredFidelity: probabilistic-proxyGap-fills: 1
# Al-Dawwama — AI-optimized specification ## General idea A continuous-space rotational combat game where agents launch spinning tops into a 2D circular ring. Agents balance launch velocity, launch angle, and spin duration against the objective of colliding with and ejecting an opponent's top from the arena while maintaining sufficient angular momentum to stay upright. ## Formal model - **Abstraction taken:** Physical top modeled by position 𝐱∈ℝ2, translational velocity 𝐯, and angular speed ω(t)=ω0e−γt. Collision between tops resolves momentum exchange and angular friction loss. - **Player/agent count:** 2 agents (duel mode) or N agents (battle royale). - **Turn model:** Simultaneous launch phase per round, followed by continuous physics resolution until all tops stop or exit arena. ## Formal rules R1. Setup: Arena is a 2D disk of radius R=1.0 centered at (0,0). Match played over K=5 rounds. Scores PTS0=0,PTS1=0. R2. Launch Action: Each agent i chooses launch parameters (θi,ri,poweri,spin_biasi). - Initial spin ω0=power×skill+ϵlaunch. - If launch fails (ω0<ωmin⁡), top fails to spin and is eliminated immediately for the round. R3. State Propagation: - Positions update: 𝐱i(t+Δt)=𝐱i(t)+𝐯i(t)Δt. - Spin decays: ωi(t+Δt)=ωi(t)−γΔt. R4. Collision Resolution: - When ‖𝐱i−𝐱j‖≤2rtop, an elastic collision occurs: - Velocities 𝐯i,𝐯j update according to standard 2D collision equations with coefficient of restitution e. - Both tops incur angular momentum penalty: ω←ω×(1−δfriction). R5. Arena Ejection & Fall: - If ‖𝐱i‖>R, top i is ejected from the arena. - If ωi≤0, top i falls over ("dies"). R6. Round Scoring: - If top i remains spinning inside the arena while top j is ejected or dead, agent i scores 1 point. - If both tops survive until time limit, the top with the higher remaining ω scores 1 point. R7. Win condition: The first agent to accumulate 3 round points wins the match. ## Edge cases - **Tie at the end condition:** [gap-fill] If both tops die simultaneously or finish with identical ω within tolerance ϵ, the round is scored as a draw (0 points awarded to both) and replayed. - **A player with no legal move:** Not applicable; launch vector can always be selected. - **Repetition / cycles:** Spin strictly decays monotonically (γ>0), guaranteeing every round terminates in finite time. - **Simultaneous claims on the same resource or position:** Physics engine integrates collision at continuous contact point. - **Player elimination mid-round; turn order repair:** In N-player matches, dead/ejected tops are removed from active physics loop. - **Resource exhaustion:** Tops are durable; launch energy resets each round. - **Termination guarantee:** Guaranteed by exponential angular velocity decay ω(t)→0. ## State representation - Persistent state: `scores: [int, int]`, `round_number: int`. - Ephemeral state (per round): - `positions`: array of shape `(N, 2)`. - `velocities`: array of shape `(N, 2)`. - `spins`: array of shape `(N,)`. - `active`: array of booleans. - Observable information: Fully observable 2D state during round execution. ## Action space - `launch_top(aim_angle, aim_distance, power, spin_torque)`: Continuous parameter vector 𝐮∈ℝ4. ## Playability notes - Single-player-vs-AI: Natural; AI calculates target intercept trajectories to maximize ejection momentum against opponent tops. - Group games (n>4): Extends cleanly to N tops colliding in a larger circular ring. - Physical-skill games: String winding tension and snapping release modeled via initial angular velocity variance. - What is lost in the adaptation: Wood scent, rhythmic buzzing sound of high-speed rotation, and physical top-nicking scars. ## Implementation hints - Implement a 2D Euler integrator with simple contact collision circles. - Suggested first milestone: Implement spinning duration decay loop with stationary target top collision before optimizing multi-agent dynamic launches.

Download as JSON

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

Download JSON
Cite this page

Syrian Peg-Top (Syria). (n.d.). Games of Countries. https://gamesofcountries.com/games/sy-syria/al-dawwama

@misc{gamesofcountries-sy-syria-al-dawwama,
  title = {Syrian Peg-Top (Syria)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/sy-syria/al-dawwama}
}