Skip to main content
QUICK REVIEW

[Paper Review] Mathematical aspect of the combinatorial game "Mahjong"

Yuan Cheng, Chi-Kwong Li|arXiv (Cornell University)|Jul 23, 2017
Artificial Intelligence in GamesComputer Science3 references5 citations
TL;DR

This paper applies combinatorial theory and Python-based computation to analyze Mahjong hands, particularly focusing on the 'Nine Gates' hand—believed to be the only 13-tile hand that can win with any single dot tile. The study confirms the uniqueness of the Nine Gates hand and systematically explores 'Eight Gates', 'Seven Gates', and related configurations, revealing unexpected combinatorial structures and probabilities, with implications for AI-driven game play and mathematical modeling of tile-based games.

ABSTRACT

We illustrate how one can use basic combinatorial theory and computer programming technique (Python) to analyze the combinatorial game: Mahjong. The results confirm some folklore concerning the game, and expose some unexpected results. Related results and possible future research in connection to artificial intelligence are mentioned. Readers interested in the subject may further develop the techniques to deepen the study of the game, or study other combinatorial games.

Motivation & Objective

  • To mathematically verify the folklore claim that the 'Nine Gates' hand is the only 13-tile Mahjong hand that can win with any of the nine dot tiles.
  • To investigate the existence and enumeration of 'Eight Gates' and lower-gate hands where winning is possible with eight or fewer additional tiles.
  • To develop a computational framework using combinatorial enumeration and Python to systematically analyze winning hand configurations in Mahjong.
  • To explore the probability of forming winning hands when drawing 14 or 17 tiles from the 36 dot tiles, providing quantitative benchmarks for game design and AI evaluation.

Proposed method

  • Model Mahjong hands as integer partitions of 13 tiles across 9 tile ranks (1 through 9), each with up to 4 copies, using multinomial coefficients to count valid combinations.
  • Implement a Python program to enumerate all possible 13-tile hands from the 36 dot tiles and test each for 'gate' properties—i.e., whether adding any one of the nine tile ranks completes a winning hand.
  • Use combinatorial constraints to identify valid winning hand structures: one pair and four sets (pungs or chows), with pung defined as three identical tiles and chow as three consecutive tiles of the same suit.
  • Apply probability theory to compute the likelihood of drawing winning hands from random draws of 14 or 17 tiles from the 36-dot set.
  • Leverage symmetry and structural constraints to reduce computational load, focusing on hands that satisfy the 'gate' condition for multiple tile additions.
  • Validate results against known patterns and extend the analysis to 16-tile hands to explore higher-gate configurations.

Experimental results

Research questions

  • RQ1Is the 'Nine Gates' hand the only 13-tile hand in Mahjong that can be completed into a winning hand by adding any one of the nine dot tiles?
  • RQ2How many distinct 'Eight Gates' hands exist where adding any one of eight specific dot tiles results in a winning hand?
  • RQ3What is the probability of drawing a winning 14-tile hand from the 36-dot tile set, and how does it compare to intuitive expectations?
  • RQ4Are there 'Seven Gates' or 'Six Gates' hands where adding any one of seven or six tile ranks completes a winning hand?
  • RQ5Can the computational framework be extended to analyze 16-tile hands and identify all 16-tile configurations that win with any tile from a specified subset?

Key findings

  • The 'Nine Gates' hand is confirmed to be unique: there is exactly one 13-tile hand using only dot tiles that can be completed into a winning hand by adding any one of the nine dot tiles.
  • There are exactly 11 distinct 16-tile hands that can win with the addition of any one of the nine dot tiles, confirming the existence of multiple 'Nine Gates'-like configurations in larger hands.
  • The probability of drawing a winning 14-tile hand from the 36-dot set is approximately 0.1116, or 11.16%, which is higher than the intuitive expectation of 1/9 (~11.11%).
  • For 17-tile hands, the probability of forming a winning hand is approximately 0.1531, or 15.31%, indicating a significant increase in winning potential with more tiles.
  • The study identifies 11 distinct 16-tile configurations that satisfy the 'Nine Gates' property, demonstrating that such hands are not unique beyond the 13-tile case.
  • The computational framework successfully identifies all 13-tile hands that can win with any of the nine dot tiles, validating the folklore claim with rigorous enumeration and combinatorial proof.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.