Diana plays a special version of minesweeper on a square-shaped game field with n × n smaller squares, where n is an integer greater than or equal to 4. First, she clicks any square, and then the game generates a mine in every non-clicked square, except one. Also, a number (an integer between 0 and 8) appears in the square Diana clicked, telling how many mines there are next to the square (in the small squares horizontally, vertically or diagonally touching it).
Diana's goal is to hit the only mineless square without hitting any mines before that. If Diana plays the best way she can, what is the probability she will succeed?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
As a result, there is no 'best' first move?
Log in to reply
Exactly, any first move will have the same chance of succeeding.
Log in to reply
Love this problem. Keep it up!
As part of the game, shift-clicking (or ctrl-clicking?) any square with a number that you suspect of being a mine will identify that mine and any adjacent mine to it, until the game runs out of adjacent mines. This should affect the probability of winning quite a bit. The effect of this on computing the probability of winning will probably be difficult, but it will, given the description of how the game proceeds, virtually ensures a win by the player.
Log in to reply
I have no idea how this works, would like to know.
Even though the result is the same, I would argue that if the player is playing the best they can, they will always click a non-edge square because it gives the most information by revealing the most numbers.
Log in to reply
It does, but whether all the information is so much more useful is another question. The best way(s) to play here is/are basically the one(s) with the best chance to win.
Split the game into three parts and define the events A : = "The mineless field is adjacent to the starting point", B : = "Diana wins":
If N = m − 1 , the mineless field is adjacent to the starting block and and if N = m , it lies elsewhere. As Diana plays the best she can, she must choose her second square accordingly. We calculate her probability to win with Bayes' Theorem: P ( B ) = P ( B ∣ A ) P ( A ) + P ( B ∣ A c ) P ( A c ) = m 1 ⋅ n 2 − 1 m + n 2 − m − 1 1 ⋅ n 2 − 1 n 2 − m − 1 = n 2 − 1 2
Problem Loading...
Note Loading...
Set Loading...
Let's take a look at this problem through three cases: The first square Diana clicked is either 1) in a corner, 2) in an edge, or 3) anywhere else.
1) First click in a corner:
The number may be either 2 or 3. If it is 2, the mineless square is next to the one Diana clicked. The chance for the number 2 is n 2 − 1 3 as there are 3 squares next to the clicked square and the total number of non-clicked squares is n 2 − 1 . Then, Diana can guess for any adjacent square, so she hits with the chance of 3 1 . If the number is 3, the mineless square can be anything but adjacent to the one Diana clicked. The chance for the number three is n 2 − 1 n 2 − 4 as there are n 2 − 4 squares that are non-clicked and not next to the clicked one. Now Diana, avoiding the squares adjacent to the one she clicked first, hits the mineless square with the chance of n 2 − 4 1 .
Thus, the total chance of succeeding is
n 2 − 1 3 × 3 1 + n 2 − 1 n 2 − 4 × n 2 − 4 1 = n 2 − 1 2 .
2) First click in an edge:
The number may be either 4 or 5. If it is 4, the mineless square is next to the one Diana clicked. The chance for the number 4 is n 2 − 1 5 as there are 5 squares next to the clicked square. Then, Diana can guess for any adjacent square, so she hits with the chance of 5 1 . If the number is 5, the mineless square can be anything but adjacent to the one Diana clicked. The chance for the number three is n 2 − 1 n 2 − 6 as there are n 2 − 6 squares that are non-clicked and not next to the clicked one. Now Diana, avoiding the squares adjacent to the one she clicked first, hits the mineless square with the chance of n 2 − 6 1 .
Thus, the total chance of succeeding is
n 2 − 1 5 × 5 1 + n 2 − 1 n 2 − 6 × n 2 − 6 1 = n 2 − 1 2 .
3) First click neither in a corner nor in an edge:
The number may be either 7 or 8. If it is 7, the mineless square is next to the one Diana clicked. The chance for the number 7 is n 2 − 1 8 as there are 8 squares next to the clicked square. Then, Diana can guess for any adjacent square, so she hits with the chance of 8 1 . If the number is 8, the mineless square can be anything but adjacent to the one Diana clicked. The chance for the number three is n 2 − 1 n 2 − 9 as there are n 2 − 9 squares that are non-clicked and not next to the clicked one. Now Diana, avoiding the squares adjacent to the one she clicked first, hits the mineless square with the chance of n 2 − 9 1 .
Thus, the total chance of succeeding is
n 2 − 1 8 × 8 1 + n 2 − 1 n 2 − 9 × n 2 − 9 1 = n 2 − 1 2 .
As the chance of hitting the mineless square with the second click is the same in all cases, the final answer is n 2 − 1 2 .