Jump to content

Does Minesweeper have one and only one solution?


rodster

Recommended Posts

I ask this, because there are always multiple instances in which you literally have to guess which fields might contain the mines (and this kind of ruins the fun for me, because it is impossible to be always correct by just having to guess the answer).

 

Here is a collection of a few examples.

image.png.5d10a5038d1d9229b4ac26c4464d9769.png

Can you tell which fields have the mines? We can say for sure that we have to flag exactly two fields. But how many legit possible ways are there to do this in this example? Let's quickly go through them.

 

- first possible solution

image.png.e64d2cf383850a1fa9d3cf58d9154147.png

 

- second possible solution

image.png.dac502d280195318307c7b17db295e0d.png

 

- third possible solution

image.png.02989339fb3f9a9a2e5d130fd7d98b16.png

 

- fourth possible solution

image.png.4061cded99c1738d6089ef2d7d254b5b.png

 

Only one solution is correct. Meaning that we have 25% chance of literally guessing the right answer. Let's try the first option and open the field from top to bottom.

 

- going for the first option

image.png.33051786c6eb890e7d7ddd20ef42f711.png

 

We died! One mine was placed correctly though...

Share this post


Link to post

Yes, you are always working from incomplete information. I'd agree that it's one of the most frustrating parts of the game when you have to take a leap into the dark and guess. Often though if a particular section of the field is ambiguous you can at least try a different part and eventually you might get more information about the section you were stuck on.

Share this post


Link to post

The bottom right square is guaranteed to be safe. In examples 2 and 3, the puzzle is solved. The uncertainty is between 1 and 4. If you click the bottom right square in example 1, what do you see? If you click the bottom right square in example 4, what do you see? Do both appear identical? If so, minesweeper has multiple solutions, and puzzles can be unsolvable.

Share this post


Link to post

Hah. I used to waste fucking HOURS playing minesweeper. I liked to ramp it up to some ridiculous size (Windows version) and try to complete it. It's completely logical - until you have to guess...

 

It is a nice little logic puzzle though. Certainly, sometimes you must guess to proceed and then it's just pot luck.

Share this post


Link to post

Your example is flawed. Because there is one square you can press that is guaranteed not a mine. If that square where a mine too and the pattern was 

 

01X

13X

XXX

 

instead that would be a better example. As in that case, there is without more squares outside of the nine, no guaranteed way to success. Though I am sure someone who's good at probability calculations could give a best likelihood of a positive outcome.

Edited by kristus

Share this post


Link to post

An actual full sized example solved as much as possible with the newly acquired knowledge. Mind you, this is a new game. I stopped at this position and will continue after getting enough input.

image.png.4d25ed7bb6b47cee8e2bd5baf2c38124.png

 

I can't see any further logical continuation of the given situation. At this point I'd have to guess and knowing the nature of the game I am pretty sure there is a mine on both of the top corners at the 1-2-1 combination at the middle. But how can we be sure? We still need to place exactly 21 mines in this game.

 

