Time: s
Are you want reset board?
What is Minesweeper?
Minesweeper is a single-player puzzle game available on several operating systems and GUIs. At the start of a game, the player receives an n × m rectangular grid of covered squares or cells. Each turn, the player may probe or uncover a square revealing either a mine or an integer. This integer represents the number of mines adjacent to that particular square. As such, the number on a cell ranges from 0 to 8 since a cell cannot have more than eight neighbors. Figure 2.1 provides a simple example of a numbered square and its covered neighbors. The game ends when the player probes a cell containing a mine. The objective of the game is to uncover every square that does not contain a mine.
An example of a numbered square
Figure 2.1: An example of a numbered square. The 3 indicates that exactly three of the eight neighboring squares contain a mine.
Playing Minesweeper involves a fair amount of logic. A clever player will use the numbered cells to deduce the location of mines. For assistance, most implementations of Minesweeper allow the player to mark or flag possible mine locations. However, this is simply for bookkeeping as the game does not validate any flagged squares. Higher difficulties of Minesweeper involve a greater degree of deductive reasoning as the mine density (number of mines over number of cells) increases. Oftentimes, mines cannot be deterministically located, and so the player must resort to guessing. As a player, guessing may seem frustrating; however, as this paper will explore, guessing leads to interesting challenges when designing a Minesweeper solver.
Two squares flagged by the player
Figure 2.2: Two squares flagged by the player. Note: uncovered squares with a value of 0 are grayed out in this particular version of Minesweeper. Blue squares represent covered cells.
There are three difficulty levels for Minesweeper: beginner, intermediate, and expert. Beginner has a total of ten mines and the board size is either 8 × 8, 9 × 9, or 10 × 10. Intermediate has 40 mines and also varies in size between 13 × 15 and 16 × 16. Finally, expert has 99 mines and is always 16 × 30 (or 30 × 16). Typically in beginner, guessing is rarely necessary. The numbers on squares tend to stay in the ones and twos with the occasional three. As the difficulty increases, guessing becomes more common with expert configurations having numerous instances of guessing. Furthermore, higher numbered cells are more prevalent; however eights or sevens are still uncommon.
How to play Minesweeper?
Minesweeper is a game where mines are hidden in a grid of squares. Safe squares have numbers telling you how many mines touch the square. You can use the number clues to solve the game by opening all of the safe squares. If you click on a mine you lose the game!
Windows Minesweeper always makes the first click safe. You open squares with the left mouse button and put flags on mines with the right mouse button. Pressing the right mouse button again changes your flag into a questionmark. When you open a square that does not touch any mines, it will be empty and the adjacent squares will automatically open in all directions until reaching squares that contain numbers. A common strategy for starting games is to randomly click until you get a big opening with lots of numbers.
If you flag all of the mines touching a number, chording on the number opens the remaining squares. Chording is when you press both mouse buttons at the same time. This can save you a lot of work! However, if you place the correct number of flags on the wrong squares, chording will explode the mines.