Mortal 凡夫
The strongest riichi engine whose code you can read. Mortal is a free, open-source deep reinforcement learning AI, and it powers the free reviewer at mjai.ekyu.moe.
GitHub ↗- Rules
- Four-player riichi, Tenhou ranked rules 2
Who built it
Mortal (凡夫) is written by Equim, who also wrote akochan-reviewer, a review tool built on akochan 15. Equim says Mortal was started from scratch out of frustration with akochan’s limits, and that version 1.0 took nearly a year 5. The code is licensed AGPL-3.0-or-later and the logo and assets CC BY-SA 4.0 1.
Rules
Mortal plays four-player riichi and is compatible with Tenhou’s standard ranked rules 2. It does not handle three-player mahjong 4.
How it works
Mortal is an end-to-end, model-free deep reinforcement learning model. It does not search ahead like chess or Go engines 4. For each legal action it outputs a Q value. Its training target is the change in expected placement points between one round and the next, where a separate model estimates each player’s chance of finishing 1st to 4th from the scores and board state 4.
The game emulator (libriichi) is written in Rust with a Python interface. The docs report up to 40,000 hanchan per hour with neural network inference on an RTX 4090 and Ryzen 9 7950X 2. Mortal speaks the mjai protocol 2.
Strength
Mortal has no Tenhou rank. Equim says Tenhou declined an AI account because Mortal was built by an individual rather than a company, and that Equim runs no AI in ranked lobbies 4.
The project publishes duplicate-match results instead, with Mortal in three seats and the challenger in one 3:
| Mortal version | akochan games | Mortal avg pt | akochan avg pt |
|---|---|---|---|
| 3.1 | 13,152 | +1.89 | −5.67 |
| 1.0 | 23,432 | +1.68 | −5.03 |
In self-play over a million games per side, version 4.0 averaged +1.23 pt per game against 3.1 3. Equim’s own estimate is that version 1.0 may be about as strong as the original Suphx 5; that has not been measured on a public ladder.
How to access it
Online, free. mjai.ekyu.moe reviews Tenhou, Mahjong Soul and Riichi City logs with Mortal models 4.1a (defensive), 4.1b (balanced), 4.1c (aggressive), 4.0 and 3.0, usually in under 10 seconds. It can also seat one to three Mortal bots in your Tenhou private lobby 6.
Run it yourself. The repository builds with Rust and Python, and includes a Docker image for mjai inference 2:
git clone https://github.com/Equim-chan/Mortal.git
cd Mortal
sudo env DOCKER_BUILDKIT=1 docker build -t mortal:latest .
sudo docker run -i --rm -v /path/to/model/dir:/mnt mortal 2 < log.jsonThe image ships without a model. Trained weights are not public: in August 2022 Equim said there were no plans to release them, since the online reviewer already covers that use and released weights could be used for cheating in ranked games 5. You need to train your own model, which needs a GPU 2.
Review locally. mjai-reviewer (Apache-2.0) runs Mortal or akochan on a log from the command line 7.
Sources
- Mortal repository (GitHub, Equim-chan/Mortal)
- Mortal documentation
- Mortal documentation, “Strength” (duplicate match results)
- mjai-reviewer FAQ
- Equim, “Should I release the trained mahjong AI model?” (gist, updated 2022-08-19)
- Mahjong AI Utilities (mjai.ekyu.moe), service page
- mjai-reviewer repository (GitHub)
Facts checked against these sources on 24 October 2026.