Is it better to start in a corner, edge, or any random middle square? If the first square isn't empty, when is it better to click a neighbor vs. another random square? How does the strategy vary by mine density?

By "optimal" I mean maximizing the probability of winning on a game not guaranteed to be logically solvable.

5 Answers
5

It is better to start in the corner in Minesweeper. The reason for this is simple: corners are the most likely place for logically unsolvable positions. The more corners you remove, the greater the chance you'll be able to solve the puzzle, regardless of mine density. Since your starting move can't be a mine, starting there reduces the chance of being stuck on a corner by 25%.

The reason corners are the most likely place for unsolvable positions is simple: you have very few clues there. Note that this will also tend to generate smaller starting cleared areas when you start in the corner, but this isn't generally a hindrance.

You are additionally not much more likely to have a faster game if you start in the corner. The reason for this is simple: until you run out of options, you're always executing further options. If a region would have been cleared by clicking in the middle of the puzzle, it will be cleared when you reach it normally. In this sense, you wouldn't actually be saving time by clearing the middle region, because you'll inevitably clear it anyway.

$\begingroup$I suspect this maximizes chance of winning, not speed. I think going in the middle would lead to a faster game.$\endgroup$
– Kendall FreyMay 22 '14 at 2:08

$\begingroup$@Kendall Actually, believe it or not, I'm pretty sure it doesn't make a difference.$\endgroup$
– AzaMay 22 '14 at 3:10

$\begingroup$Does starting in the corner really help you avoid getting stuck there? It's possible to get stuck by starting in the corner, for example if your first move reveals a 3. It's not immediately clear to me that you are less likely to get stuck working out from the corner rather than into it.$\endgroup$
– Oscar CunninghamAug 30 '17 at 18:05

Emrakul's answer is correct, for some definitions of "optimal". If your goal is just "complete the puzzle", you want to start in the corner for the reason they describe. If your goal is to solve the puzzle quickly, you want the opposite: Start in the middle.

Selecting a cell in the middle gives you more options to actually start building off of. It's true that you're more likely to get a logically solvable position this way, but when that happens you can do what the pros do: Guess. If you guess right, you saved time. If you guessed wrong, click reset and try again.

The corner.
Since the cells adjacent to the corners have only 3 cells surrounding them, and because the algorithm that means you usually will have bombs next to each other, the minimal amount of cells touching cells creates an area where bombs are less likely to appear. It is also a good strategic move because the cell (if it is not a bomb) will say 1, 0, or 2. 1 gives you a 0% of knowing where to go if you click on it, and 2 or 0 gives you a 100% of knowing where to go if you click on the corner cell. Add that up and you get 66.7% of knowing where to go. Cells not on a corner but touching the edge: 50%, and cells in the middle: 22.2%. Going in the corner is a good first move in Minesweeper.

$\begingroup$You assertion: "where bombs are less likely to appear" is based on pure speculation. In a way, you are saying that "in a lottery the number 1 is less likely to be drawn, because it is the smallest number, so it makes no sense to bet on it". While I have no idea that what is the distribution of the mines in the field, assuming uniform distribution is the most likely. Therefore, it is very likely that your claim is simply not true.$\endgroup$
– MatsmathJan 5 '17 at 6:53

$\begingroup$@Matsmath if you click on a middle square, there are 8 squares for which whether they have bombs or not is relevant. If you click on a corner, you have 3. It is reasonable to expect that, on average, clicking on a corner will result in fewer bombs being "in the area", if by "the area" one means "squares adjacent to where one clicked".$\endgroup$
– AcccumulationApr 4 '18 at 20:09

Surprisingly it is not best to play in the corner but near a corner. The corners do not give you enough information to proceed. Near the corner helps eliminate one possible 50% guess.

I have written a solver for MineSweeper and the odds of winning are posted below based on the size of the puzzle. The coordinates such as (x,y) assumes the upper left corner is (0,0) and the array references are puzzle[y][x]. Each result used 200,000 samples. Anything less than this leads to misconceptions because the standard deviation is so large. I am not finished so it is possible these odds could increase.

$\begingroup$Can you compare to the odds of winning if you start at 1,1? That would make it clear that the exact corner is not the best option.$\endgroup$
– user3294068Apr 4 '18 at 17:54

$\begingroup$Have you seen this program? Their program does almost everything clever I can think of and only gets a 37.8% win rate on Expert. So I'd be fascinated to find out what yours does better.$\endgroup$
– Oscar CunninghamApr 5 '18 at 13:18

$\begingroup$The odds of winning starting at these locations using only 5000 samples is:$\endgroup$
– EdLoggApr 5 '18 at 18:38

The benefit of clicking edges or corners are obviously bested by the challenge of crawling across the whole board to solve. The best solution is to click 5 random squares, 1 in each quadrant, and 1 more in the center area somewhere. Pass those and you should be able to solve the rest.