Formal Specification
Flower Cards — "Come On! — Formal Specification
Japan · card · Confidence: high
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 3
# Hanafuda Koi-Koi — AI-optimized specification
## General idea
A two-player card fishing and push-your-luck game played with a 48-card deck across 12 floral monthly suits. Players match cards from hand and draw pile to capture point cards, assembling classical Japanese melds (*yaku*). Completing a meld forces a critical strategic choice: stop play to bank guaranteed points (*Shōbu*), or call *"Koi-Koi!"* to continue hunting for higher rewards at the risk of scoring zero if the opponent completes a meld first.
## Formal model
- **Abstraction taken:** None required; the card distribution, matching mechanics, meld scoring, and push-your-luck decision tree are directly formalized.
- **Player/agent count:** 2 players (Dealer / *Oya* and Non-dealer / *Ko*).
- **Turn model:** Sequential alternating turns across 8 card plays per player per round, spanning a match of 6 or 12 rounds.
## Formal rules
R1. Deck structure: 48 cards divided into 12 botanical suits of 4 cards each. Card values: 5 Brights (20 pts), 9 Animals/Objects (10 pts), 10 Ribbons (5 pts), and 24 Plains/Chaff (1 pt).
R2. Deal: Each player is dealt 8 cards face-down into their private hand; 8 cards are dealt face-up to the central field; the remaining 32 cards form the face-down draw stock.
R3. Turn sequence:
- Step 1 (Hand play): The active player plays 1 card from hand to the field. If its month matches a field card, both cards are captured. If it matches 3 cards of the same month, all 4 cards are captured. If it matches nothing, it remains face-up in the field.
- Step 2 (Stock play): The top card of the draw stock is revealed. Matching follows the same rule as Step 1.
- Step 3 (Collection): All captured cards are moved to the player's face-up collection zone.
R4. Scoring Melds (*Yaku*):
- *Gokō* (5 Brights: 10 pts), *Shikō* (4 Brights without Rainman: 8 pts), *Ame-Shikō* (4 Brights with Rainman: 7 pts), *Sankō* (3 Brights without Rainman: 5 pts).
- *Akatan* (3 Red Poetry Ribbons: 5 pts + 1 pt/extra ribbon), *Aotan* (3 Blue Ribbons: 5 pts + 1 pt/extra ribbon), *Tanzaku* (Any 5 Ribbons: 1 pt + 1 pt/extra ribbon).
- *Ino-Shika-Chō* (Boar-Deer-Butterfly: 5 pts + 1 pt/extra animal), *Tane* (Any 5 Animals: 1 pt + 1 pt/extra animal).
- *Hanami-zake* (Curtain + Sake Cup: 5 pts), *Tsukimi-zake* (Moon + Sake Cup: 5 pts).
- *Kasu* (Any 10 Plain cards: 1 pt + 1 pt/extra plain).
R5. Koi-Koi Decision:
- The moment a player's collection forms a new *yaku* (or increases the point value of an existing *yaku*), that player must choose either `CALL_SHOBU` or `CALL_KOI_KOI`.
- If `CALL_SHOBU`: The round terminates immediately. The declaring player scores points for all their completed *yaku*. If total points >= 7, round score is doubled (x2). Opponent scores 0 points.
- If `CALL_KOI_KOI`: Play continues. The player cannot stop until they form a new *yaku* or add points to existing melds.
R6. Opponent Counter-Score: If Player A called Koi-Koi and Player B subsequently completes any *yaku* and calls `CALL_SHOBU`, Player B scores their points, and Player A receives 0 points.
R7. Round Exhaustion (*Ryōkyoku*): If all 8 hand cards are played and neither player calls `CALL_SHOBU` on the final turn, the round ends in a draw, and neither player scores points.
R8. Match End: Played over 12 rounds (months). The player with the highest cumulative point total at the end of round 12 wins the match.
R9. [gap-fill] Instant win hand declarations: If a player is dealt 4 cards of the same month (*Teshi*) or 4 pairs (*Kuttsuki*), they declare immediately for a 6-point round victory.
R10. [gap-fill] Match tiebreaker: If scores are tied after 12 rounds, the match plays a single 13th sudden-death round with the last round's winner dealing.
R11. [gap-fill] Ambiguous match choice: When a played card matches 2 different single cards of the same month on the field, the player explicitly selects which single card to pair with.
## Edge cases
- **Tie at the end condition:** Bounded by R10 (13th sudden-death month).
- **A player with no legal move:** Not applicable; a player must play 1 card from hand on each turn regardless of whether a match exists on the field.
- **Repetition / cycles:** Impossible; hands and draw pile strictly decrease by 1 card per turn.
- **Simultaneous claims on the same resource or position:** Sequential turns prevent simultaneous claims; field matches are claimed strictly by the active player.
- **Player elimination mid-round:** Not applicable (standard 2-player match lasting full 8 turns per round).
- **Resource exhaustion:** Exactly 8 turns per player per round exhausts both hands and draw stock.
- **Termination guarantee:** Guaranteed by strict card consumption (exactly 16 total player turns per round) and fixed 12-round match length.
## State representation
- **Persistent state:** `round_scores` (array of 2 ints), `current_round` (1..12), `dealer_id` (0 or 1).
- **Per-round state:** `hands[2]` (sets of cards), `field` (list of cards), `stock` (list of 32 cards), `captured[2]` (lists of captured cards), `koi_koi_active[2]` (booleans), `current_turn` (0..15).
- **Observable information:** Imperfect information: Opponent hand and face-down stock are hidden; field, discarded cards, captured cards, and current melds are common knowledge.
## Action space
- `play_card(card_id, target_field_card_id)`: Select card from hand and target matching field card (if multiple candidates exist).
- `declare_meld_action(CALL_SHOBU | CALL_KOI_KOI)`: Triggered only when a new/expanded meld is achieved.
## Playability notes
- **Single-player-vs-AI:** Highly engine-ready; ideal domain for Information-Set MCTS (ISMCTS) or Counterfactual Regret Minimization (CFR).
- **Group games (n>4):** Strictly a 2-player game; 3-player variant (*Hana-awase*) requires different card distribution and bidding structures.
- **Physical-skill games:** Not applicable (pure card strategy and probability).
- **What is lost in the adaptation:** The physical tactile pleasure of snapping thick mulberry cards onto tatami.
## Implementation hints
Discrete state space. 48 cards with clear bitmask representations for suits and types. Branching factor is at most 8 card choices, and at most 2 choices on meld completion. First milestone: implement deck deal, field matching, and full yaku evaluation logic.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Hanafuda Koi-Koi (Japan). (n.d.). Games of Countries. https://gamesofcountries.com/games/jp-japan/hanafuda-koi-koi
@misc{gamesofcountries-jp-japan-hanafuda-koi-koi,
title = {Hanafuda Koi-Koi (Japan)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/jp-japan/hanafuda-koi-koi}
}