Home My CV My Games My Project JS Game DBCG Project Maps Japon Blog Mahjong Contact
Mahjong Tile

AI Mahjong

This project is both a "game" and a way to show the power of my discard prediction AI
Average prediction rate 57%

Game Stat

Top1 prediction : 80.7%
Top3 prediction : 95.1%
Top5 prediction : 97%

Confidence(average of strongest prediction) : 73%

Prediction Diversity


Extracted from Tenhou.net, the largest online Mahjong platform in Japan.

Kaggle dataset: https://www.kaggle.com/datasets/trongdt/japanese-mahjong-board-states/data

Data are mapped on a 511 array, following this example picture.

To do List:
- Better Hand call system
- Riichi management
Some data are non retrievable like red dora.

PoV System

Those data are Pov based,
The player positions are:

p0: The POV player
p1: The player seated right for the POV player, i.e. Kamicha
p2: The player seated directly across the POV player, i.e. Toimen
p3: The player seated left for the POV player, i.e. Shimocha

Since it's Pov based retrieving the discard order for the "game" part of this project was a bit challenging.


The first 34 elements of the array comprise the Metadata of the Mahjong state.

CNN Architecture

The model was trained on 1000 games from Tenhou 7dan+ players.