Edit: I am terribly sorry, but for some reason Minesweeper began a new game when I started again this time around. It sometimes used to fire up the game I left, but this time it bugged out for some reason :(

Edited by rodster

Share this post


Link to post
1 hour ago, rodster said:

At this point I'd have to guess and knowing the nature of the game I am pretty sure there is a mine on both of the top corners at the 1-2-1 combination at the middle.

 

Regarding the 1-2-1 combination in the middle. I am pretty sure there aren't going to mines at both top-right and bottom-right (because of the 1 on the right). It would be either top-left and top-right or it would be top-left and bottom-right. So I think there is a guaranteed mine on the top-left.

Share this post


Link to post
7 hours ago, ReaperAA said:

 

Regarding the 1-2-1 combination in the middle. I am pretty sure there aren't going to mines at both top-right and bottom-right (because of the 1 on the right). It would be either top-left and top-right or it would be top-left and bottom-right. So I think there is a guaranteed mine on the top-left.

Very nice! I'll try the top-left corner then and see how far I come.

 

Edit: WTF!?! It didn't save the game. Baaaaaaah. Sorry. I am pretty sure after your explanation that the top left would have been a mine.

Edited by rodster

Share this post


Link to post

I have a theory (it's probably complete bullshit) - different versions of Minesweeper are designed with or without "guessing scenario" prevention protocols.

 

The thing is - I have played several versions of Minesweeper. I have played versions for WinXP, WinVista, Win7, that one online one that looks like the WinXP one (or maybe the Win98/95 one?), ReactOS and one of the free versions that came with one of my installs of Ubuntu. From what I can remember - I have never experienced a "guessing scenario" in WinVista, Win7 and Ubuntu, but in ReactOS and the online one - I always experience one of those scenarios. Could the version of Minesweeper have an effect on the likelihood of these scenarios occurring? Or maybe I'm just insane (or forgetful). 

Share this post


Link to post

Technically depending on the version you're playing (9x/XP I think at least) you can memorize the boards, but in practical gameplay yes, there is going to be some guesswork. It's annoying but I suppose that's what you run into with such a simple number generator. 

Share this post


Link to post

I guess I could have memorized some of the boards subconsciously, but as you stated - that would explain WinXP and Win95/98, but what about Win7? Does Win7 have limits on it's random number generator?

 

The main reason why I brought up the different versions of Minesweeper is because if we found what version has or doesn't have the preventative measures for "guessing scenarios" (intentional or not) - we could find the BEST version of Minesweeper! One without all this random guess work.

 

But I remind you - I could just be forgetful or insane, so take these ramblings with a Siberian salt mine.

Share this post


Link to post

This scenario won't happen in a real minesweeper game. You will always have more info than this in a bigger board. For your 2nd image you can start with the 4 at the bottom. The mine has to be next to it as the 2 can only have 2 land mines next to it and the 3 will have the landmine at the bottom to satisfy the 1. Always start around the biggest numbers and leave the 1s for last.

 

Edit : You are also better off getting a different minesweeper version. Some have algorithms that avoid bullshit 50\50 situations (fuck corners) unlike vanilla minesweeper. 

Edited by Pegg

Share this post


Link to post

Here's another example:

rZxDZR2.png

One mine remaining, but how to tell in which of the two question blocks it is?

Share this post


Link to post
1 hour ago, Gez said:

One mine remaining, but how to tell in which of the two question blocks it is?

 

I think there is no way to tell this.

Share this post


Link to post
23 hours ago, Pegg said:

This scenario won't happen in a real minesweeper game. You will always have more info than this in a bigger board. For your 2nd image you can start with the 4 at the bottom. The mine has to be next to it as the 2 can only have 2 land mines next to it and the 3 will have the landmine at the bottom to satisfy the 1. Always start around the biggest numbers and leave the 1s for last.

 

Edit : You are also better off getting a different minesweeper version. Some have algorithms that avoid bullshit 50\50 situations (fuck corners) unlike vanilla minesweeper. 

As far as I understand, you suggest this.

solution1-3.png.7f4da5f36a07da450bbd33f1a898feb9.png

 

But couldn't this scneraio also happen?

737266645_solution2.png.19a6a7b535e13308782fcc403894241b.png

 

Maybe with a continuation like this.

solution1-3.png.91505305dcbbff0b60cadbff2ff5e83d.png

 

I admit it is quite fabricated, I didn't want to think out a whole scenario, so I tried to fill the gaps with the highest numbers possible. As of now I would have used 10 additional mines meaning 21-10 = 11 mines remaining to place on the rest of the board.

Share this post


Link to post
On 11/26/2020 at 4:57 AM, Ar_e_en said:

if we found what version has or doesn't have the preventative measures for "guessing scenarios" (intentional or not) - we could find the BEST version of Minesweeper! One without all this random guess work.

The version of Minesweeper in Simon Tatham's Puzzle Collection fits this:

 

 https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/mines.html

Quote

The first square you open is guaranteed to be safe, and (by default) you are guaranteed to be able to solve the whole grid by deduction rather than guesswork. (Deductions may require you to think about the total number of mines.)

(download from https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ if you don't want to play online.)

 

OTOH if you're playing a version that requires you to guess sometimes, and your goal is to complete the field, you should always guess as soon as you encounter a situation that requires you to, instead of putting it off until you don't have anything else to do. Might as well bite the bullet before doing any more work.

Edited by plums

Share this post


Link to post

Another example:

HGZ5c53.png

 

Two mines remain. Best I can guess, they're either the question blocks or the unmarked blocks.

 

They can't be both on the same side of the remaining square. If they were both on the top side, the empty squares above would be 4 and 3 while below it'd be 1 and 0. Both on the left side would cause the left side empty squares to be 4 and 3. Both on the right side would cause the left side empty squares to be 2 and 1. And both on the bottom side would cause the top side empty squares to be 2 and 1 while the bottom side empty squares would be 3 and 2. But both of the diagonal configurations are consistent with the known grid.

 

A very simple algorithm to prevent guesswork would be to ensure that the borders never have mines. I don't have a mathematical proof, just a simple intuition, but if every mine is guaranteed to be surrounded by 8 tiles from which you can try to get information, that the info is never limited by the grid size, most if not all of the guesswork situations would be removed.

Share this post


Link to post
2 hours ago, Gez said:

A very simple algorithm to prevent guesswork would be to ensure that the borders never have mines.

 

I could see this very quickly becoming a game of clicking in the middle and then clicking around all the edges to be able to attack the board from all directions. There's a risk of making the game too easy.

Share this post


Link to post
5 hours ago, plums said:

The version of Minesweeper in Simon Tatham's Puzzle Collection fits this:

 

1 hour ago, Ar_e_en said:

You have peaked my interest, my good sir!

 

Can confirm that mines (even some hard ones) can be solved.

https://imgur.com/a/qvwGj2j

Edited by ReaperAA

Share this post


Link to post
7 minutes ago, ReaperAA said:

 

 

Can confirm that mines (even some hard ones) can be solved.

https://imgur.com/a/qvwGj2j

Looking at the source code, it looks like the program actually attempts to solve it when the game generated, and rearranges things when it comes across a situation where guessing is required. Depending on your computer speed, you can maybe see (especially on the linked javascript version) that when you make the first move, it takes half a second to actually respond, because that's when the layout is being tested.

 

https://git.tartarus.org/?p=simon/puzzles.git;a=blob;f=mines.c;h=ee2d5bb621edcdda17f3aa69c45e5f5b307083a4;hb=HEAD

 

 

Share this post


Link to post

Yeah there is definitely some luck involved in solving minesweeper.

 

The best example I can provide of this is the first move. If you max out the number of mines you might have something like a 1% chance of not hitting a mine straight off the bat!

 

Its just more annoying at the end of the game as you’ve put all the time and effort in verses one click, reset.

Edited by DooM Bear

Share this post


Link to post

Might be last example from me (alltogether 5 mines are left):

image.png.4b78248822e18e5a02b51a3b6a7decf2.png

The top-right corner is obviously a 50-50 guess unless someone knows the algorithm or something and knows how the system usually places the mines.

 

But the more interesting part is the top left corner. Alltogether 5 mines are left, meaning that we need to place 4 mines on the top left corner of the board. Though is this possible to solve? Or are there multiple solutions?

 

Let's try it out shall we?

 

-one possible solution

solution1.png.7b9c81af393b42e7fcb3aef783ae3663.png

 

- second solution

192757808_solution2.png.cda442cd079457a43c70ebcbb7fb998b.png

 

-third solution (actual solution of the game)

image.png.cbc31e28de7c91899217f1822cbbb315.png

 

- fourth solution, fifth solution and so on...

 

Thus, I would argue that in a game of Minesweeper there is never exactly one solution, unfortunately this is no proof! But if there does not exist an exact solution then it is pretty much a game of luck at certain times. Maybe this is what makes this game attractive/addictive afterall?

 

We could try to test a few fields by chance but there are 11 fields on the top left corner and 4 of them are mines thus 4/11 = 36% chance to hit a mine. I don't know, given the fact that I sometimes even hit a mine while clicking around on the starting field doesn't give me a very secure feeling to wildly guess one field.

 

Also, I didn't test the other Minesweeper game, but since the computer actually tries to solve the field on its own I guess such situations won't occur there.

Edited by rodster

Share this post


Link to post
On 11/27/2020 at 9:12 PM, ReaperAA said:

Can confirm that mines (even some hard ones) can be solved.

https://imgur.com/a/qvwGj2j

 

Some more games I played using this version of minesweeper and including this small size but highly mined grid (50 mines in 9x9).
image.png.9f6a18f3eab60ef69ac8c8d5b2e4298d.png

 

Or even more ludicrous example. 70 mines in 9x9 grid

image.png.31731f2ae90a6fc153c95f5495d3d18c.png

 

All minesweepers should implement this kind of anti-guessing measures.

 

Edited by ReaperAA

Share this post


Link to post
On 11/27/2020 at 12:03 PM, plums said:

The version of Minesweeper in Simon Tatham's Puzzle Collection fits this:

 

 https://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/mines.html

(download from https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ if you don't want to play online.)

 

OTOH if you're playing a version that requires you to guess sometimes, and your goal is to complete the field, you should always guess as soon as you encounter a situation that requires you to, instead of putting it off until you don't have anything else to do. Might as well bite the bullet before doing any more work.

Thanks!

 

Just did the suggested 30x16 170mines field.

image.png.f5011087c73b0a4dcc8da4af079cd1c5.png

 

It is solvable without guessing and I did it! ^_^ (The two remaining mines need to be placed at the left and right from the 2, no other option, therefore the last mine is occupying the field on the very far left.)

 

This was honestly the most fun and satisfying game of Minesweeper I ever had and the newly acquired knowledge from this thread helped me as well in solving this puzzle.

Edited by rodster

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...