Suphx / Naga Haipai Efficiency - Part 1


Riichi Mahjong AI

In the world of mahjong AI, two stand out as the strongest. There is Naga, an efficient risk-taking machine, and Suphx, its risk-averse, yet highly aware counterpart. Of these two AI, Suphx is my favorite - its play is incredibly unique, regularly sacrificing tile efficiency to manage risk. Many mahjong players can find the most efficient discard in the majority of hands, but few can manage risk the way Suphx can.

In this 3-part series of posts, I will be going over a variety of haipai , or opening hands, played by Suphx, and analyzing these decisions with Naga. By analyzing the decisions of these two AI, we'll take a close look at the tradeoff between efficiency, value, and risk in the early stages of a hand. I encourage readers to mentally choose the tile they would discard before scrolling down and looking at the AI decisions.

Standard Order

This hand is an example of the standard haipai order. In general, we cut guest winds, terminals, yakuhai, 2/8, then 3-6. Guest winds are the least efficient tile. Terminals are more efficient than yakuhai, but don't allow you to open your hand on a pair draw, so we typically keep yakuhai over terminals if we benefit from opening the hand. To maximize efficiency between two yakuhai, we keep the one that is more live (in this case, keeping Green over Red).

Suphx and Naga both agree on the first three discards of this hand (South, 9s, Red). In the rest of this post, we will be looking at situations where one or more of the AI deviate from this standard order.

Yaku Terminal

The hand has two complete sequences and 2 ryanmen. We just need a non-yakuhai pair and we have a probable pinfu. Cutting one of the yakuhai keeps the 1m pair draw. We cut Green first to keep the safer West, which is a guest wind to other players.

Suphx and Naga : Green

The hand has 6 tiles for making a straight, so we keep 9m over Red.

Suphx and Naga : Red

Comment: Another yaku that can make terminals more valuable than yakuhai is sanshoku.

Yakuhai vs Furiten 2/3

We drew 8m, but it's weaker than usual - we have a 9m in our discards, which means that any 69m waits will be furiten. We also have a triple of 5m in our hand, which makes the 6m draw weaker, because the 68m shape is less likely to upgrade into a 56m shape (at least without breaking the 5m set). On the other hand, we have a yakuhai that is worth 2 han if we call it. We should cut 8m.

Suphx and Naga : 8m.

Comment: Although many factors came together to make 8m the optimal discard, I have observed that Naga often cuts furiten 2/8 before yakuhai in the general case. However, we should also keep in mind that the detriment of furiten is smaller the further from tenpai we are. On the other hand, being far from tenpai makes it more valuable to reduce risk by keeping safer tiles such as yakuhai (more on this later).

For this hand, we are deciding between 3p and East. We have a 1p in our discard, and 3 1p have been discarded in total. We can reason about this discard choice by building off the standard order: 2 > Yakuhai. The 3p with 1p in our discard is better than a 2. It can form a good ryanmen on one side, and a furiten ryanmen on the other side, whereas a 2 forms ryanmen on one side and penchan on the other side. Therefore furiten 3 > 2 > Yakuhai. The same logic applies if we had 2p in our discard.

Suphx and Naga : East

Terminal VS Guest Wind (5+ blocks)

Sometimes when we have 5+ blocks, it's not worth keeping around a floating terminal tile over a guest wind. For a terminal to form an additional block (excluding pairs, which honors can also form), you can only form 12 penchans or 13 kanchans. If we already have 5 blocks, adding a 6th weak block provides only a marginal benefit, so we may choose to keep a safer guest wind.

For this specific hand, we have a 1(4) shape, which makes 1s even weaker than usual. If we draw a 2 or 3, the 4 "steals" the tile acceptance, and we end up cutting 1 anyways. The 1(4) shape often requires two or more draws to form an additional non-pair block. Note that this doesn't apply to 1456 shape, which is stronger than usual because drawing a 3 forms a complex 13456 shape with great tile acceptance.

Suphx and Naga : 1s

Here is another 5 block example. We consider tossing the 9m or the North. This hand has a yakuhai pair which is likely to be called, so it would be great if we could draw a second pair for this hand. The 689m shape (and the 346s shape) is great for building pairs, because if you draw a 7m, you have a 6789 shape which accepts 6 and 9m to form a sequence + pair. We should toss the guest wind to maximize efficiency.

