DEV Community

niixolabs
niixolabs

Posted on

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

The problem

At a real mahjong table, software can't help you mid-hand. The question — "is this tile safe to discard?" — comes up every few turns, and you work it out from memory and pattern recognition alone.

We wanted something you could set next to you at the table, pick up in a second, and put down without disrupting the game.

What OkkanaiPai does

Three interactions:

  1. Swipe to select the player you want to read
  2. Tap their discarded tiles to enter them
  3. See all 34 tiles color-coded by danger level

The whole flow is designed to be glanceable — you're not staring at a screen mid-game.

The model behind it

We didn't ship a live inference model. Instead, we calibrated a rule-based system against 4.97 million discards from Tenhou's Houou-takujo server (the top competitive tier), covering 16 days of logged play.

The result is a set of coefficients stored as JSON inside the app. AUC on held-out data came to 0.83. Not perfect, but statistically meaningful for a glance-level judgment call at the table. Everything runs fully offline — no network request, no account, no subscription.

What it doesn't cover

Being upfront about scope:

  • Calibration is East-round / East-seat data. Accuracy may degrade in South-round play.
  • Meld efficiency — how chii, pon, or kan reshapes hand danger — is not modeled.
  • Three-player mahjong (sanma) is not supported.

For standard 4-player East-focused games, it fits. Outside that, weight the output accordingly.

Why build it

Niixo Labs is running a sprint: small, focused iOS tools, shipped fast. OkkanaiPai explores what "calibrated statistics as UX" looks like in a game-assistance context — where a lightweight, offline coefficient table can deliver meaningful signal without any server infrastructure. Free, no ads, no IAP.

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

Top comments (0)