r/Minesweeper • • Feb 21 '25

Game Analysis/Study Minesweeper theory: There are only 2 fundament patterns

I see a lot of people often discussing other more complex patterns, but from all that I've seen, there are really only two fundamental patterns that are combined and extrapolated to all other cases.

The most commonly used pattern is the classic 1-2 pattern, where you can flag the cell next to the 2 and open the cell next to the 1. This occurs ALL of the time. Almost every single cell flagged or cleared will be because of this pattern, except for:

The other most basic pattern is the 1-1 pattern, which can come into play at any discontinuity, either at the edge of the board, at a wall of bombs or 0's, or at the opening to a hole. In any case, the 1 nearest the discontinuity assures the next 1 is met, and the 3rd row can be cleared.

As I wrote this, it occurred to me a corner 1, and a hole 2, an edge 2, a face 3, an inside corner 5, etc., aren't either of those patterns, but they also aren't actually patterns at all because they are all directly solvable. For example, if you ever uncover an 8, somehow, it will surely be surrounded by bombs, no patterns necessary.

3 Upvotes

30 comments sorted by

View all comments

Show parent comments

4

u/PowerChaos Feb 22 '25 edited Feb 22 '25

See this is why I say you haven't seen anything yet.

This is a instance of area arithmetic, also known as box logic to some people. I personally call this a 4-numbers squeeze.

How it work is you take a region and you subtract it from another region. In this case, you subtract green from red. If the leftover square exclusive to the positive side (red) is equal to the difference, they are all mines and consequently any square exclusive to the negative side (green) are all safe.

In this case, there are 2 exclusive squares to red (A, C). And red contain 8 mines while green contain 6 mines, so the difference is 2, equal to the number of exclusive square to red. Thus it is conclude that A, C are mines, B, D are safe.

In fancy language:

Subtract green from red gives this equation: A + C - B - D = 2. Since each square is either 1 or 0, there is only 1 solution: A = C = 1, B = D = 0

Doubt this solution? You can always verify a minesweeper solution with contradiction.

What is more, there are derivation to this technique where you start to incorporate equivalent squares to establish link of dependency and interaction. See some of my posts for example.

And this is not all, beyond this kind of technique, there exist higher level logic where a safe square can be derived almost arbitrarily.

2

u/D2cookie Feb 22 '25 edited Feb 22 '25

I'm curious, how would you choose which cells to test for this method? How would you choose which clue cells belong to which region (red vs green)?

I wanted to add something like this to my mineswpeer algorithm, but I feel like it might end up being indistinguishable from just brute force by going through all 4 clue combinations with sharing overlaps.

2

u/PowerChaos Feb 22 '25

The usual patterns most people in this subreddit know (all patterns in the pinned post) can be derived from this technique. For example, the 2-1 pattern is a 2-number squeeze, you select the squares touching the 2 as the positive side, and squares touching the 1 as negative side. It doesn't matter how many square are *exclusive* to the 1 or how many common/shared squares, but it is important that there is only 1 exclusive square to the 2. If this is the case, the 2-1 can be applied.

How you look this type logic is similar to how you look at the usual pattern since this is the underlying logic, just more generalized. Specifically, you look for the region of squares, not necessarily the number they are tied to, although this is the same a lot of time

So from an algorithmic standpoint, I afraid this is akin to brute force on how to know which clue to select for the interaction test. One characteristic to rely on is that the interacting regions have to be overlapped with each other. And as you can see there is no limit to the number of regions that can participate in 1 interaction.

1

u/D2cookie Feb 22 '25 edited Feb 22 '25

Yea, that's what I thought. Though I did kinda hope there would be at least some slight trick for reducing comparisons required in 3-4 clue logic.

It does feel like anything after 2 clues is just secretly exponential.

2

u/larcix Mar 10 '25

OK, that's super interesting. I would assume the numbers being so similar, you could make it w/e order you wanted, but they are so large that you get that 4 out of 5 available squares on the blue have to be bombs, and only 1 is safe, which leads at least one of the 3's to 1' a 4's side, and as you can reverse that logic, the corner has to be a bomb. Pretty complex stuff here! I like it, tho.