Suphx and Naga : North

Terminal VS Guest Wind (<5 blocks)

This hand has 3 blocks. For our candidate discards, we consider the (6)9m versus North (cut guest winds in a counter-clockwise order). Terminals will always be more efficient than guest winds, but guest winds are safer tiles if an opponent calls or declares riichi. Cutting 9m here could be considered a form of sakigiri, or cutting a more efficient tile to minimize deal-in risk. Let's outline a few principles of sakigiri to help guide our decision:
  • The further from tenpai we are, the less we slow our hand down by giving up efficiency. The number of tiles that improve our shanten is higher at 2-shanten than at 1-shanten.
  • The lower our winrate is, the less we lose from giving up efficiency. Low winrate hands end up folding most of the time anyways.
  • Our opponents are most likely to declare the first riichi in row 2. In row 1, there is roughly a 1.5-2.5% chance an opponent declares riichi on a given turn. In row 2, this number increases to roughly 2.5-4%.
  • We can think about the utility of sakigiri in terms of EV saved from tossing lower dealin tiles vs an opponent riichi. Hypothetically, if the safe tile we kept has a 2% dealin rate, whereas in the world where we did not keep this tile we have a 5% dealin rate, we saved 3% in dealin rate. If dealing in is roughly 5000 pts more expensive than our fold EV, this translates to an EV gain of 150pts.
 With these principles in mind, let's evaluate our hand. We have a low winrate hand with 3 blocks. We probably want to play this hand pretty tight, cutting floating terminals after reaching 5 blocks. For 9m to form a non-pair block, we would first need to draw a 7 or 8m which would overlap with 6m, forming a 4th block. Afterwards, we'd have to draw 1-2 more tiles to form a 5th block with 9m. I think it's much more likely we form a 5th block before any of that happens. The 5th block could come from a pair draw, a connection with the 1p, or a middle tile draw into a connecting tile. For these reasons I would cut 9m straight away to keep around a guest wind.  

Suphx: 9m

Naga : North

Comment: For the 1(4) terminal vs guest wind decision, Naga tends to cut the guest wind at 3 or fewer blocks. At 4 blocks, it is inconsistent which option Naga will pick. In my opinion, the 4 block case is clearly in favor of cutting the terminal, because the 5th block will be formed regardless of whether we keep the terminal or not. I think Naga overvalues 1(4) terminals while undervaluing guest winds in these spots.

We now have 4 blocks, and we consider cutting 1p vs North. In this case, 1p gives us multiple direct draws to form a 5th block. It's row 1 and we have a guest wind pair and a once cut yakuhai, so we don't need to worry about an opponent riichi or call. It makes sense to be efficient and cut North.

Suphx and Naga : North

For our last hand, we have a 3 block hand with a few pretty good floating middle tiles, including the dora. Our candidates are 9s, South (once cut guest wind), and West. We will discuss the decision between live and multiple cut honors in a future post, but for now let's just consider 9s vs South. This hand seems similar in winrate to the last hand, but the dora 5s increases the expected value of our hand if we reach tenpai. 9s is an interesting sakigiri option - it's reasonable to expect to form our 4th and 5th blocks around the 7p and 5s, and even if we draw 7s, it's not that bad to cut 9s and lock in the dora shape. That said, I would just keep it simple and cut South.

Suphx : 9s

Naga : South

Summary

To summarize, we reviewed the standard haipai discard order of yakuhai > terminals > guest winds. We looked at cases where specific yaku made terminals more valuable than yakuhai. We looked at how furiten can affect our discard order. Finally, we looked at cases where we may want to cut terminals before guest winds. We observed our first disagreement between the two AI, noticing that Suphx considers cutting terminals before guest winds in hands with < 5 blocks, wheras Naga usually plays for max efficiency.

In part 2 we'll look at some more specific yaku - honitsu, chanta, and chiitoi / toitoi.

In part 3, we'll look at some more contentious hands where the "correct" answer is uncertain, and different choices tradeoff efficiency and safety.

Comments

Popular posts from this blog

How to Measure Mahjong Luck and Skill

Push Fold Fundamentals: Winrate/Dealinrate