Mortal: The Open-Source Mahjong AI
Mortal is an open-source riichi AI used for game review. Find its official code, licence and web service, and learn what a local installation needs.
Mortal is a free, open-source AI for Japanese mahjong, developed in the Equim-chan/Mortal GitHub project. It supplies decisions to the separate mjai-reviewer program, which turns completed games into reviews.
You can use the free browser service linked from Mortal's documentation, or build the software locally with a separately supplied trained model.
The access routes and software features below are those documented as of November 2026. For a player choosing between services, Mortal, NAGA and akochan compared covers supported games, report differences and prices. This page explains what you are using when a review carries Mortal's name.
What is in the Mortal project?
The project introduction describes an AI trained with deep reinforcement learningtraining an AI to choose moves by rewarding strong outcomes over simulated games, which means learning decisions from rewards in play.
It also describes a Rust mahjong simulator with a Python interface and compatibility with Tenhou's standard four-player ranked rules. These are parts of the software project; the browser report is a way to use its decisions.
| Name you encounter | What it refers to |
|---|---|
| Mortal | The AI project, including its decision-making software and game simulator. |
| A trained model | The learned parameters loaded by Mortal to produce decisions. |
| mjai-reviewer | A separate program that uses compatible AI to examine a game log. |
| Mahjong AI Utilities | The web service linked by the project's Online Service page. |
Where are the code and licence?
The official repository is Equim-chan/Mortal. Its README identifies the code licence as the GNU Affero General Public License, version 3 or any later version. The repository includes the licence text and links to the documentation, so you can check the project itself instead of relying on a download advertised elsewhere.
Open source describes access to the program's code under its licence. It does not by itself tell you which trained model a website runs, or promise that the repository contains that model. The Docker guide expressly says that its image contains no model file and that you must prepare one separately.
How do you reach Mortal without installing it?
Mortal's Online Service page links to Mahjong AI Utilities. The mjai-reviewer README recommends this web app and calls it free to use, with no installation needed. As of November 2026, the form accepts Tenhou and Mahjong Soul game links, alongside other listed log inputs, and lets you select Mortal.
Check the notice above the form before submitting a game. It specifies four-player games under common rules and limits Mortal reviews to East-South games.
The instructions for finding a useful input belong to Tenhou log review and Mahjong Soul log review; changing a file name does not change the rules under which its game was played.
What does running Mortal locally require?
The build guide describes a Python environment, an up-to-date Rust compiler and a separate PyTorch installation. It then builds libriichi, the Rust library that Python uses. The guide distinguishes using the program from training it, and calls for a GPU if you intend to train.
The Docker guide provides another route for obtaining decisions from a trained model. That image is intended for inferenceasking an already trained AI model to choose moves without training a new network, meaning asking an already trained AI what to do, rather than training.
Its example feeds game events through the mjaistandard JSON event protocol connecting mahjong AIs with reviewers and simulators interface and receives actions as JSON data; you still need a reviewer if you want a review page.
- Choose whether you need a browser review, local reviews or development tools before installing anything.
- For local Mortal, read its build or Docker guide and establish where your compatible trained model will come from.
- For a local report, follow the mjai-reviewer README as well; it documents the reviewer separately from Mortal.
- Keep the model identity with your saved results so that later comparisons concern the same version.
Three ways to run Mortal
| Requirement | Browser app | Local Docker | Local build |
|---|---|---|---|
| Setup needed | None (web form) | Docker image | Python, Rust, PyTorch |
| Trained model file | Hosted by service | Supply separately | Supply or train (GPU) |
| Review report UI | Built-in HTML | Needs mjai-reviewer | Needs mjai-reviewer |
| Supported format | 4-player South only | mjai JSON events | Tenhou 4-player rules |
You have built the Docker image described in Mortal's guide. What does the guide say you must provide separately before using its example?
Show the answer
A trained model file
Mortal's Docker guide says the image does not contain a model file. Building the public program supplies the software, while the separately prepared model supplies the learned parameters used to choose moves.
What information does a Mortal review use?
The mjai-reviewer FAQ says decisions take account of visible table information, including the sequence of discards, scores and the current round. It excludes player ranks, previous statistics and thinking time. A recommendation therefore concerns the recorded position rather than a personal judgement about the opponent.
The same FAQ says Mortal does not calculate the separate deal-in-rate column shown by akochan. Do not read an action preference as that missing statistic. If your aim is to understand a review's numerical columns, continue with reading AI review ratings rather than treating every number as a chance of winning or losing.
Can Mortal also play at a table?
As of November 2026, the linked web service also offers to summon Mortal into a Tenhou private lobby. This is a separate feature from analysing a finished log. Playing mahjong with bots discusses what practice opponents can help you learn.
Common questions
Is Mortal free?
Its code is published under GNU AGPL version 3 or later, and the mjai-reviewer README describes its linked browser app as free to use as of November 2026. Local use has separate requirements, including a compatible trained model and the environment described in Mortal's documentation.
Does downloading Mortal include trained weights?
Do not assume it does. The Docker guide explicitly says its image has no model file, and the mjai-reviewer README says a trained model is needed to use Mortal.
Can the linked Mortal reviewer analyse three-player games?
As of November 2026, its form specifies four-player games and Mortal reviews of East-South games. The reviewer FAQ explicitly excludes three-player mahjong.
Sources
- Equim-chan/Mortal: README and code licence
- Mortal Documentation: Introduction
- Mortal Documentation: Online Service
- Mortal Documentation: Build
- Mortal Documentation: Docker Quick Start
- Equim-chan/mjai-reviewer: README
- Mahjong AI Utilities: review form and private-lobby feature
- mjai-reviewer FAQ: information, model outputs and ranked accounts
- Tenhou manual: AI participation rules
RiichiKit Pro · founding
Have an AI analyse your own games
Deep Review re-reads every decision in a game with a stronger neural network and shows where it disagrees with you. One a day is free with an account. Pro is for players who review every session.
- 30 Deep Reviews a day with the neural engine
- Unlimited drills built from your own mistakes
- Your leaks and trends across every game you import
RiichiKit
Practise this in RiichiKit
Put what you just read to work with engine-verified drills, interactive course chapters and table tools.
