Two-Click Mine Sweeper

Diana plays a special version of minesweeper on a square-shaped game field with n × n n\times n smaller squares, where n 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?

1 n \frac{1}{n} 2 n \frac{2}{n} 1 n 2 \frac{1}{n^2} 2 n 2 \frac{2}{n^2} 1 n 2 1 \frac{1}{n^2-1} 2 n 2 1 \frac{2}{n^2-1} 0 0 None of these choices

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.

2 solutions

Tarmo Taipale
Aug 15, 2016

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 3 n 2 1 \frac{3}{n^2-1} as there are 3 squares next to the clicked square and the total number of non-clicked squares is n 2 1 n^2-1 . Then, Diana can guess for any adjacent square, so she hits with the chance of 1 3 \frac{1}{3} . 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 4 n 2 1 \frac{n^2-4}{n^2-1} as there are n 2 4 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 1 n 2 4 \frac{1}{n^2-4} .

Thus, the total chance of succeeding is

3 n 2 1 × 1 3 + n 2 4 n 2 1 × 1 n 2 4 = 2 n 2 1 \frac{3}{n^2-1} \times \frac{1}{3}+\frac{n^2-4}{n^2-1} \times \frac{1}{n^2-4} =\boxed {\frac{2}{n^2-1}} .

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 5 n 2 1 \frac{5}{n^2-1} 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 1 5 \frac{1}{5} . 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 6 n 2 1 \frac{n^2-6}{n^2-1} as there are n 2 6 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 1 n 2 6 \frac{1}{n^2-6} .

Thus, the total chance of succeeding is

5 n 2 1 × 1 5 + n 2 6 n 2 1 × 1 n 2 6 = 2 n 2 1 \frac{5}{n^2-1} \times \frac{1}{5}+\frac{n^2-6}{n^2-1} \times \frac{1}{n^2-6} =\boxed {\frac{2}{n^2-1}} .

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 8 n 2 1 \frac{8}{n^2-1} 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 1 8 \frac{1}{8} . 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 9 n 2 1 \frac{n^2-9}{n^2-1} as there are n 2 9 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 1 n 2 9 \frac{1}{n^2-9} .

Thus, the total chance of succeeding is

8 n 2 1 × 1 8 + n 2 9 n 2 1 × 1 n 2 9 = 2 n 2 1 \frac{8}{n^2-1} \times \frac{1}{8}+\frac{n^2-9}{n^2-1} \times \frac{1}{n^2-9} =\boxed {\frac{2}{n^2-1}} .

As the chance of hitting the mineless square with the second click is the same in all cases, the final answer is 2 n 2 1 \boxed {\frac{2}{n^2-1}} .

As a result, there is no 'best' first move?

William Nathanael Supriadi - 4 years, 6 months ago

Log in to reply

Exactly, any first move will have the same chance of succeeding.

Tarmo Taipale - 4 years, 6 months ago

Log in to reply

Love this problem. Keep it up!

William Nathanael Supriadi - 4 years, 6 months ago

Log in to reply

@William Nathanael Supriadi Thank you! :)

Tarmo Taipale - 4 years, 6 months ago

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.

Bert Seegmiller - 2 years, 9 months ago

Log in to reply

I have no idea how this works, would like to know.

Tarmo Taipale - 2 years, 9 months ago

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.

Jon King - 2 years, 7 months ago

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.

Tarmo Taipale - 2 years, 7 months ago
Carsten Meyer
Apr 23, 2020

Split the game into three parts and define the events A : = A:= "The mineless field is adjacent to the starting point", B : = B:= "Diana wins":

  1. Diana chooses a starting point with m m adjacent squares
  2. The game chooses a mineless field from the remaining n 2 1 n^2-1 squares and displays the number N { m , m 1 } N\in\{m,\:m-1\}
  3. Diana chooses a second square and either wins or looses

If N = m 1 N=m-1 , the mineless field is adjacent to the starting block and and if N = m 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 ) = 1 m m n 2 1 + 1 n 2 m 1 n 2 m 1 n 2 1 = 2 n 2 1 P(B)=P(B|A)P(A)+P(B|A^c)P(A^c)=\frac{1}{\cancel{m}}\cdot\frac{\cancel{m}}{n^2-1}+\frac{1}{\cancel{n^2-m-1}}\cdot\frac{\cancel{n^2-m-1}}{n^2-1}=\boxed{\frac{2}{n^2-1}}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...