A Fast Algorithm for Computing the Deficiency Number of a Mahjong Hand

The tile-based multiplayer game Mahjong is widely played in Asia and has also become increasingly popular worldwide. Face-to-face or online, each player begins with a hand of 13 tiles and players draw and discard tiles in turn until they complete a winning hand. An important notion in Mahjong is the deficiency number (a.k.a. shanten number in Japanese Mahjong) of a hand, which estimates how many tile changes are necessary to complete the hand into a winning hand. The deficiency number plays an essential role in major decision-making tasks such as selecting a tile to discard. This paper proposes a fast algorithm for computing the deficiency number of a Mahjong hand. Compared with the baseline algorithm, the new algorithm is usually 100 times faster and, more importantly, respects the agent's knowledge about available tiles. The algorithm can be used as a basic procedure in all Mahjong variants by both rule-based and machine learning-based Mahjong AI.

Authors

Institutions

Publication Details

Journal
Chinese Journal of Electronics
Published
2024-11-01
DOI
https://doi.org/10.23919/cje.2022.00.259
Citations
1
Primary Topic
Teaching and Learning Programming
Type
article
Field-Weighted Citation Impact
0.41

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Fast Algorithm for Computing the Deficiency Number of a Mahjong Hand

Xueqing Yan, Yongming Li, Sanjiang Li
1 citations
Chinese Journal of Electronics
Teaching and Learning Programming
0.41
article

A Fast Algorithm for Computing the Deficiency Number of a Mahjong Hand

Xueqing Yan, Yongming Li, Sanjiang Li
article en
1 citations

Abstract

The tile-based multiplayer game Mahjong is widely played in Asia and has also become increasingly popular worldwide. Face-to-face or online, each player begins with a hand of 13 tiles and players draw and discard tiles in turn until they complete a winning hand. An important notion in Mahjong is the deficiency number (a.k.a. shanten number in Japanese Mahjong) of a hand, which estimates how many tile changes are necessary to complete the hand into a winning hand. The deficiency number plays an essential role in major decision-making tasks such as selecting a tile to discard. This paper proposes a fast algorithm for computing the deficiency number of a Mahjong hand. Compared with the baseline algorithm, the new algorithm is usually 100 times faster and, more importantly, respects the agent's knowledge about available tiles. The algorithm can be used as a basic procedure in all Mahjong variants by both rule-based and machine learning-based Mahjong AI.

Chinese Journal of ElectronicsVol. 33(6)
University of Technology Sydney (AU), Centre for Quantum Computation and Communication Technology (AU), Shaanxi Normal University (CN)
National Natural Science Foundation of China
Openalex Percentile: Top 26%
Teaching and Learning Programming
0.41
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.