Skip to main content
Formal Specification

Portuguese Spinning Top / Nicar o Pião — Formal Specification

Portugal · top-spinning · Confidence: low

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 4
# Jogo do Pião — AI-optimized specification ## General idea A turn-based target-spinning contest where agents launch spinning tops into a circular ring to strike and expel stationary "punished" tops. Launch precision and strike impact are modeled through a stochastic physics proxy; failed launches or tops dying inside the ring place the agent's top into punishment status. ## Formal model - **Abstraction taken:** Hand-cord throwing kinematics and gyroscopic stability are abstracted into a success probability distribution for spin establishment, landing position, and collision momentum transfer. - **Player/agent count:** 2 agents (1v1 contest). - **Turn model:** Sequential alternating turns across 10 rounds. ## Formal rules R1. Setup: Ring radius `R = 1.0m` centered at `(0, 0)`. Target win score `S_win = 5` points. Agent 1 starts with top in hand, Agent 2 has top in center `(0, 0)` under "castigo" (punishment). R2. On an agent's turn, the active attacker selects a launch strategy: - `LAUNCH_DIRECT(x_aim, y_aim)`: Direct throw aiming at a punished top. - `LAUNCH_SAFE_SPIN(x_aim, y_aim)`: Conservative launch aiming near ring perimeter. R3. Launch Execution & Spin Check: - Spin success probability: `P(spins | DIRECT) = 0.80`, `P(spins | SAFE) = 0.95` [gap-fill]. - If top fails to spin: It becomes a dead top inside the ring; attacker's top enters "castigo". - Landing coordinates: `(X, Y) ~ N((x_aim, y_aim), sigma)` where `sigma_DIRECT = 0.15m`, `sigma_SAFE = 0.25m` [gap-fill]. R4. Collision & Expulsion Resolution: - If landing distance to punished top `d((X, Y), (x_p, y_p)) <= 0.10m`: Direct strike (*nicar*) occurs. - Punished top displacement distance `D_disp ~ N(1.2m, 0.3m)`. - If new position of punished top `d((x_p', y_p'), (0, 0)) > R`: Punished top is expelled from ring! Attacker scores 1 point; expelled top is returned to its owner. R5. Ring Exit / Castigo Check for Attacker: - After spinning for `T_spin` seconds, attacker's top wanders and comes to rest at final point `(X_final, Y_final)`. - If `d((X_final, Y_final), (0, 0)) <= R`: Attacker top remains inside and enters "castigo" [gap-fill]. - If `d((X_final, Y_final), (0, 0)) > R`: Attacker top safely exits and returns to attacker's hand. R6. Turn passes to the other agent. R7. Win condition: First agent to reach 5 points, or the agent with higher points after 10 rounds, wins. ## Edge cases - Tie at the end condition: If tied at round 10, sudden-death single-throw rounds continue until one agent scores. - A player with no legal move: If an agent has their top in "castigo", they must skip their attacking turn until their top is freed or both tops are in castigo (in which case the ring resets to neutral) [gap-fill]. - Repetition / cycles: Bounded by the 10-round match limit. - Simultaneous claims on the same resource or position: Throws are strictly sequential. - Player elimination mid-round: If an agent disconnects, active agent wins by default. - Resource exhaustion (pieces, tokens, space, time): Hard round limit of 10 rounds guarantees bounded runtime. - Termination guarantee: Strict 10-round horizon ensures finite execution. ## State representation - Persistent state: `scores: [int, int]`, `round: int (1..10)`. - Per-round ephemeral state: `tops_in_castigo: Set`, `top_positions: [(float, float)]`, `active_agent: int`. - Minimal observable information: Fully observable public state. ## Action space - `launch(strategy: Enum, x_aim: float, y_aim: float)`: where `strategy in {DIRECT, SAFE}`, `(x_aim, y_aim)` within ring bounds. ## Playability notes - Single-player-vs-AI: Engine-ready. AI balances high-risk direct strikes against ring-exit probabilities. - Group games (n>4): Generalizes by supporting multiple punished tops inside the ring. - Physical-skill games: Physical string winding and throwing torque mapped to launch strategy accuracy curves. - What is lost in the adaptation: The tactile craft of winding string and custom top balance nuances. ## Implementation hints Simple 2D coordinate calculations and circular threshold checks. Suggested milestone 1: Implement the landing collision resolver and ring-exit distance check.

Download as JSON

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

Download JSON
Cite this page

Portuguese Spinning Top / Nicar o Pião (Portugal). (n.d.). Games of Countries. https://gamesofcountries.com/games/pt-portugal/jogo-do-piao

@misc{gamesofcountries-pt-portugal-jogo-do-piao,
  title = {Portuguese Spinning Top / Nicar o Pião (Portugal)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/pt-portugal/jogo-do-piao}
}