Skip to main content
Formal Specification

Art and Folk Card Game of Bài Chòi — Formal Specification

Vietnam · card · Confidence: high

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 4
# Bài Chòi — AI-optimized specification ## General idea Bài Chòi is a communal lottery and pattern-matching card game from Central Vietnam where players occupy individual watchtower huts and hold wooden paddles inscribed with three distinct folk card names. A central caller draws sticks without replacement from a 30-card traditional deck and chants poetic riddles, and players match drawn items against their held hands. The first player to match all three cards on their paddle achieves "Tới" (victory). ## Formal model - **Abstraction taken:** The musical performance and poetic riddle improvisation (*hô thai*) are abstracted to discrete string/ID reveals from a randomized draw pool; the card-matching, token-awarding, and victory mechanics are modeled directly. - **Player/agent count:** 9 to 11 player agents (each representing a hut/paddle), plus 1 host/caller engine. - **Turn model:** Sequential draw rounds driven by the host; simultaneous response/claim phase for player agents holding matching cards. ## Formal rules R1. Setup: - The deck consists of 30 unique card identifiers (divided into three suits: *Văn*, *Vạn*, *Sách*, 10 ranks each). - A central draw pool container D is initialized with all 30 unique card tokens. - Each player agent i∈{1,…,N} (N∈[9,11]) is dealt a hand Hi⊂D of exactly 3 distinct cards uniformly at random [gap-fill: hand generation ensures no duplicate cards within a single hand; multiple players may hold overlapping cards across different hands]. - Each player starts with a matched flag counter Fi=0. R2. Draw and Chant Phase: - On each round, the host draws one card token c∗ uniformly at random from the remaining draw pool D without replacement: D←D∖{c∗}. - The drawn card c∗ is broadcast to all player agents. R3. Claim and Verification: - Every player agent i checks if c∗∈Hi. - If c∗∈Hi, player i automatically registers a claim (`strike_clapper`), incrementing their flag count: Fi←Fi+1. - The host validates that c∗ indeed exists in Hi. R4. Victory Condition: - If any player agent reaches Fi=3, that agent triggers `claim_toi()` and wins the game immediately. - The game halts upon the first round in which one or more agents reach Fi=3. R5. [gap-fill] Simultaneous Victory Resolution: - If multiple player agents reach Fi=3 on the exact same card draw c∗, the tie is resolved as a joint victory (shared prize), or broken by a single tie-breaker sudden-death draw where the first tied agent whose remaining undrawn card appears wins. R6. [gap-fill] Round Limit and Stalemate Resolution: - If the draw pool D becomes empty before any player achieves Fi=3, the agent(s) with the highest score Fi win; if tied, the game is declared a draw. ## Edge cases - Tie at the end condition: Covered by R5; simultaneous claims on the third card share the victory or resolve via sudden-death draw. - A player with no legal move: Not applicable; matching is reactive and automatic upon receipt of broadcast c∗. - Repetition / cycles: Impossible because cards are drawn strictly without replacement from a finite pool of 30 cards. - Simultaneous claims on the same resource or position: When a drawn card c∗ appears in multiple players' hands, all eligible players simultaneously receive +1 flag; there is no exclusivity on intermediate flags. - Player elimination mid-round; turn order repair: No player is eliminated mid-round; all agents remain active until a win condition is achieved. - Resource exhaustion: The draw pool contains 30 cards; bounded by at most 30 draw steps. Handled by R6 if no player reaches 3 flags before exhaustion. - Termination guarantee: why the game provably ends: The draw pool decreases by 1 card per round |Dt+1|=|Dt|−1. The game must terminate in at most 30 rounds. ## State representation - Persistent state: - `draw_pool`: set of remaining card IDs (initially size 30). - `drawn_history`: ordered list of revealed card IDs. - `player_hands`: array of size N, each containing a set of 3 card IDs. - `player_flags`: array of size N, integers in range [0,3]. - `game_status`: enum `{SETUP, IN_PROGRESS, FINISHED}`. - `winners`: list of winning player IDs. - Per-round ephemeral state: - `current_drawn_card`: card ID drawn in current round. - `round_claimants`: list of player IDs claiming the match. - Observable information: - Public: `drawn_history`, `current_drawn_card`, `player_flags` for all players, number of remaining cards in `draw_pool`. - Private: `player_hands[i]` is privately known to player i until confirmed by claims [gap-fill: in traditional open festival play, paddles are publicly visible, so full information is also valid]. ## Action space - `host_draw()`: Draws next card c∗ from D (host agent only). - `claim_match(card_id)`: Player asserts holding c∗ to gain +1 flag. - `claim_toi()`: Player asserts victory upon reaching 3 flags. ## Playability notes - Single-player-vs-AI: Natural; 1 human player occupying 1 hut against N−1 AI huts and an automated dealer. - Group games (n>4): The standard game natively supports 9 to 11 players. To reduce to a 2-agent form, deal 3 cards each to 2 agents from the 30-card deck; the race dynamic is preserved identically. - Physical-skill games: Not applicable; pure lottery and pattern matching. - What is lost in the adaptation: The rich oral poetry, musical improvisation, theatrical humor, and festive call-and-response ambiance of the master singer (*Anh/Chị Hiệu*) are entirely abstracted away. ## Implementation hints - Very low computational complexity (O(1) state update per draw). - Represent deck as an array of integer IDs 0..29. - Suggested first milestone: Implement the 30-card draw loop with 10 simulated agents holding 3 cards, verifying termination within ≤30 rounds.

Download as JSON

Download the full game corpus entry for this game as structured JSON.

Download JSON
Cite this page

Art and Folk Card Game of Bài Chòi (Vietnam). (n.d.). Games of Countries. https://gamesofcountries.com/games/vn-vietnam/bai-choi

@misc{gamesofcountries-vn-vietnam-bai-choi,
  title = {Art and Folk Card Game of Bài Chòi (Vietnam)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/vn-vietnam/bai-choi}
}