Formal Specification
Spinning Top — Formal Specification
Brazil · top-spinning · Confidence: high
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: probabilistic-proxyGap-fills: 4
# Pião — AI-optimized specification
## General idea
A cord-launched wooden top, played in three structurally different modes that share one launch mechanic: longest-spin duration, trick execution, and knock-out combat inside a drawn circle. Only the third mode is genuinely interactive; the first two are parallel solitaire scored against each other.
## Formal model
- **Abstraction taken:** the launch is a continuous physical act (cord tension, release angle, wrist snap) replaced by a small vector of launch parameters that maps to a spin-duration distribution and a landing point. Nothing rotational is simulated.
- **Player/agent count:** 2 or more, acting individually.
- **Turn model:** sequential launches in fixed order; in combat mode a launch resolves immediately against tops already spinning.
## Formal rules
R1. Each player has one pião and a cord. A turn is one `launch(aim, force, spin)`.
R2. A launch produces a spin duration drawn from a distribution parameterised by the launch vector and the player's skill, and a landing cell.
R3. [gap-fill] A launch is valid only if spin duration exceeds a minimum threshold; below it the launch is a failure and the turn is forfeit. The entry marks the minimum spin duration undocumented — the threshold exists in play but no source gives its value.
R4. **Duration mode:** all players launch, and the top spinning longest wins the round.
R5. **Trick mode:** the player attempts a declared manoeuvre; success is a probability check against manoeuvre difficulty. [gap-fill] The set of manoeuvres and their relative difficulty is not documented; treat the list as a configurable table.
R6. **Combat mode:** a launched pião that lands within a strike radius of a spinning opponent's pião topples it with probability `p_strike(force, distance)`. [gap-fill] No source gives a strike resolution rule; this is added purely to make the attested "knock the other top over" outcome computable.
R7. A toppled pião is out for the round. [gap-fill] Whether it is forfeited to the striker or merely eliminated varies by locality and is not documented; default to elimination without transfer.
R8. The round ends when one pião remains spinning (combat), when all have stopped (duration), or when every player has attempted the declared trick (trick mode).
## Edge cases
- **Tie at the end condition:** two tops stopping within the timing resolution are a genuine tie. Duration mode resolves it by re-launch; combat mode declares the round drawn with no elimination.
- **Player with no legal move:** a player whose pião is toppled has no move for the rest of the round, and is skipped rather than blocked.
- **Repetition / cycles:** launches are independent draws, so no state cycle exists. Repeated failed launches are bounded by R3 forfeiting the turn.
- **Simultaneous claims:** two piões cannot occupy one cell; if a launch lands on an occupied cell it is displaced to the nearest free cell, resolving in favour of the top already spinning.
- **Mid-round elimination:** the toppled player is dropped from the launch order for the remainder of the round; order is otherwise preserved.
- **Resource exhaustion:** spin duration is the exhausting resource, and it is consumed by the clock rather than by choices.
- **Termination guarantee:** every spin duration is finite and strictly decreasing in real time, so all tops stop; combat additionally removes tops monotonically. The round provably ends.
## State representation
Persistent: the drawn circle, its radius, the strike radius, the manoeuvre difficulty table.
Per-player: pião skill parameter, `in_round|toppled`, current cell, remaining spin ticks.
Per-turn ephemeral: the launch vector being resolved.
Information set: fully observable — all positions and remaining spins are visible to everyone.
## Action space
- `launch(aim_cell, force: float, spin: float)` — precondition: player is `in_round` and has not launched this round.
- `declare_manoeuvre(name)` — precondition: trick mode, before launching.
- `wind_cord()` — no effect on state; present because it is an attested step and an implementer may want it for pacing.
## Playability notes
- **Single-player-vs-AI:** works in duration and trick mode as a parameter-optimisation problem. Combat mode is the only one with a real opponent model.
- **Group games (n>2):** duration and trick modes are already parallel and scale to any n without change. Combat mode reduces to 1v1 duels cleanly, since a strike resolves against one target.
- **Physical-skill model:** two parameters — spin duration as a draw from a skill-conditioned distribution, and landing accuracy as spread around the aim cell.
- **What is lost:** everything the launch actually is. Cord winding, tension, and the release snap are the entire craft of the game among players, and they collapse into two numbers here.
## Implementation hints
Implement duration mode first — it needs only the launch distribution and a comparison, and it validates the skill model before any interaction is added. Then add combat, which reuses the same launch and adds one collision check. The representational trap is treating the three modes as one game; they share a launch and nothing else, so give them separate resolution paths.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Spinning Top (Brazil). (n.d.). Games of Countries. https://gamesofcountries.com/games/br-brazil/piao
@misc{gamesofcountries-br-brazil-piao,
title = {Spinning Top (Brazil)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/br-brazil/piao}
}