DEV Community

niixolabs
niixolabs

Posted on

We calibrated a mahjong dangerous-tile predictor on 4.97M real discards

The problem

At a real mahjong table, there's a specific pause that happens when you're holding a tile you can't commit to throwing. The discard wall has information — what's been pushed out early, what's been held back — but reading it quickly under pressure is genuinely hard.

OkkanaiPai is the tool Niixo Labs built for that pause. It doesn't teach mahjong or explain theory. It just shows which tiles are dangerous right now, given the discards already visible on the table.

How the interaction works

Tap in the discards you can see, swipe between the four seats, and the app color-codes all 34 tiles by danger level in real time. The design is meant to fit the table: fast input, glanceable output, no account, no network.

The calibration data

The underlying stats come from 4.97M discards across 16 days of Tenhou's Houou-takujo — the top-rated tables on Japan's largest online mahjong platform. We calibrated against those logs and landed at AUC 0.83. Not a perfect oracle, but it puts a statistical baseline under a decision that otherwise runs purely on feel.

We didn't ship a live ML model. The calibrated Tenhou coefficients live in a JSON file bundled with the app — inference is instant, offline, and needs no server. The tradeoff: the model reflects aggregate Houou-takujo behavior, not the tendencies of whoever's sitting across from you right now.

What it doesn't cover

Honest limitations: hardcoded for East round / East seat, meld efficiency isn't modeled, and 3-player (sanma) isn't supported. If you play standard 4-player riichi mahjong and want a safety check on discards, it should be useful. If you need full riichi coverage or sanma support, it's not there yet.

Free, no ads, no in-app purchases, no network required. iOS 17+.

https://apps.apple.com/jp/app/id6762544982

Top comments (0)