Learn Mode Reference · Riichi Mahjong · v1.0

Riichi Learn

The teaching reference behind the Hunky Dory Riichi trainer: the complete yaku glossary (every scoring pattern, closed/open han values), how the discard-hint engine thinks, and the post-hand explainer (scoring math + strategic feedback). Standard Japanese rules; ruleset-dependent points are flagged inline and collected at the end of each section.

1 · Yaku Glossary

durable teaching content

Every hand needs at least one yaku (scoring pattern) to win — dora alone never qualify. Han values are shown as closed / open. “Closed only” means the yaku disappears if you have called chi, pon, or open kan (a closed kan keeps the hand closed). Example hands show the completed 14 tiles grouped into sets; the winning tile is outlined where it matters.

Ruleset-dependent points to confirm for the app

  • Kuitan (open tanyao): allowed in nearly all modern rules (Tenhou, M-League); some older/house rules forbid it.
  • Double yakuman: many rules pay double for kokushi 13-sided wait, suuankou tanki, junsei chuuren (pure 9-wait), and daisuushii. Others pay single for everything.
  • Kazoe yakuman: 13+ han counted as yakuman in Tenhou-style rules; some rules cap at sanbaiman.
  • Chankan vs kokushi: most rules let kokushi rob a closed kan; regular hands can only rob an added kan.
  • Renhou (win on a discard before your first draw): varies — mangan, yakuman, or nothing. Not included above.
  • Nagashi mangan (all discards terminal/honor and never called at exhaustive draw): optional rule, commonly on.

Core concepts the vocabulary the app’s hints will use

2 · Hint Engine

pure logic — ports to Swift

Give the engine 14 tiles and it recommends a discard: the tile that minimizes shanten, tie-broken by ukeire (how many live tiles improve the hand), with a plain-English “why.” Give it 13 tiles and it reports shanten and acceptance. Notation: 123m man, 456p pin, 789s sou, 1z–7z = East South West North Haku Hatsu Chun.

How the engine works (algorithm notes for the Swift port)

Shanten = number of effective tile exchanges away from tenpai (0 = tenpai, −1 = complete). We compute it as the minimum over three hand shapes:

  1. Standard (4 sets + 1 pair): recursively decompose the 34-tile count array into complete sets (triplets/runs) and partial sets (pairs, adjacent or gapped tiles), enumerating every choice of head pair. With m sets, t partial sets (capped so m+t ≤ 4) and h ∈ {0,1} for the head: shanten = 8 − 2m − t − h.
  2. Chiitoitsu: 6 − pairs + max(0, 7 − kinds) (a 3rd/4th copy of a tile never helps).
  3. Kokushi: 13 − distinct terminals/honors − (1 if any of them is paired).

Ukeire (13 tiles): for each of the 34 kinds, add one copy — if shanten drops, the kind is “accepted”; its live count is 4 − copies already in hand. (The app should also subtract copies visible in discards/melds/dora indicators — pass that in as a second count array.)

Recommendation (14 tiles): try every distinct discard, score the remaining 13 by (shanten, then ukeire). Everything is pure functions on Int arrays — a direct Swift port ([Int] of length 34, recursion, no shared state).

loading…

3 · Post-Hand Explainer

scoring logic + feedback content

After a hand resolves, the app should answer three questions in plain English: what won (the yaku), how the number was reached (han + fu → base points → payments), and one thing to do differently. The scoring math below is computed live by the same pure functions the app will use.

How a score is built

Han come from yaku plus dora. Fu (minipoints) come from hand shape, rounded up to the nearest 10. Then base = fu × 2(2 + han), capped at 2,000 (mangan). A non-dealer ron pays base × 4, a dealer ron base × 6; on tsumo the same total is split (dealer pays a double share). Every payment rounds up to 100. Each honba counter adds 300 to a ron (100 from each player on tsumo), and riichi sticks on the table go to the winner.

Fu quick reference
Base (futei)20
Closed ron bonus (menzen kafu)+10
Tsumo (except pinfu)+2
Wait: kanchan / penchan / tanki+2
Wait: ryanmen / shanpon+0
Pair of dragons / seat / round wind+2
Open triplet — simples / terminal·honor2 / 4
Closed triplet — simples / terminal·honor4 / 8
Open kan — simples / terminal·honor8 / 16
Closed kan — simples / terminal·honor16 / 32
Chiitoitsu (flat, no rounding)25
Pinfu tsumo / pinfu ron20 / 30
Open hand, all-run shape, ron (convention)30
Limit hands (non-dealer / dealer)
Mangan — 5 han (or base caps at 2,000)8,00012,000
Haneman — 6–7 han12,00018,000
Baiman — 8–10 han16,00024,000
Sanbaiman — 11–12 han24,00036,000
Yakuman (kazoe at 13+ han — flag)32,00048,000

Note the classic near-misses: 4 han 30 fu = 7,700 and 3 han 60 fu = 7,700 — not mangan unless the table plays kiriage mangan (rounded-up mangan; flag below).

Ruleset-dependent points to confirm for the app

  • Kiriage mangan: rounds 4 han 30 fu and 3 han 60 fu up to mangan. Off in Tenhou, on in M-League.
  • Double-wind pair fu: a pair of a wind that is both seat and round wind is +2 in some rules, +4 in others.
  • Multiple ron: head bump (atamahane, closest player wins alone) vs. double/triple ron paid to all — varies.
  • Aka dora: red 5s (usually one per suit) are common in casual/Tenhou rules, absent in some traditional rules.