Formal Specification
Button Counting Game — Formal Specification
Macau · gambling-stake · Confidence: medium
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 2
# Fān tān — AI-optimized specification
## General idea
A pure-chance gambling game where bettors predict the remainder of an unknown count of objects divided by 4. The game has zero strategic depth for the bettor (each outcome is equally likely at ~25%), but the betting structure and commission system create a defined mathematical environment suitable for simulation and probability analysis.
## Formal model
- **Abstraction taken:** None needed; the physical counting process is equivalent to sampling uniformly from {1, 2, 3, 4}.
- **Player/agent count:** 1 environment agent (dealer) + N bettor agents.
- **Turn model:** Simultaneous betting phase → single environment resolution → payout.
## Formal rules
R1. Setup: Each bettor starts with a bankroll B. The table has 4 primary bet zones {1, 2, 3, 4}, combination zones {1-2, 2-3, 3-4, 4-1}, and corner zones {1-2-3, 2-3-4, 3-4-1, 4-1-2}.
R2. **Betting phase:** Each bettor simultaneously places wagers on any combination of zones. Total bet must be ≥ table minimum.
R3. **Resolution:** The dealer samples a uniform random integer R ∈ {1, 2, 3, 4}.
R4. **Payouts:**
- Single number hit: pays 1:3 minus 5% commission (net payout = bet × 2.85).
- Two-number combination hit: pays 1:1 minus 5% commission (net payout = bet × 0.95).
- Three-number corner hit: pays 1:0.33 minus 5% commission (net payout = bet × 0.3135).
R5. Losing bets are forfeited.
R6. [gap-fill] Session ends after a fixed number of rounds or when a bettor's bankroll reaches 0.
R7. [gap-fill] Maximum bet per zone capped at 100× table minimum.
## Edge cases
- **Tie at the end condition:** Not applicable; each round has a single outcome.
- **A player with no legal move:** A bettor with bankroll < table minimum cannot bet and sits out.
- **Repetition / cycles:** Each round is independent; no cycles possible.
- **Simultaneous claims on the same resource or position:** Multiple bettors can bet the same zone; payouts are independent.
- **Player elimination mid-round:** Bankrupt bettors exit; game continues with remaining bettors.
- **Resource exhaustion:** Bankroll depletion eliminates a bettor; the house has unlimited bankroll.
- **Termination guarantee:** Guaranteed by finite bankrolls and/or round cap (R6).
## State representation
- **Persistent state:** `bankroll[bettor_id]`, `round_number`, `cumulative_profit[bettor_id]`.
- **Per-turn state:** `bets[bettor_id][zone]`, `result` ∈ {1,2,3,4}.
- **Observable information:** Fully observable; all bets and results are public.
## Action space
- `place_bet(zone, amount)`: Place a wager on a zone. Multiple bets per round allowed.
## Playability notes
- **Single-player-vs-AI:** Natural; single bettor vs. house environment.
- **Group games (n>4):** Scales naturally; bettors are independent.
- **Physical-skill games:** No physical skill involved.
- **What is lost:** The atmospheric tension of the physical counting ritual.
## Implementation hints
Trivially simple: random number generator + payout calculator. Interesting mainly for bankroll management strategy analysis and commission impact modeling. Expected value is negative for all bet types due to the 5% commission.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Button Counting Game (Macau). (n.d.). Games of Countries. https://gamesofcountries.com/games/mo-macau/fan-tan
@misc{gamesofcountries-mo-macau-fan-tan,
title = {Button Counting Game (Macau)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/mo-macau/fan-tan}
}