Formal Specification
Sword and Ball / Cup-and-Ball — Formal Specification
Japan · dexterity-small · Confidence: low
← Back to game pageImplementation Suitability
Suitability: adaptation-requiredFidelity: probabilistic-proxyGap-fills: 3
# Kendama — AI-optimized specification
## General idea
A traditional wooden cup-and-ball dexterity skill game. Players manipulate a handled cross with three cups and a pointed spike (*ken*) connected by string to a holed wooden ball (*tama*). In competitive head-to-head match play, players alternate challenging each other with increasingly difficult catching, balancing, and aerial flipping tricks.
## Formal model
- **Abstraction taken:** The continuous physics of string trajectory, ball rotation, cup cushioning, and spike impalement are abstracted into a discrete trick execution contest. The decision space consists of trick selection from an official difficulty ladder, resolved via `P(success) = f(trick_difficulty, player_skill)`.
- **Player/agent count:** 1 player (solo Kyū/Dan ranking trial) or 2 players (1v1 trick battle match).
- **Turn model:** Sequential alternating challenger-defender turns.
## Formal rules
R1. Trick catalog: 10 standardized tricks with discrete difficulty ratings `D in [1..10]`:
- 1: *Ōzara* (Big Cup, D=1)
- 2: *Kozara* (Small Cup, D=2)
- 3: *Chūzara* (Base Cup, D=3)
- 4: *Rōsoku* (Candle Grip, D=4)
- 5: *Tomeken* (Pull-up Spike, D=5)
- 6: *Hikōki* (Airplane, D=6)
- 7: *Furiken* (Swing Spike, D=7)
- 8: *Nihon Isshū* (Around Japan, D=8)
- 9: *Sekai Isshū* (Around the World, D=9)
- 10: *Tōdai* (Lighthouse Balance, D=10)
R2. Match setup: Two players start at 0 points. Match target is 3 points. Player A is designated initial Challenger.
R3. Challenge Phase:
- The Challenger selects trick `T` from the catalog and executes an attempt.
- Success probability: `P(success) = clamp(skill_challenger - 0.07 * D(T), 0.05, 0.95)`.
- If the Challenger fails: 0 points scored; the role of Challenger passes to the other player.
R4. Defense Phase:
- If the Challenger succeeds, the Defender must attempt the exact same trick `T`.
- If the Defender succeeds: Defense holds; 0 points scored; Challenger role passes to Defender.
- If the Defender fails: The Challenger scores 1 point (`score_challenger += 1`) and retains the Challenger role.
R5. Match victory: The first player to reach 3 points immediately wins the match.
R6. [gap-fill] Trick reuse restriction: A player cannot select the same trick consecutively if it was successfully matched in the immediately preceding round.
R7. [gap-fill] Match round cap: If neither player reaches 3 points within 20 total rounds, the match terminates, and the player with the higher point total wins.
R8. [gap-fill] Sudden-death tiebreaker: If points are tied at round 20, players execute a single attempt of *Tōdai* (D=10); successful execution (or higher roll) wins immediately.
## Edge cases
- **Tie at the end condition:** Bounded and resolved by sudden-death trick attempt (R8).
- **A player with no legal move:** Not applicable; all non-cooldown catalog tricks are available on every challenge turn.
- **Repetition / cycles:** Players can cycle between familiar safe tricks; bounded by R6 (trick cooldown) and R7 (20-round match limit).
- **Simultaneous claims on the same resource or position:** Not applicable; turns and trick executions are strictly sequential.
- **Player elimination mid-round:** Not applicable; strictly a 2-player match.
- **Resource exhaustion:** Equipment is permanent; match completes when score target is reached.
- **Termination guarantee:** Guaranteed by non-zero failure probability on every trick execution (`P(failure) >= 0.05`) and the 20-round match limit (R7).
## State representation
- **Persistent state:** `scores[2]` (ints in `[0..3]`), `challenger_id` (0 or 1), `round_count` (int in `[1..20]`), `last_trick_id` (int).
- **Per-turn state:** `active_trick` (trick definition), `phase` (CHALLENGE | DEFENSE).
- **Observable information:** Fully observable perfect-information game.
## Action space
- Challenger: `select_and_attempt_trick(trick_id: [1..10])`.
- Defender: `defend_trick()`.
## Playability notes
- **Single-player-vs-AI:** Highly natural; AI optimizes trick selection against estimated opponent skill weaknesses using minimax.
- **Group games (n>4):** Reduces cleanly to 1v1 battle brackets or group elimination trials (e.g. Moshikame endurance / trick ladder).
- **Physical-skill games:** 3D wrist snap, knee absorption, and ball eye alignment are abstracted into calibrated success probabilities.
- **What is lost in the adaptation:** Physical muscle memory, tactile wood-on-wood impact clack, and balance micro-adjustments.
## Implementation hints
Discrete state machine with stochastic trick success evaluator. 10 catalog entries. First milestone: implement 1v1 Challenger/Defender scoring loop with static skill probabilities and victory checks.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Kendama (Japan). (n.d.). Games of Countries. https://gamesofcountries.com/games/jp-japan/kendama
@misc{gamesofcountries-jp-japan-kendama,
title = {Kendama (Japan)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/jp-japan/kendama}
}