No Yaku Kanchan Dama vs Break Winrates

No Yaku, No Riichi?

This analysis was inspired by a recent post by Yuusei that looked at the following situation:
What would you do: riichi to secure 2nd, 4s dama, or 9m breaking tenpai? Assume a "generic" reward system: [+2, +1, 0, -3] for 1st-4th place (7 dan Tenhou, Ms1 Majsoul).

As discussed in Yuusei's post, due to the harsh penalty for 4th place, riichi is a bad option. The dealer is in 1st place, so the game will probably end this round. Assuming the game ends, if we just fold this hand and don't deal in to last place, we will get +1 or +0 points. We do not want last place to fight our bad wait and risk a -3pt result. So we consider the two other options. Naga cuts 4s, hoping to draw our winning tile directly or upgrade to pinfu on 6m. LuckyJ, Tencent's new Mahjong AI, cuts 9m, giving up tenpai for more pinfu upgrades, which is also what Yuusei suggests. Who is right?

Simulation Set Up

To answer this question, I set up a simple Markov Chain for modeling this situation. In this Markov Chain, there are 3 states, and 18 turns of mahjong.

The first state is no yaku dama, corresponding to cutting 4s in the original picture. In this state, there are three events that can happen. First, we can draw our winning tile. Second, we can draw our pinfu upgrade. Third, we can draw an irrelevant tile. After one of these events occur, we proceed to the next turn of mahjong.

The second state is kutsuki 1-shanten, corresponding to cutting 9m in the original picture. In this state, there are two events that can happen. We can draw our pinfu upgrade, or we can draw an irrelevant tile. After one of these events occur, we proceed to the next turn of mahjong.

The final state is pinfu tenpai. This state can be reached from the other two states if the pinfu upgrade is drawn. I will estimate the winrate using good wait dama winrates from Statistical Mahjong Strategy by Miinin. This chart only gives numbers for turns 5, 8, and 12, so I will interpolate these numbers to get winrates for turns 1-18.

One final consideration is the fact that the number of winning tiles / upgrades decreases over time. If I have 10 pinfu upgrade tiles on turn 1, by turn 9 some of these tiles may have been discarded by my opponents. To handle this, I add a decay parameter which lowers the upgrade count each turn. I do not use this decay for the direct winning tiles for the dama hand: instead, I will make different charts for dama hands with 2, 3, and 4 outs.

Dynamic Programming Solution

The above Markov Chain can be solved using a Dynamic Programming solution, which I present below.

Results

Using the above function, I generate winrate curves over 18 turns for 6 types of hands.


There are 3 dama hands. The 68 dama hand has 4 dama uke and 4 upgrade uke. The 46 dama hand has 4 dama uke and 8 upgrade uke. The sticky dama hand assumes a shape of 34568, which has 4 dama uke and 10 upgrade uke (4 2's, 3 4's, 3 5's).

There are 3 break hands. The standard break hand has 12 upgrade uke: 8 attached to a middle tile (3-7), and 4 from the broken kanchan (cutting 8 from 68). The sticky break hand has 18 upgrade uke, 14 from the 3456 shape and 4 from the broken kanchan. The 2x sticky break hand assumes we're cutting 8 from 34568, and have a 3456 shape in another suit, totaling 24 upgrades.

Let's start by sanity checking these winrates. According to Statistical Mahjong Strategy by Miinin, the winrate of a sticky 1-shanten hand is 45% on turn 5 and 30% on turn 8. This is suprisingly close to the purple line in the above chart, which gives 43% and 28% for turns 5 and 8 respectively. This simulation is surprisingly close to the real data.

To decide whether dama or break is better, we want to compare the appropriate lines on the winrate chart. In the original screenshot with 79m, we want to compare the blue 68 dama line (both kanchans have 4 pinfu upgrades) to the red break line (since the other floating tile is 4s). According to the simulation, the dama winrate is higher for every turn. As a disclaimer, this simulation does not consider the iipeikou 6s upgrade or furiten ryanmen upgrades, for example cutting 9m and drawing 8m.

Summary

The above chart with 6 lines was for the 4 out kanchan case. I also generate this chart with 2 and 3 outs. To summarize the dama vs break decisions, I made summary tables which list the first turn where dama becomes better than breaking tenpai:

Comments

Popular posts from this blog

Push Fold Fundamentals: Winrate/Dealinrate

Reviewing My First 50 Houou Games With Naga

Suphx / Naga Haipai Efficiency - Part 1