Probability

From Japanese Mahjong Wiki
Jump to navigation Jump to search

Probability in mahjong is a concept that can be applied to many different situations. Because unlike chess, go or shogi, mahjong is an incomplete-information game. Players are required to predict outcomes and chances of reaching tenpai, improving their hand state (lowering tenpai or raising uke-ire (the useful tile count)), and completing their hand. At the same time, players try to project and guess opponent waiting tiles. Naturally, some of these are difficult concepts to describe with mathematical models, due to various game situations.

Basic concepts and variables

  • A, B, C, D as indices: for player 1, 2, 3, 4.
  • E as index: total for everyone.
  • X as index: explanatory concept.
  • X, Y, Z as indices: the three-tile indices for a function requiring inputs from 2-shanten or better.
  • numCopies: The number of copies of any given tile.
  • remTiles: The number of tiles remaining in a game. Equal to 136 - 1 - discardPonds - handE - 3 * calls - 2 * kans; as the number of kans reveal an extra tile for the group and an extra tile in the dead wall. This concept may be different according to the perspective of who is counting. A single player may not know that his opponents may have all his tiles buried in his hand.
  • remDrawsX: The number of draws left for a given player, or the entire table.

Chance of any given tile occuring once

P(tile) = numCopies(tile) / remTiles

Chance of a subset of tiles occuring once

{Sum: (tile=0 to 33)} numCopies(tile) / remTiles

Chance of drawing from a subset (tsumo chance)

S = 1 - notS; notS = ({Sum: (tile=0 to 33)} numCopies(tile) / remTiles)remDrawsE

Chance of calling a final tile from a subset (ron chance)

R = 1 - notR; notR = ({Sum: (tile=0 to 33)} numCopies(tile) / remTiles)(remDrawsE - remDrawsX)

Chance of winning (raw chance, at tenpai stage)

W = 1 - (notS * notR); note that raw chance will give numbers whose 4-player total can easily exceed a total probability of 1. This is to be expected.

Chance of not having a win declared in one full turn

Q = notWA * notWB * notWC * notWD

Chance of winning (net chance)

N = WA + {Sum: (i=1 to remDrawsA)} [ WA * Qi ]
    + if(remDrawsE - 4 * remDrawsA >= 1;1;0) * notWA * notWB * QremDrawsA
    + if(remDrawsE - 4 * remDrawsA >= 2;1;0) * notWA * notWB * notWC * QremDrawsA
    + if(remDrawsE - 4 * remDrawsA >= 3;1;0) * Q * QremDrawsA