Wednesday 24 August 2016

Computing all Chinitsu possibilities

Chinitsu/Chiniisou (清一色 or one suit flush) is one of the most difficult hands to play in Japanese Mahjong because there are so many waits, it is easy to enter Furiten. Recognizing the best discard and multiple waits is a difficult but important skill to acquire.

A good start is to use the wait test from the Sample Pro Test by Reach Majong NY. There are 20 different hands of Chinitsu and Honitsu, mostly with multiple waits.

Just how many hands are there for each number of waits? This was a question that bogged me forever when I used to play Chinese mahjong, and even more so after playing Japanese mahjong.

I computed every possibility with a Python script backwards (building the hand from 4 melds (123/111) and 1 pair, then eliminating duplicates). This built every possible 14-tile mahjong hand.

There are exactly 13,259 possible 14-tile winning mahjong hands for Chinitsu.

Next, I wrote another script to compute every 13-tile hand in Tenpai (I removed 1 tile each from every 14-tile possibility and removed duplicates, then I attached the solution to every 13-tile hand).

The results were...

a total of 40,070 possible 13-tile hands in Tenpai. The table below depicts how many possibilities are there depending on the number of waits.

No. of waits
No. of possibilities
9
1
8
16
7
79
6
392
5
1335
4
2948
3
6739
2
14493
1
14067

There is 1 possibility for a 9-sided wait (the nine gates yakuman hand), and 16 possible 8-sided waits, all of which had a form of Happoubijin. You can see the 16 possibilities in a wiki sandbox I wrote for arcturus.su.

Learning about machi (wait patterns) and complex wait patterns helps a lot in seeing Chinitsu wait possibilities.

I am choosing to keep my computing output file private for the time being for academic purposes (as I noticed it was a university extra-credit question). You can email me if you want to see it, I might publish it at a later date.

No comments:

Post a Comment