Formal Specification
Tile Ranking Card Game — Formal Specification
Macau · tile · Confidence: medium
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 3
# Pái jiǔ — AI-optimized specification
## General idea
A tile-division gambling game where each player receives 4 tiles from a 32-tile Chinese domino set and must split them into two pairs. Both pairs must outrank the dealer's corresponding pairs to win. The strategic depth lies in optimal tile division given the complex ranking hierarchy.
## Formal model
- **Abstraction taken:** None; the 32-tile set and ranking hierarchy are directly encodable.
- **Player/agent count:** 1 dealer agent + 2–7 player agents.
- **Turn model:** Simultaneous tile division → sequential comparison against dealer.
## Formal rules
R1. Setup: Shuffle 32 tiles. Deal 4 tiles to each of up to 7 players and the dealer.
R2. Each player divides their 4 tiles into a high hand (2 tiles) and low hand (2 tiles).
R3. Tile pair ranking hierarchy (descending): Supreme pairs (Gee Joon: [1-2] + [2-4]) > 16 named matched pairs > unmatched pairs ranked by pip sum mod 10.
R4. Comparison: Player's high hand vs dealer's high hand, player's low hand vs dealer's low hand.
R5. Both win → player wins (payout 1:1 minus 5% commission). One win one loss → push. Both lose → player loses.
R6. Exact ties → dealer wins.
R7. [gap-fill] Dealer arranges tiles according to a fixed "house way" algorithm (deterministic optimal strategy for the dealer position).
R8. [gap-fill] Maximum 50 rounds per session or until bankroll exhaustion.
R9. [gap-fill] Minimum bet enforced; players below minimum sit out.
## Edge cases
- **Tie at the end condition:** Individual round ties (push) return the bet; exact ranking ties favor dealer (R6).
- **A player with no legal move:** A player always has at least one valid tile division (C(4,2) = 3 possible splits).
- **Repetition / cycles:** Rounds are independent; no cycles.
- **Simultaneous claims on the same resource or position:** Players don't compete for tiles; each receives their own 4.
- **Player elimination mid-round:** Bankrupt players exit; game continues.
- **Resource exhaustion:** 32 tiles support up to 8 hands (7 players + dealer). Bankrolls are finite.
- **Termination guarantee:** Guaranteed by round cap or bankroll depletion.
## State representation
- **Persistent state:** `bankroll[player_id]`, `round_number`.
- **Per-turn state:** `hand[player_id]` (4 tiles), `high_pair[player_id]`, `low_pair[player_id]`, `result`.
- **Observable information:** Each player sees only their own tiles until showdown; dealer tiles revealed at comparison.
## Action space
- `divide_hand(tile_pair_1, tile_pair_2)`: Choose one of 3 possible splits of 4 tiles into two pairs.
## Playability notes
- **Single-player-vs-AI:** Natural; 1 player vs. dealer.
- **Group games (n>4):** Already supports up to 7 players; no adaptation needed.
- **Physical-skill games:** No physical skill; pure strategy and probability.
- **What is lost:** The social dynamics of multi-player table interaction.
## Implementation hints
The main complexity is encoding the 32-tile ranking hierarchy (a fixed lookup table). Each round has only 3 possible splits per player, making the decision tree small. Optimal strategy can be precomputed.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Tile Ranking Card Game (Macau). (n.d.). Games of Countries. https://gamesofcountries.com/games/mo-macau/pai-gow
@misc{gamesofcountries-mo-macau-pai-gow,
title = {Tile Ranking Card Game (Macau)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/mo-macau/pai-gow}
}