Formal Specification
Lao Wooden Peg Top — Formal Specification
Laos · top-spinning · Confidence: high
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: probabilistic-proxyGap-fills: 4
# Mak Khang — AI-optimized specification
## General idea
Mak Khang is a traditional Lao peg top spinning game played with hand-carved wooden tops fitted with iron nail tips. The formal specification models the primary competitive discipline: the Ring Battle (*Ti Mak Khang*). Players first execute a synchronized preliminary spin; the player whose top stops spinning first is designated the defending target ("the egg" / *mak khai*) and placed stationary inside a 2-meter boundary circle. Attackers then take turns launching high-velocity spinning tops from the perimeter to strike the target out of the circle while keeping their own top spinning inside.
## Formal model
- **Abstraction taken:** Continuous angular momentum, gyro-precession, aerodynamic friction, and rigid-body impact collisions are abstracted into a 2D circle coordinate space with stochastic spin-duration and collision-displacement resolvers.
- **Player/agent count:** 2 to 6 agents ().
- **Turn model:** Phase 1 (Simultaneous synchronized preliminary spin); Phase 2 (Sequential attacking turns around the ring) [gap-fill].
## Formal rules
R1. Setup & Circle Geometry:
- A circular ring of radius meter (2.0 m diameter) centered at is defined on a 2D plane.
- Match points: Each player begins with score ; target winning score points [gap-fill: standard 5-point match].
R2. Phase 1 — Preliminary Qualifying Spin:
- All agents simultaneously execute `spin_launch(power, balance)`.
- Spin duration for top : .
- Upright landing check: . If a top lands on its side, .
- The agent with the minimum spin duration is designated the initial Defender ().
- Defender's top is placed stationary at the ring center as the target.
R3. Phase 2 — Ring Attack Phase:
- Remaining agents (Attackers) take turns in order of decreasing preliminary spin time ().
- An attacking agent executes `strike_launch(target_aim, force)`.
- Attacker's top landing position and trajectory are sampled.
R4. Collision & Knockout Resolution:
- Hit check: .
- If hit occurs:
- Target top displacement .
- Attacking top rebound .
- If target displacement places it outside the ring (): Target is `KNOCKED_OUT`. Attacker gains point.
- Attacking top spin check: Attacker's top must maintain active spin () inside the ring to validate the point.
- If attacker misses entirely, fails to spin, or stops spinning inside the ring: Attacker's top also becomes a stationary target inside the circle [gap-fill].
R5. Round Conclusion:
- The round ends when all target tops are knocked out of the ring, or when all attackers have launched.
- If a player reaches 5 points, they win the game. Otherwise, a new round begins from Phase 1.
## Edge cases
- **Tie at the end condition:** If multiple players reach 5 points in the same round, a sudden-death Phase 1 endurance spin determines the champion (longest single spin wins) [gap-fill].
- **A player with no legal move:** Not applicable; all active attackers have a mandatory strike action on their turn.
- **Repetition / cycles:** Bounded because each round consists of at most attack attempts, and points accumulate monotonically toward the 5-point threshold.
- **Simultaneous claims on the same resource or position:** In Phase 2, attack turns are strictly sequential; two tops cannot be launched at the exact same millisecond.
- **Player elimination mid-round; turn order repair:** Attackers whose tops fail and become stationary targets lose their remaining attack turns for that round; turn passes to the next active attacker.
- **Resource exhaustion:** Tops are persistent and reusable across all rounds.
- **Termination guarantee: why the game provably ends:** Each round contains at most discrete actions, and non-zero hit/knockout probabilities guarantee point accrual and game termination within a finite number of rounds.
## State representation
- Persistent state: Player cumulative scores , match round index, active player role map (Defender vs. Attackers).
- Per-round ephemeral state: Target top coordinates , active target status, remaining attacker queue.
- Observable information: Fully observable — all top coordinates, ring boundary, scores, and turn sequence are public knowledge.
## Action space
- `spin_launch(power, balance)`: Execute baseline spin for Phase 1 qualifying.
- `strike_launch(target_aim, force)`: Launch spinning top from perimeter to strike target in Phase 2.
## Playability notes
- Single-player-vs-AI: Highly playable as an arcade physics and tactical betting game, choosing whether to play safe endurance spins or high-force knockout attacks.
- Group games (n>4): Supports 3 to 6 players naturally in a king-of-the-hill / knockout battle format.
- Physical-skill games: String wrapping tension, arm whip velocity, and snap release are abstracted into force vectors and accuracy parameters.
- What is lost in the adaptation: The tactile craft of filing iron nail tips, balancing guava wood grain, and the physical ring clatter.
## Implementation hints
Model the ring as a 2D Cartesian plane with a circle of radius 1.0. Represent collisions with 2D elastic impact equations damped by friction. Milestone 1: Implement Phase 1 qualification sort and stationary target placement; Milestone 2: Implement Phase 2 launch vector collision and boundary exit checks.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Lao Wooden Peg Top (Laos). (n.d.). Games of Countries. https://gamesofcountries.com/games/la-laos/mak-khang
@misc{gamesofcountries-la-laos-mak-khang,
title = {Lao Wooden Peg Top (Laos)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/la-laos/mak-khang}
}