Game Development Reference
In-Depth Information
Figure 4.8
Our new rule has three safe moves.
Now run the game. It may be hard to find places where the new rule has moves.
Figure 4.8 shows a game example where it can fire.
The lone revealed 1 square can get help from the revealed 1 square two columns
to the left. The common blank squares hold all the mines the lone square needs to
place, making the three private squares safe moves. The thinking output is from a
prior move and can be ignored. After right-clicking the lone square in Figure 4.8,
we get Figure 4.9.
In Figure 4.9, the thinking output is current, and we see that our new rule fired.
The first two rules we implemented demolish most of a Minesweeper game. This
third rule keeps the AI from getting stuck. I risked clicking the tile with the lone 1
in Figure 4.8 precisely to take advantage of the power of the new rule. This rule
gives the ability to make guesses productive . The rule did not change the risk of
clicking a random blank tile, but it clearly improves the reward of clicking tiles
just past the perimeter.
Do We Need More Rules?
As shown in Figure 4.10, the AI still gets stuck sometimes when there are
deterministic moves. Find the pair of 1 squares at the bottom of the group of four
Search Nedrilad ::

Custom Search