Mines multiplier formula ties payouts to survival probability
In Mines, the fair multiplier is the inverse of the probability of opening k safe tiles; with a house edge e, it becomes (1 − e) / P(survive k).
Mines uses a 5×5 board with T tiles and M mines. Because tiles are opened without replacement, the probability of surviving k picks is the hypergeometric value P(survive k) = C(T − M, k) / C(T, k), rather than (1 − M/T)^k.
A fair multiplier makes expected payout equal to the stake, so m_k = 1 / P(survive k). With a house edge e, the multiplier is reduced to m_k = (1 − e) / P(survive k). The same formulas can be implemented in JavaScript.
The probability is symmetric when the number of mines and picks are exchanged. On a 25-tile board with three mines, surviving five picks reduces to 57/115, while opening all 22 safe tiles has probability 1/2300. Rounding multipliers down to two decimals can reduce the actual return, especially for small multipliers; exact fractions with BigInt avoid floating-point drift.