In order to make some predictions about how often certain scoring possibilities arise, it is sometimes helpful to turn to simulations. Simulations can help when the complete solution would be impractical to compute, or when a model is close enough to the real problem to be helpful, or when the real problem is not well enough understood but some understanding is desired.
Opportunities for Pung and Kong
For this simulation, I attempt to find out the relative and absolute frequency of
- Concealed Kong
- Melded Kong, where I have 3 identical tiles and the 4th gets discarded
- Promoted Kong, where I have 2 identical tiles, a 3rd gets discarded, and I later get the 4th
- Concealed Pung, where I have 3 identical tiles and the 4th appears before my 2nd
- Melded Pung, where I have 2 identical tiles and a 3rd appears later
In order to avoid building an entire game simulator with intelligent opponents, I simplified the game into an idealized scenario. Imagine getting all the tiles you would get from a wall game (which is 1/4th of the 136 tiles in a game excluding flowers). Each player then turns over tiles one by one but at the same time. If someone turns over a tile that you already have 3 of in your hand, you can count a Melded Kong. If someone turns over a tile and you already have a pair, you can count a Melded Pung; and further if you later discover the 4th in your hand, you can instead count a Promoted Kong. That is the basis for my simulation.
I shuffle the tiles and divide them into four hands. Each hand has the tiles numbered (from 1 to 34) to give them some order. For each hand and for each of the 34 different tiles, I evaluate the following test:
if I have all 4 of the tile, count a Concealed Kong opportunity if I have 3 of the tile, and the 4th appears in another hand after my 3rd, count a Melded Kong opportunity if I have 3 of the tile, and the 4th appears in another hand after my 2nd, count a Promoted Kong opportunity if I have 3 of the tile, and the 4th appears before my 2nd, count a Concealed Pung opportunity if I have 2 of the tile, and the 3rd appears in another hand after my 2nd, count a Melded Pung opportunity
I wrote a program in C using the Standard Library to generate the random numbers. Since I am fairly certain the random number generator has at least 32 bits of entropy, I stopped the simulation at 3.5 billion deals, which generated 14 billion hands. (After 4.2 billion simulations, the deals may have repeated.) The following table describes the frequency of opportunity for each particular scoring element. For example, one hand in 9.334 should have one chance for a Concealed Kong, and about one hand in 65 will have no chances for a pung of any kind!
There are several factors stopping you from getting each kong or pung, however:
- You don't know which tile to keep to match the tiles you'll get later in the game
- Other players will not be discarding randomly
- Someone else may win before you get all the tiles
- There are scoring opportunities you want to achieve but must discard the matching tile to do so
- The tiles you would get are in a Kong box
- Players claiming kong get extra tiles
|Number of Chances||Concealed Kong||Melded Kong||Promoted Kong||Any Kong||Concealed Pung||Melded Pung||Any Pung|
|4 or more||2,568,000||10,260||4,774||3,254||351.5||2.145||2.132|
Because of the rarity of some events (such as 14 chances for a melded pung), the very large numbers should probably be disregarded.