How to Solve Minesweeper Puzzles
Minesweeper began as a computer game played on mainframes in the 1960s, and grew in notoriety during the 80s. When Microsoft included it with its Windows operating system (one of two games meant to familiarize users with clicking a mouse), Minesweeper really took off in popularity. It doesn’t seem to have appeared as a pencil and paper puzzle until sometime in the late 90s or early 2000s.
Rules
Using the clues given, mark all cells containing mines. Unlike the computer game, you get to see all the clues when you start. Interestingly, some designers make their puzzles slightly ambiguous. They’ll use tricks such as hiding mines behind layers of clues, or in cells with no nearby numbers. If that’s the case, you’ll be given the total number of mines in the grid as a clue. Otherwise, two simple rules apply:
- Each number indicates the quantity of mines detected in the 8 cells around it.
- No mine shares a cell with a number.
Basic Techniques to Solve
- Look for safe cells first.
- Adjacent clues limit each other.
- Use clue pairs and subtraction.
- Group up shared cells around 1 clues.
Take it Easy
The first thing you’ll want to do is search the grid for clues that are already solved. Either they have a number of empty cells around them equal to the clue, or the clue shows there are no mines around it. Simple clues include:
- 0 or 8: All surrounding cells are empty, or contain a mine, respectively.
- 5 on the edge: All cells around it are mined.
- 3 in the corner: Same here, it’s surrounded by mines.
Adjacent Clues
Remember that a cell with a clue can’t also contain a mine. So, you can look for clusters of adjacent clues. Each clue will have fewer cells around them, so it’s possible they’re already solved. While we’re on this subject, though, look around at nearby clues when marking mines. Sometimes solving one clue will complete another one.
As with computer Minesweeper, it is just as important to figure out where there are no mines as it is to find the mines themselves. Every time you solve a clue by finding all its mines, remember to mark out the safe cells as well.
The two clues around this 6 reduce the available cells, so the 6 is solved. Placing the mines solves these clues, so other cells around them must be safe. The empty cells around these clues must be mined to reach the correct totals. Notice this ambiguous cell. This puzzle should specify if it has 11 or 12 mines.
Clue Subtraction
One of the most fascinating techniques is that you can deduce many mines around certain clue pairings based solely on the difference when you subtract one number from another. This is because adjacent clues share possible mined cells, so whichever one is greater must have extra mines outside of those shared cells.
Orthogonally Adjacent
Orthogonally adjacent clues share 4 cells, and each has 3 outside cells. Any mined cells among the shared ones force the larger clue to place excess mines in their outside cells.
Another way to put this is that the total mines outside the larger clue is always equal to the mines outside the smaller clue, plus the difference.
As a result, you will never see a clue difference greater than 3 between orthogonally adjacent numbers. Another useful thing to note – if the clues are equal, they will always have the same number of mines in their outside cells.
Shared versus outside cells The difference here is 1. Shared mines subtract from both clues. Here, 2 has 1 mine outside, while 3 needs 2 mines. Excess mines outside the large clue always equals the total outside the smaller, plus the difference between the clues. When the difference is 3, the larger clue must have mines in all its outside cells, while the small clue has none.
Shared versus outside cells The difference here is 2. Shared mines subtract from both clues. Here, 2 has 1 mine outside, while 4 needs 3 mines. Clues larger than 5 force at least one of the shared cells to be mined. So 3 must have 1 or 2 mines outside. As before, if the difference is 5, the larger clue has all outside cells mined, and the smaller clue has none.
Diagonally Adjacent
Similarly, clues that are diagonally adjacent share only 2 cells, and each has 5 outside cells. Again, mines placed in the shared cells force the larger clue to place any extra in their outside cells.
So the same procedure applies: the total mines outside the larger clue is always equal to the mines outside the smaller clue, plus the difference. This time, the maximum difference you will see is 5.
This also means that clues greater than 5 must use at least one of the shared cells. So the smaller clue definitely won’t have all its mines outside.
Group Up Cells
Clues of 1 are interesting. On one hand, they have the most cells around them, so they seem challenging to solve. On the other, when they share cells with a larger clue, you can use them to restrict possibilities. Think of shared cells as a group – only one of them can be mined, because of the 1. By combining cells in this way, the larger clue has fewer options for its remaining mines. This might lead to discovering most of the mined cells around the large clue, leaving only the cells next to the 1 as unknown.
Here, we know the five cells around the 4 must have four mines. But two of those cells are next to the 1, so we can count them both as one cell. That gives us the other three mines for the 4, and eliminates other options for the 1. Next, the 2 clue. 3 has one mine left, so we treat two options as one cell. By grouping cells, we’ve deduced all this information. At this point, we’d look around this cluster to find more clarity on the remaining mines.
Solving the Puzzle
Now it’s time to put all these techniques together and solve our example puzzle. If you’d like to try it for yourself in another tab, you can use the Penpa+ solver here.
Breaking In
To start, these pairs represent out three best options to break in. The 2s are against the border, and have no outside cells. So the 3s must each have 1 mine outside. This pair has a difference of 3, which means all the cells outside the 5 are mined, and cells outside the 2 are safe.
This 5 now has only five unknown cells around it, so they must all be mined. This completes these clues, so we can mark all remaining cells around them as safe. Now this 1 only has one cell left, so it must be mined.
We’ve completed this 1, so the last cell around it is safe. Here, the 3 needs only one more mine, which limits the two and tells us where one mine must be placed. Looks like we’ve deduced as much as we can in this area for now. Let’s shift our focus.
Advancing North
The 2 needs only one mine, which lets us group shared cells. So two of 4s remaining three mines are known. This 2 is solved, so we can mark out the safe cells surrounding it. After those eliminations, we know the location of the final mines for all these clues.
In this pairing, the difference is 1, so the 4 must have two mines in its outside cells because the 3 only has one. That completes this 2, so we can mark the safe cells. After those eliminations, these two clues are solved, so we place more mines.
Surround the Enemy!
This 3 clue requires one more mine in its outside cells than the 2. Since that completes these 1s, we can mark a bunch of safe cells. Now we know the final mine for the purple 3s, which also completes the yellow clues.
The 4 needs two mines in these cells, which will also solve the 2. The 1 adds a limit, forcing a mine on the left. Meanwhile, this 2 needs one more mine, and either placement would solve the 1. Notice the intersection. That tells us the mine must be here, which solves all these clues.
Mopping Up
We have a similar situation here. The 3 on the left limits the 2, because it only needs one more mine. And this 2 also needs one more mine, either of which would complete the 3. So it must be at the intersection. That tells us the final mine for the 4, which completes all these clues.
This 3 has been complete for a while. Marking its safe cells tells us where the mine for the 1 is. That completes this 2, and when we mark its safe cell, we discover the final mine. We’ve solved the Minesweeper puzzle!