Mahjong Tools Part 1: Tenhou’s Efficiency Calculator
This the first part of a series I’ll be writing on the various websites and programs that exist on the internet for riichi mahjong players. Some of them are more widely known about than others, and many of them exist only in Japanese with no existing guides on how to use them. The aim of this series is to introduce people to tools that they maybe haven’t heard of or come across before, and to act as a bit of an English guide for the ones that are entirely in Japanese.
The first tool we’ll be covering is Tenhou’s calculator for shanten and ukeire, which is found at http://tenhou.net/2/.
What is it?
This tool is a calculator for tile efficiency, with shanten and ukeire being two key numbers to work out far a hand is from winning. For those who aren’t familiar with the terms, shanten is the number representing the minimum number of tiles needed to get your hand into tenpai. A hand that only needs one more tile to reach tenpai is said to be 1-shanten. Ukeire is related to this, and is the number of individual tiles that, when added to the hand, would lower the shanten value and progress the hand towards tenpai.
To give an example:
On discarding the or tiles, this hand now only needs one more tile to be in tenpai – i.e. it is 1-shanten. Tiles that would get this hand into tenpai are (3 available), (4 available), (4 available), and (4 available). The ukeire number is therefore 3 + 4 + 4 + 4 = 15 tiles.
Now this example was relatively easy for a player to calculate the two values, but for hands that are further from tenpai (i.e. the shanten number is higher), or which have complex shapes, it can quickly become a lot more difficult and complicated to see all the potential waits for any given discard, and work out which one is the most efficient. That’s where this calculator comes in!
How do I use it?
Going to http://tenhou.net/2/ in your browser, you will see something like the screen below:
This page has a box in which to enter a hand of your choice, along with some pre-generated random hands, each labelled with the calculated shanten number above. Entering your own hand is relatively simple, and uses a shorthand for listing tiles in the hand:
- Manzu tiles are designated by entering the tile numbers, followed by “m”
- Souzu tiles are designated by entering the tile numbers, followed by “s”
- Pinzu tiles are designated by entering the tile numbers, followed by “p”
- Honour tiles are designated by entering the numbers 1-7, followed by “z”
For honour tiles: East, South, West, North, White, Green and Red are the numbers 1 to 7 respectively. Red fives are denoted with a 0 in their respective suits. The calculator is relatively flexible with how you enter the hand – ‘234p56m’, ‘2p3p4p5m6m’, ‘324p65m’, and ’23p56m4p’ will all work correctly and give the same output in the calculator, although the hand display at the top of the screen will always represent tiles in the same order as the input (i.e. it doesn’t sort the hand for you). The calculator will accept any number of tiles, though will always add a randomly drawn tile if the number of tiles entered does not give a valid hand where a tile may be discarded (i.e. if you enter 13 tiles, it will add a random 14th for you). If you enter more than 14 tiles, the calculator will truncate the hand to the first 14 tiles entered.
So, let’s try it out with a demonstration! Entering ‘1334568m12p23s15z4m’ into the hand calculator will give you this page, and the following screen:
At the top of the screen, there is the shanten number followed by 向聴, along with the number of tiles in the hand in parentheses. Underneath the hand are the discard options, along with potential draws which would subsequently reduce shanten, and the associated total ukeire, listed in order from highest ukeire to lowest. In this example we can see that discarding 1m, East or the White dragon tiles will all give 55 possible tiles to take the hand from 3-shanten to 2-shanten.
Clicking on an individual tile in the hand displayed at the top will re-run the calculator having discarded that tile from the hand, while giving you a new randomly drawn tile.
By default the calculator will also include seven pairs and kokushi musou as hand formats. If you want to disable these and only calculate ukeire for hands which are four groups of three plus a pair, then click the 一般形 link on the right above the ukeire calculations. After clicking it, you can click on 標準形 in the same place to go back to the default.
Some things to note
The calculator is a very useful tool, but it’s important to note that there are a few shortcomings with using it. These are less to do with the calculator itself, and more with considering only shanten and ukeire for what to discard next. Notably, there are things that calculating the most efficient discard in this way does not tell you:
- It does not give you any indication of the impact on hand value for any given discard.
- It does not take into account tiles that have already been discarded in the game to that point, which will reduce the actual ukeire below the theoretical number with all tiles available, and may affect the ordering of the results.
- It does not take into account the potential speed and shape of the hand in future turns. The discard with the best ukeire for the next immediate turn is not necessarily going to give the best potential efficiency for the hand as it progresses. Just because a discard has the best ukeire in the short term does not mean it will give you the highest ukeire later on.
- Related to this, it does not consider tile draws which may improve the hand but do not advance it in shanten. For example, looking solely at ukeire will consider a 12m penchan wait (accepts 4 tiles) and a 24m kanchan wait (accepts 4 tiles) as equivalent, when any experienced player will know that the kanchan wait is a stronger shape due to the potential of drawing 5m to switch to a 45m ryanmen wait. The calculator will also not consider discards that may reduce shanten for better hand shape and faster efficiency overall.
The example given in this article is a good demonstration of some of these points. The calculator lists 1m, East and White dragon as equivalent discards, all with an ukeire of 55 tiles. For this hand an experienced player would typically choose to retain the 1m tile over either honour tile, due to the greater flexibility for later draws, along with the potential for forming sanshoku in the hand and increasing the value. That said, there is still insight to be gained from this – namely that retaining an honour tile as a safe discard for later will not hugely impact the hand speed over holding the 1m.
Despite the drawbacks, the calculator is still an immensely useful tool, and I’d thoroughly encourage anyone who hasn’t used it before to spend a bit of time playing around with it. So long as you bear some of the drawbacks in mind, the results can still often be quite insightful, and for intermediate players this tool can frequently present some quite surprising outcomes compared to what a player might intuitively have thought was the right option.
Thanks, great article.