# The most mines that can be swept!

So the other day I was once again on Minesweeper, just doing my duty and trying not to explode.

What is the most amount of mines possible on a logically solvable puzzle?

For arguments sake the board size I was playing on was 20x35 tiles so a solution this size is good!

What possible patterns can determine whether it's solvable, and is there someway to apply this to any size of board?

Any single solution would be appreciated but some formulas or something would be better.

The only rule (other than the games rules) is that you can pick where ever to start, as usually you would randomly try tiles until you find a workable area anyway.

If you don't know what Minesweeper is then that very much saddens me.
But here: Wikipedia-MinesweeperVideoGame, do find out!

Edit:
I assumed this was part of the rules.
However it may not be so I am going to include it in the question:
Each mine must have at least one number marking it.

Also the board must be logically solvable, so no need to guess once given the starting tile.

Sorry for not clarifying these at the start.

• Wouldn't this just be a board where every tile except wherever you first click is a mine? Aug 15, 2017 at 16:24
• No because without knowledge of the rest of the board you would mark the 8 surrounding the start but be unable to logically mark any others on the board. Aug 15, 2017 at 16:30
• Minesweeper usually gives the number of mines in the puzzle, so this could be done by subtraction, additionally, the 'solved' condition is to mark all of the non-mine squares. Should both of these factors be considered untrue? Aug 15, 2017 at 16:32
• I have now edited the question @Sconibulus as i didn't clarify some points. You can use the counter of course. Aug 15, 2017 at 17:17
• @JakobPampBengtsson Usually you start wherever you guess and hope to get something you can use. For this this problem you chose where to start so IF you chose a tile with "2" and nothing else around it that isn't a valid solution. You could start on a blank tile so it would open a small area you can work to begin with. Aug 17, 2017 at 8:23

If you're going by Microsoft Minesweeper rules (or any where the number of mines are known), and assuming we aren't limited by the artificial limitation Microsoft provides on board creation, the answer is

699

which happens to be

$20*35-1$

and is a trivial solution. Once you mark the opening move, which will be an 8, the board is solved, either automatically in the case of Microsoft (you uncovered every safe square on the board, so the rest of the squares are auto-flagged), or by noticing that the number of mines = the number of hidden squares and manually flagging them.

• I believe that the rule that all mines must have at least one number next to them is correct (as A.B. mentioned in his answer). Regardless I will assume this to be the case and edit the question. Aug 15, 2017 at 17:10
• That is not the case in any version of Minesweeper though. An incomplete question is not a bad answer.Here's an image of a maximum mines board in Microsoft Minesweeper: i.ytimg.com/vi/1Oqp1TBeza4/hqdefault.jpg Aug 15, 2017 at 20:25
• I thought that was part of it as in a set generated game I have never received nor seen a puzzle with non-marked mines. If however you set a custom amount of mines for a board size then you could force the program to do this. Aug 17, 2017 at 8:28

So the answer I've found is

286

Looking like this (starting at one of the green squares, X's are mines).

Disclaimer: This hasn't been checked for optimisation, but I believe starting at a green square gives the player enough information to solve this layout. I've designed the layout with the following rules in mind:
-The starting square must give enough information to continue the puzzle until the end without requiring guesses.
-Each mine must touch a number (i.e. no mines completely surrounded by other mines or walls).
-All outside squares must be mines (as walls give no additional information anyway).

This is only my best guess though, so I'm happy to be golfed! Hopefully this stimulates some more efficient designs.

Fun fact: clicking a green square wins the game. It would be entertaining if it turned out the game with the maximum amount of mines could be solved in one click.

• With no real logic behind it, I wonder if the maximum number of mines HAS to be solved in one click. Usually the part of minesweeper that makes it tricky is determining which in a 'bank' of squares are mines and which aren't. If all of them are mines (as would almost be required by the MAX MINES criteria), there would be no 'game'. Especially if we are not allowed to guess. Aug 23, 2017 at 20:40

### The maximum number of mines on a solvable board is:

616

The most optimal mine-placing strategy is to work with 3x3 areas. The reason being is that there must be a number indicating adjacent mines, including diagonals. From my understanding of the rules, a mine must have a corresponding number (cannot have multiple mines in a row without a number accounting for it).

The optimal setup for this would then be:

[x][x][x]
[x][8][x]
[x][x][x]

where 'x' is a mine. Copying this pattern, without overlapping and going over the given board dimensions, would provide a 18x33 board. For the last two rows and columns we can overlap once on the last two rows and columns. The final result would look something like this (Excel screenshot):

Note that this is not the only solution, but similar logic would follow.

• This wouldn't work as the you could solve the one set of 8 but then you wouldn't be able to logically solve the next set as you wouldn't know where to pick the next 8. Aug 15, 2017 at 17:03
• @BMS21 then you need to rephrase the question. The board layout is completely solvable, clearly requiring guessing. There is a very low chance of solving it on the first-go, but it follows all the rules.
– A.B.
Aug 15, 2017 at 17:08
• But it's not logically solvable Aug 15, 2017 at 17:29
• @somebody it was not stated in the original question that it needed to be solved logically.
– A.B.
Aug 15, 2017 at 18:03
• The original version of the question said that the puzzle (game) had to be solvable. How do you interpret that, if not “logically solvable”? I believe that “solvable, … requiring guessing” is an oxymoron. Every puzzle is solvable if divine inspiration and exhaustive guessing are allowed. Aug 16, 2017 at 4:39

I would argue that, before the most recent edit to the question, the (trivial) answer is

$$700$$

which, of course, is

$$20\times35$$ i.e., the entire board

which has the added benefit that

you can play (win) it in zero time

because

the game will start, and will immediately realize that all non-mine tiles are clicked, and so will immediately proclaim that you have won!