Formal Specification
Heaven and Nine (Chinese Dominoes) — Formal Specification
China · tile · Confidence: low
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 3
# Tian Jiu — AI-optimized specification
## General idea
A classical Chinese four-player trick-taking tile game played with a standardized 32-piece set of bone/wood dominoes divided into Civil (*Wenzi*) and Military (*Wuzi*) suits. Players receive 8 tiles each and contest exactly 8 tricks (*deng*), leading combinations of 1 to 4 tiles that opponents must beat with higher combinations of the identical suit and structure, or slough tiles face-down. Winning the final 8th trick (*Jiepai*) is the mandatory prerequisite to winning the hand, with scores evaluated against a 4-trick baseline.
## Formal model
- **Abstraction taken:** None required; complete discrete trick-taking tile logic with hidden imperfect information.
- **Player/agent count:** 4 players (1 Banker / *Zhuangjia* and 3 opposing Players).
- **Turn model:** Strictly sequential counter-clockwise trick-taking rounds across 8 tricks per deal.
## Formal rules
R1. Tile Set: 32 Chinese domino tiles:
- **Civil Suit (22 tiles, 11 paired types):** Heaven (6:6) ×2, Earth (1:1) ×2, Man (4:4) ×2, Goose/Harmony (1:3) ×2, Plum (5:5) ×2, Long Three (3:3) ×2, Bench (2:2) ×2, Hatchet (5:6) ×2, Red Ten (4:6) ×2, Long Seven (1:6) ×2, Short Six (1:5) ×2.
- **Military Suit (10 tiles, ranked by total pip count):** Nines (4:5, 3:6), Eights (2:6, 3:5), Sevens (2:5, 3:4), Six / Big Chick (2:4), Fives (1:4, 2:3), Three / Little Chick (1:2).
- **Supreme Pair (*Zhizun*):** The 1:2 and 2:4 tiles played together as a pair; outranks all other Military pairs.
R2. Deal: The 32 tiles are shuffled and dealt into 4 hands of 8 tiles each. The Banker (*Zhuangjia*) leads the first trick.
R3. Lead Structure: The active lead player may play a valid combination of 1, 2, 3, or 4 tiles:
- Single Civil / Single Military
- Civil Pair (*Wendui*) / Military Pair (*Wudui*) / Supreme Pair (*Zhizun*)
- Mixed Civil-Military Combination (*Wen-Wu He*, e.g. Heaven-Nine, Earth-Eight)
R4. Following and Sloughing (*Ge shi ge* / 跟牌与垫牌):
- In counter-clockwise order, each subsequent player must respond to the lead.
- To win the trick, a player must play a combination of the **exact same suit, structure, and tile count** of strictly higher rank.
- If unable or choosing not to beat the current highest play, the player must **slough** (*Dianpai*) an equal number of tiles face-down from their hand, permanently forfeiting the right to win that trick.
R5. Trick Resolution: The player who played the highest valid combination captures all played and sloughed tiles for that trick and leads the next trick.
R6. Hand Scoring & Final Trick (*Jiepai*):
- A player can only win the hand by capturing the **8th (final) trick** (*Jiepai*).
- If Player wins the 8th trick, their net score is:
(Each opponent pays or receives the difference relative to the 4-trick target).
- **Shutout Penalty (*Heideng* / 无磴):** If an opponent captures 0 tricks across the entire hand, their penalty payment is doubled.
R7. [gap-fill] Banker Continuation: If the Banker wins the 8th trick, they retain the Banker role (*Lianzhuang*); otherwise, Banker role passes counter-clockwise.
R8. [gap-fill] Four-Deuce Rule: If a player is dealt both the 1:2 and 2:4 tiles, they may declare *Zhizun* pair status on lead or in defense.
R9. [gap-fill] Match Target: A complete match consists of 4 full rounds (16 hands total); the player with the highest accumulated point tally wins the tournament.
## Edge cases
- **Tie at the end condition:** Trick ranks are strictly hierarchical with no ties possible for a given lead structure.
- **A player with no legal move:** A player always has the legal option to slough (*Dianpai*) matching the required tile count.
- **Repetition / cycles:** Fixed 8-trick structure consumes 8 tiles per player monotonically; no infinite cycles possible.
- **Simultaneous claims on the same resource or position:** Not applicable (strictly sequential counter-clockwise card plays).
- **Player elimination mid-round:** Not applicable; all 4 players participate across all 8 tricks.
- **Resource exhaustion:** Hand terminates deterministically when all 32 tiles are played (8 tricks).
- **Termination guarantee:** Provably terminates in exactly 8 tricks per hand.
## State representation
- **Persistent state:** `scores[0..3]`, `banker_seat (0..3)`, `hands_played (0..16)`.
- **Ephemeral state:** `private_hands[0..3]` (list of tiles), `tricks_won[0..3]`, `current_trick_index (1..8)`, `lead_combination`, `highest_play_in_trick`, `lead_player`.
- **Observable information:** Imperfect information. Each player observes their own private hand, public face-up plays, the number of tiles sloughed face-down by opponents, and trick capture totals.
## Action space
- `lead_trick(tiles_subset)`: Lead valid combination of 1..4 tiles.
- `follow_beat(tiles_subset)`: Play valid beating combination.
- `slough_tiles(tiles_subset)`: Discard tiles face-down.
## Playability notes
- **Single-player-vs-AI:** Highly suitable for imperfect-information AI algorithms (Information Set MCTS, Counterfactual Regret Minimization / CFR).
- **Group games (n>4):** Strictly a 4-player game; surplus players spectate and rotate in.
- **What is lost in the adaptation:** The physical weight and crisp acoustic slapping of bone dominoes on hardwood tables, card-peeking rituals, and subtle table psychology.
## Implementation hints
Tile representation: 32 distinct integer IDs with pre-computed lookup tables for Civil/Military suit classifications, pair rankings, and combination validity checks.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Heaven and Nine (Chinese Dominoes) (China). (n.d.). Games of Countries. https://gamesofcountries.com/games/cn-china/tian-jiu
@misc{gamesofcountries-cn-china-tian-jiu,
title = {Heaven and Nine (Chinese Dominoes) (China)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/cn-china/tian-jiu}
}