TanyaoDojo β Mahjong AI checkpoints
JAX/Flax checkpoints from TanyaoDojo, a
from-scratch mahjong AI stack (vectorized env + behavior cloning + self-play RL).
Every number below comes from the same duplicate 1v3 protocol: the challenger
plays all four seats over identical walls against three copies of a strong
open-source baseline (Mortal v4), seed_key=20260711, seeds from 10000,
placement points [90, 45, 0, -135].
avg_pt is the challenger's mean placement points relative to the baseline;
0 would mean parity. Higher is better.
The headline checkpoint has a 100k-game milestone measurement
(-4.66 +/- 0.535, 16.0M decisions, zero fallbacks) β not a small-sample estimate.
Checkpoints
| File | Arch | Obs | Training | avg_pt vs baseline |
|---|---|---|---|---|
bc_v2_g186.pkl |
256ch x 10blk (12.4M) | v2 (34x36 + 32) | BC on 10y logs + LR-1e-4 refine | -4.66 +/- 0.535 (100k games) |
bc_lean_g402.pkl |
256ch x 10blk (12.4M) | lean (34x20 + 26) | BC on 14y logs + LR-1e-4 refine | -5.07 +/- 1.54 (12k games) |
bc_lean_w192_ep2.pkl |
192ch x 8blk (5.3M) | lean | BC on 6y logs, 2 epochs | -8.87 +/- 2.70 (4k games) |
rl_oracle_800m.pkl |
256ch x 10blk | lean (actor) | oracle-critic PPO league, 0.8B steps | -8.38 +/- 2.65 (4k games) β negative result |
The last row is published deliberately: an asymmetric actor-critic whose critic sees all four hands fit the value function ~100x better (v_loss 0.102 -> 0.001) yet lost 3.2pt of external strength. It is one of four consecutive negative RL results in this project; the bottleneck appears to sit between the advantage signal and the policy update, not in value estimation.
Format
Plain pickle of a Flax parameter pytree for LeanACNet(channels, blocks)
(see jax_rl/net_lean.py in the repo). Load and run:
import pickle, jax
from net_lean import LeanACNet # from the TanyaoDojo repo
from obs_v2 import observe_v2 # or obs_lean.observe_lean
params = pickle.load(open("bc_v2_g186.pkl", "rb"))
net = LeanACNet(channels=256, blocks=10)
logits, value = net.apply(params, observe_v2(state)) # state: Mahjax red_mahjong State
Observation must match the checkpoint: bc_v2_* needs obs_v2 (36 planes),
everything else needs obs_lean (20 planes). Planes are stored as
uint8 * scale in datasets (scale 24 for v2, 4 for lean) and divided back at
train/eval time.
Evaluation harness: jax_rl/mjai_bot/run_eval.py in the repo
(--obs v2 for the v2 checkpoint).
Training data β not distributed
These models were trained on Tenhou houou-level game logs. Neither the logs nor
the derived datasets are redistributed here, per Tenhou's terms. The repo ships
the full builder (jax_rl/data_bridge/make_bc_dataset.py) so you can rebuild
equivalent datasets from logs you obtain yourself.
License
MIT for these weights and the core training code. Note that the repo's evaluation
bridge (jax_rl/mjai_bot/) links libriichi and is AGPL-3.0; see the repo's
LICENSING.md.