Formal Specification
Taiwanese Beanbag Toss (Five Beanbags) — Formal Specification
Taiwan · dexterity-small · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: probabilistic-proxyGap-fills: 3
# Diu Shabao — AI-optimized specification
## General idea
A traditional children's sequential dexterity game played with five fabric beanbags filled with dried beans or sand (*gán-tāu-pau*). Players advance through an escalating sequence of 7 coordination stages (picking up 1-by-1, 2-by-2, 3-then-1, all 4, chest-tapping, cave-flicking, and dorsal hand-catching) while keeping an airborne mother bag in flight, losing the turn on any dropped bag or illegal touch.
## Formal model
- **Abstraction taken:** Rapid hand-eye micro-movements, airborne bag flight time, and physical finger grasping are abstracted into a discrete stage-machine where each stage requires selecting a ground subset of bags to scoop, resolving success via a probability function of bag cluster distance, stage difficulty, and player dexterity.
- **Player/agent count:** 1 to 4 players.
- **Turn model:** Turn-based sequential attempts. A player continues progressing through stages until committing a fault; on subsequent turns, the player resumes from the failed stage.
## Formal rules
R1. **Materials & Stage Setup:**
- 5 beanbags: 1 "Mother Bag" and 4 "Ground Bags" .
- At the start of a stage, the ground bags are scattered on a 2D surface with coordinates .
R2. **Stage Progression Definitions ():**
- **Stage 1 (Singles):** 4 iterations. In each iteration, toss , scoop 1 bag from , and catch .
- **Stage 2 (Pairs):** 2 iterations. In each iteration, toss , scoop a chosen pair of bags in one sweep, and catch .
- **Stage 3 (Triplets):** 2 iterations. First toss scoops 3 bags simultaneously; second toss scoops the remaining 1 bag.
- **Stage 4 (Quadruplet):** 1 iteration. Place all 4 bags together; toss , scoop all 4 bags in a single sweep, and catch .
- **Stage 5 (Tap & Catch):** Toss , tap the table/chest, and catch .
- **Stage 6 (Cave Tunnel):** Form an arch with off-hand; toss , flick 1 bag through the arch, and catch . Repeat for all 4 bags.
- **Stage 7 (Back-of-Hand Catch & Score):** Toss all 5 bags; flip hand to catch bags on the dorsal hand surface (); toss the bags upward and catch in palm. Each caught bag awards 10 points.
R3. [gap-fill] **Scoop Success Probability Resolver:**
For an attempted grab of bag subset of size , let the spatial spread be .
- If the grab succeeds: Target bags are picked up, and mother bag catch resolves with .
- If the grab or catch fails: A fault is triggered.
R4. **Fault & Turn Passing:**
- Any dropped mother bag, failed scoop, or accidental displacement of non-target bags triggers a fault.
- Upon a fault, the active player's turn ends immediately.
- The player's stage progress is saved; on their next turn, they attempt stage from the beginning of that stage.
R5. [gap-fill] **Win Condition:** The first player to successfully complete Stage 7 and reach a target score (default 100 points) wins the match.
R6. [gap-fill] **Turn Limit Draw Guard:** If all players collectively take 50 turns without any player completing Stage 7, victory is awarded to the player at the highest stage, breaking ties by accumulated points.
## Edge cases
- **Tie at the end condition:** If two players complete Stage 7 on the same round of turns, the tie is broken by the player with the highest Stage 7 dorsal catch count; if still tied, a 1-turn Stage 7 sudden death is played.
- **A player with no legal move:** Active player always has the legal move corresponding to their current stage action.
- **Repetition / cycles:** Failing a stage repeatedly is bounded by the 50-turn cap (R6).
- **Simultaneous claims on the same resource or position:** Not applicable; turns are strictly sequential with separate bag sets or reset ground coordinates.
- **Player elimination mid-round:** Not applicable (non-elimination stage race).
- **Resource exhaustion:** Bags are reusable and conserved; stage progress is strictly monotonic per player.
- **Termination guarantee:** Guaranteed by finite stages (), positive success probability on each stage attempt, and the 50-turn cap.
## State representation
- **Persistent state:**
- `players`: list of `{id, current_stage, stage_substep, points, dexterity}`.
- `active_player_idx`: integer in .
- `total_turns_elapsed`: integer.
- **Per-turn ephemeral state:**
- `ground_bag_positions`: mapping from `bag_id` to .
- `held_bags`: list of `bag_id`.
- `mother_bag_status`: enum `[Held, Airborne, Caught, Dropped]`.
- **Observable information:** Fully observable 2D table coordinates and player stage trackers.
## Action space
- `scatter_bags()`: Initial random placement of ground bags.
- `attempt_scoop(target_bag_ids)`:
- *Preconditions:* Active player's turn, `target_bag_ids` matches stage requirements ().
- `attempt_cave_flick(target_bag_id)`: Action for Stage 6.
- `attempt_dorsal_catch()`: Action for Stage 7.
## Playability notes
- **Single-player-vs-AI:** Highly playable; an AI agent selects which subsets of bags to grab based on spatial clustering to maximize transition probability through each stage.
- **Group games (n>4):** Turn-based round-robin scales smoothly to 4 players without mechanical changes.
- **Physical-skill games:** Physical hand-eye reflex is formalized into cluster-dispersion geometry and dexterity-based probabilistic transitions.
- **What is lost in the adaptation:** Tactile fabric textures, floral scrap cloth visual charm, and rhythmic Hokkien rhyming cadences.
## Implementation hints
- Represent each stage as a state-machine transition node.
- The spatial cluster diameter is computed in trivial time ().
- Suggested first milestone: Implement single-player 7-stage state machine with scatter geometry and probabilistic stage advancement.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Taiwanese Beanbag Toss (Five Beanbags) (Taiwan). (n.d.). Games of Countries. https://gamesofcountries.com/games/tw-taiwan/diu-shabao
@misc{gamesofcountries-tw-taiwan-diu-shabao,
title = {Taiwanese Beanbag Toss (Five Beanbags) (Taiwan)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/tw-taiwan/diu-shabao}
}