Mahjong and artificial intelligence explained

Mahjong is a relatively complex four-player game with multiple variants played all around the world.[1] When developing a mahjong-related artificial intelligence (AI), there are several factors researchers must consider; an AI must take into account its own hand as well as what it infers about the other players' hands utilizing the information available.[2] Researchers have developed several mahjong-related AI models with various applications.

Shanten and kabe

Researchers noticed that the current AI models that existed purely to calculate the shanten of a hand did not account for the discarded tiles. These researchers developed the Block Deficiency Model, an AI that would calculate the shanten of the hand taking Kabe, tiles that are all used or discarded, into account.[3] [4]

Scoring

Scoring rules

Japanese mahjong has complex scoring rules; in general, the number of points a hand is worth will be calculated from the fu and han of the hand. Han is gained from dora and yaku. Honba must also be considered; each honba adds 300 points to the next winning hand.[5] AI is being developed to do these calculations.

Recognizing the score with AI

Researchers took note of the complexity involved in mahjong's scoring system and attempted to make an AI that could recognize the components of a winning hand and calculate the score with the goal of helping people restrained by their old age. Because this AI model attempted to recognize tiles in real life instead of on a computer, some tiles were misidentified.[6]

Playing mahjong

Single-player mahjong

Researchers decided to make an AI model that played a "simplified", single-player variant of mahjong; this model was intended to provide a framework for other models to use. They considered their model "greedy" because it only focused on winning itself. The researchers later added a second player, but ended the game after one hand; to maximize its expected score, the AI would have to consider the speed and value of the hand it would like to achieve.[7]

Suphx

Researchers developed Suphx with the intention to make an AI model that could play Japanese mahjong competitively . Suphx was able to achieve the second highest rank on Tenhou.net, but was not permitted to play in the highest ranking room.[8]

Notes and References

  1. Book: Rep, Jelte . The Great Mahjong Book . Tuttle . 2007 . 978-0-8048-3719-4 . 1st . Singapore . 11 . en.
  2. Yajun Zheng . Shuqin Li . 2020-10-17 . A Review of Mahjong AI Research . RICAI '20: Proceedings of the 2020 2nd International Conference on Robotics, Intelligent Control and Artificial Intelligence . 345–349 . 10.1145/3438872.3439104 . 978-1-4503-8830-6.
  3. Xueqing Yan . Yongming Li . Sanjiang Li . 2021-08-15 . A Fast Algorithm for Computing the Deficiency Number of a Mahjong Hand . cs.AI . 2108.06832.
  4. Book: Chiba, Daina . Riichi Book 1 . 2020 . 198 . en.
  5. Web site: 2016-04-01 . Rules for Japanese Mahjong . 2023-09-21 . European Mahjong Association.
  6. Takuma Kano . Liang Li . Nak Yong Ko . Woong Choi . 2021-10-15 . Calculation of Mahjong Score using AI . 21st International Conference on Control, Automation and Systems (ICCAS) .
  7. Kai Jun Chen . Lok Him Lai . Zi Iun Lai . 2023-04-06 . A Novel Reward Shaping Function for Single-Player Mahjong . cs.GT . 2305.04145.
  8. Junjie Li . Sotetsu Koyamada . Qiwei Ye . Guoqing Liu . Chao Wang . Ruihan Yang . Li Zhao . Tao Qin . Tie-Yan Liu . Hsiao-Wuen Hon . 2020-04-01 . Suphx: Mastering Mahjong with Deep Reinforcement Learning . cs.AI . 2003.13590 .