Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

How To Accurately Calculate Minesweeper Probabilities

Here is a full explanation on how to precisely calculate the odds of each cell being a mine.
There is a lot of math involved, skip to the end for a practical way to improve your guessing.

Every board has a large, but finite number of possible combinations. Each combination is
equally likely to be correct. This can be used to calculate the probability of each cell being a
mine.

The first step is to figure out all the possible configurations of mines for a particular area.
Currently we are looking at an opening pattern for an intermediate board. There is one 2 mine,
four 3 mine, and three 4 mine configurations possible, as shown in the picture:

An intermediate game has 256 cells. The area we are working on has 15 cells, this leaves 241
cells for the remaining mines to go in.

Intermediate has 40 mines. The possible configurations use 2, 3 and 4 mines, leaving 38, 37
and 36 mines respectively, for the rest of the board.

These mines can be placed in any configuration in the remaining cells. The function to calculate
the total number of possible configurations for these mines is "choose":

2 mine configuration: 241 choose 38 = 2.8835878E+44


3 mine configuration: 241 choose 37 = 5.371389E+43
4 mine configuration: 241 choose 36 = 9.694702E+42

We have one 2 mine configuration, so there are 2.8835878E+44 possible boards for that.
There are four 3 mine configurations, so we multiply 5.371389E+43 by 4.
Three 4 mine configurations, 9.694702E+42 * 3.
Add these together and you get the total number of possible boards: 5.32298446E+44

For each cell, count how many combinations it is a mine in, for each number of mines used. Add
up the possible configurations for each cell, and divide it by the total possible configurations for
the board to get the probability that it is a mine.

For example:
Cell "A" is a mine in three of the 3 mine configurations and three of the 4 mine configurations.
The total number of configurations for cell A that have a mine is 3 x 5.371389E+43 + 3 x
9.694702E+42 = 1.90225776E+44.
Compare that to the total: 1.90225776E+44 / 5.32298446E+44 = 35.7%
And we get the chance for cell A to be a mine.

Practical Method:

The easiest way to practically apply the above information is to use the rule: Less mines is more
likely.

What this means is look at how many mines it takes to solve an area. Often, you can solve an
area with 1 mine, or with 2. The solution using less mines for an entire connected border area is
the most likely.

In expert mode, 1 less mine is ~4x more likely. This means if a guess is between an equal
number of combinations 1 mine apart (for example, one 2 mine and one 3 mine combination),
you can instantly assume it is ~ an 80/20.

Another method is to learn patterns for what the best guesses are. I am currently in the process
of writing another guide covering these common patterns.

You might also like