Game Development Reference

In-Depth Information

Figure 7.3

Starting in the corner does not produce a good second move.

the player is stuck making numerous risky moves to clear out an area big enough

to yield deterministic moves. The problem with a middle first move is that most

of the time, it gives a long series of poor follow-up moves.

A Corner First Move

There is a 0.793
3
chance that a corner has no mines in the three surrounding

squares. This computes to a 50 percent chance to get three squares, for an average

yield of 1.50 squares, so it is better than the middle as a first move by itself. But as

shown in Figure 7.3, the other half of the time it leaves the player with at least one

mine to place in three squares for a typical chance of failure on the second move

of 33.3 percent or worse. The corner is a good place for generating deterministic

moves, but playing the corner as a first move leads to a risky second move when

better alternatives are available.

An Edge First Move

There is a 0.793
5
chance that a general edge square has no mines around it in

the five surrounding squares. This is a 31.4 percent chance to get five squares, for

an average yield of 1.57 squares, making it the best first move so far. The other

68 percent of the time, the player has one or more mines nearby, typically one or

two. A second move away from the edge, if successful, can yield deterministic

moves. How risky is that second move? It has a risk of 20 percent times the

number revealed by the first square. Twenty percent is slightly lower than the

20.7 percent risk of a random move, so if a 1 was revealed, the edge gives safer

moves than any random guess. If a 2 or higher was revealed, the surrounding

squares are more risky than a random guess. The edge is superior to a corner,

with higher initial yield on the first move and lower risk on the second move.

One Square Away from an Edge

With eight surrounding squares, this kind of first move has the same initial yield

of 1.26 squares that a move to the middle has if the player gets lucky. As shown in