Minesweeper (video game)
This article or section appears to contradict itself. |
Minesweeper is a relatively simple and common single-player computer game. Its invention is often credited to a computer programmer named Robert Donner in 1989. The object of the game is to clear a minefield without detonating a mine.
The game has been rewritten for many computer platforms and was also available for the Game Boy portable console. It is most famous for the version that comes with Microsoft Windows.
The game screen consists of a rectangular field of squares. Each square can be cleared, or uncovered, by clicking on it. If a square that contains a mine is clicked, the game is over. If the square does not contain a mine, one of two things can happen: (1) A number appears indicating the number of adjacent (including diagonally-adjacent) squares containing mines, or (2) no number appears; in which case the game automatically clears those squares adjacent to the empty square (since they cannot contain mines). The game is won when all squares that do not contain a mine are cleared.
The player can optionally mark any square believed to contain a mine with a flag, by right-clicking. In some implementations, middle clicking (or clicking both mouse buttons) on a number having as many adjacent flags as the value of the number reveals all the unmarked squares neighboring the number; however, one forfeits the game should the flags be placed in error. This method is a very useful tool when trying to beat a high score. Some of those implementations also allow the player to move the mouse with the right mouse-button held down after marking mines; the player can then left-click on multiple numbered squares while dragging with the right mouse-button, in order to clear large areas in a short time.
Most implementations of minesweeper "cheat" in favor of the player by never placing a mine on the first square clicked; some also change the board so there are no 50-50 guess situations.
History
A lesser known game called Relentless Logic (or RLogic for short) by Conway, Hong, and Smith, was available for MS-DOS as early as 1985. In RLogic, the player is a private in the United States Marine Corps, delivering an important message to the U.S. Command Center. RLogic and Minesweeper are similar in concept, but a number of differences exist:
- In RLogic, the player must navigate through the minefield, from the top left corner to the bottom right corner (Command Center).
- It is not necessary to find all of the mines. Consequently, there is no mechanism for marking mines or counting the number of mines found.
- The number of steps taken is counted. Although no high score functionality is included, players could attempt to beat their personal best score for a given number of mines.
- Unlike Minesweeper, the size of the minefield is fixed. However, the player may still specify the number of mines.
Because the player must navigate through the minefield, it is sometimes impossible to win (without taking any risks) — namely, when the mines block all possible paths.
The connection between RLogic and Donner's Minesweeper is unclear. RLogic is undeniably the earlier game, but due to the simplicity of the concept, the similarities are quite possibly a coincidence. Relentless Logic has become virtually unknown whereas Minesweeper has remained popular.
However, Robert Donner is not the only person credited for the invention of Minesweeper. A version of the game was available on a Tektronix 4051 around 1981, but the tradition of passing around a 'games tape' goes back to at least 1973 [1]. This tape even contains a 3D version of minesweeper. The author of this game, David Ahl [2] is a crucial figure in the early history of computer games.
Game analysis
Patterns
Naturally, there are many patterns that may arise during a game that can be recognized for their one possible solution. In the interest of finishing quickly, it is often easiest to process the known patterns first, and continue on with the uncertain parts later. This is especially important if a guess is required (see below), because if the guess fails, all efforts spent on other parts of the board will be lost.
For an example, the number one placed against a corner of a rectangular group of blocks indicates that the single square is a mine. This is by far the easiest pattern to recognize, though many more can be deduced with time.
In the advanced levels, a user may occasionally find the number eight when revealing a square. In this case, all of the surrounding squares contain mines.
The number three placed against a flat "wall" (often surrounded by twos) indicates three mines in a row, with the center being at the number three.
In a wall (no mines next to the side opposite the wall), where a two is beside a one, there will be a mine by the corner of the two that is away from the one. Many longer patterns can be derived from this one, including some of the following.
In a wall where a two appears between ones, the center square can be opened to find a number, and the two squares touching the ones will contain the two mines indicated by the two. The reason this makes sense is because if the mine were to be placed over the center square, you could not find any other mines adjacent to the "two" square because then one of the "one" squares would be touching two mines. This may not be true, however, if the numbers adjacent to either of the ones are numbered three or higher; nevertheless, on open walls of cells, the pattern holds.
Where there is a row of twos by a wall, four twos with ones at the ends means that the mines are beside the two middle twos, and beside the ones adjacent to the twos; five twos in the same setting means that all twos except the centermost two are beside mines. These patterns are like extended versions of the patterns where one or two twos appear between ones, and the mines are located by the same principles as with those shorter patterns.
Two twos on a wall of cells which intersects a border of the minefield guarantee that the cell on the border, and the next one down the wall, are mines; this is because it is the only possible way for the two on the border to have two adjacent mines.
Two ones on a wall of cells which intersects a border of the minefield guarantee that the third cell from the border is clear; this is because exactly one of the first two cells must be a mine, which satisfies the second one.
In a wall of ones where one cell beside the wall has been cleared to reveal a one, the three cells on the far side of the cleared cell are also clear; this is because one of cells adjacent to both the wall and the cleared cell must be a mine, which satisfies the one in the cleared cell.
Not always solvable without guessing
Minesweeper is not always solvable without guessing. For instance, in the following situation:
( represents a mine, and the numbers are the standard Minesweeper numbers. The position is at the bottom of the board.)
The player must guess which of the two squares marked with a ? is a mine.
Another apparent instance of required guessing is when an unclicked square is completely surrounded by either (1) mines, or (2) a combination of mines and the perimeter of the game window (the second option being much more common). In this case, since no numbers touch the unclicked square, a player has no information about the likelihood of the unclicked square being a bomb. However, there is still a good strategy when facing this situation that will allow to player to avoid simple guessing: simply play the rest of the game and ignore this square. If the spot is in fact a bomb, it will be automatically flagged when all other squares in the game window have been either clicked or flagged by the player. If the spot is not a bomb, it will not be automatically flagged, and the player will be able to safely click it in the knowledge that it is not a bomb.
A few variants specifically focus on getting this aspect out of the game. At the simplest level, some programs give the solution away any time a guess is needed. Another one furthered the design and demands that the player decides if he or she has to guess or not. The resulting problem is always decidable (within an extended mathematical space). Yet another simply lets any guess the user makes (when they have to) automatically be the correct one.
NP-completeness
Because of Minesweeper's relation to mathematics, it is mentioned in the Clay Mathematics Institute's unofficial description of one of the Millennium Prize Problems, namely that as to whether complexity class P equals that of NP: the P versus NP problem. In 2000, a paper detailing the proof that Minesweeper is NP-complete was published [3].
Mine probabilities are not enough
If "playing Minesweeper perfectly" means finding a strategy that ensures the best probability of solving a random board, then there is more to playing perfectly than just choosing squares with lowest mines probabilities. Let's examine the following situation:
( represents a mine, and the numbers are the standard Minesweeper numbers; a, b, c, d and e are the unknown positions. The other spaces/mines on the board are insignificant.)
There is ⅔ probability of a mine on a, b, or c and ½ probability of mine on d or e; this can be derived by computing the 6 possibilities of mine placement on a+b+c+d+e. But playing d or e will give you no useful information: if you don't step on a mine, you'll see a 6 appear under e, or a 5 appear under d. Overall, playing d or e will let you solve the area in only 1 of the 6 possible cases. If you play a (or b or c) and you don't die, you'll immediately know whether there is a mine on d or not; overall you'll solve the area in 2 of the 6 possible cases. So the moves a, b, or c, with the highest immediate danger, turn out to be the best in the long run.
Measuring board difficulty
The difficulty of a given minesweeper board is often measured using the 3BV measure (abbreviated from Bechtel's Board Benchmark Value).
History of 3BV
Stephan Bechtel is supposedly the first person to count the minimum number of left clicks that are needed to solve a Minesweeper board. In June 2002, he wrote about this method in the official Minesweeper guestbook. Soon thereafter, Benny Benjamin coined the term 3BV to describe this method. During the next two months, Yoni Roll and Benny Benjamin programmed a tool named "Minesweeper Board Reader", which analyzes screenshots of Minesweeper boards and as a result shows the 3BV of that board.
In 2003, Sorin Manea developed a program that records Minesweeper games, and displays the board's 3BV as well as the number of clicks. That was the first program that calculated the 3BV/s (3BV per second speed) of the played game.
In 2004, Rodrigo Silveira Camargo published "Minesweeper Clone" with many 3BV-related features, like playing boards with a prefixed 3BV, ability to select the range of 3BV on the generated board and the main — it saved all the 3BV statistics of finished games in a single file. Due to an easier way to represent the gaming history, the distribution of boards with a certain 3BV (for finished games only) could be analyzed. Also, there were programs which could show 3BV distribution tables for generated boards.
Method
The 3BV of a board names the minimum number of left clicks required to open up all squares without a mine of a Minesweeper field.
- Each opening of a board counts as 1 3BV (white dots on the pictures).
- Each square without a mine but a number which is not a border (white lines) of an opening counts as 1 3BV (green dots on the pictures).
The sum of the 3BV is the 3BV of the whole board.
3BV/s
3BV/s stands for 3BV per second.
- Formula: 3BV/s = 3BV ⁄ (time−1)
Thus, for example, if a Minesweeper board with a 3BV of 16 is finished in 9 seconds, the 3BV/s is 16⁄(9−1) = 2.
Because the time that is needed to finish a Minesweeper board depends highly on the difficulty of the board, it may not be the best way to compare records. 3BV/s on the other hand does consider the difficulty of the Minesweeper board as well as the time needed to finish it. Among the best Minesweeper players, 3BV/s records are not nearly as important as time records, but they give a picture of how fast someone can play with regard to mouse-handling.
If flags are marked, it is possible to require fewer clicks than the 3BV of the respective board. Using only left clicks is called non-flagging (nf) whereas marking mines with right-clicks is called flagging-style.
Windows implementations
In the popular Microsoft Windows version, there are three sizes:
- Beginner: 9 × 9 field with 10 mines
- Intermediate: 16 × 16 field with 40 mines
- Expert: 30 × 16 field with 99 mines.
- Custom: Any values from 9 × 9 to 30 × 24 field, with 10 to 667 mines [the maximum number of mines allowed for a field of size A × B is (A-1) × (B-1)].
Newer versions of Windows (from Windows 2000 onwards) feature a 9 x 9 Beginner field instead of an 8 x 8, with the same number of mines. This was apparently because with the previous dimensions, the chances of clicking on a mine were the same for Intermediate and Beginner:
- 8 × 8 = 64 squares, 10 mines / 64 squares = 15.625% chance of hitting a mine
- 16 × 16 = 256, 40 mines / 256 squares = 15.625% chance of hitting a mine
In fact, when you allow for the starting square never containing a mine, there was a slightly higher chance of randomly hitting a mine in one move of the Beginner game. However, the Beginner game was still easier because it had fewer total chances of hitting a mine, and a smaller chance of having a problem that cannot be solved without guessing.
Alternatively, it could have been changed because controls had been increased in size in later Windows versions, thus allowing nine boxes to fit in a row of width equal to the title and score bars.
Another alternative: The beginner field is now solvable without guessing if a straight row of numbers with an opening on one side and unknown squares on the other side appears.
In 2003, Microsoft added a variation of the original Minesweeper, called Minesweeper Flags in MSN Messenger (from version 6 onwards). This game is played against an opponent, and the objective of this game is to find the mines by actually clicking on the squares where they're located, not by clicking the surrounding squares. The person who first uncovers 26 (out of 51) mines wins.
Cheat codes
Some Windows versions of Minesweeper have a cheat mode that uses the top-left pixel of the display to signal the presence or absence of a mine under the cursor. Start Minesweeper normally. When it has loaded, type "xyzzy <ENTER> <SHIFT>". After doing this, the screen's top-left pixel will be white when the mouse pointer is on a square without a mine, and black when the pointer is on a square with a mine. This code works in Microsoft Windows 3.1, Windows for Workgroups 3.11, Windows NT 3.51, Windows 2000 and Windows XP. In Windows 95, Windows 98 and Windows NT 4.0, the pixel is only visible if the standard Explorer desktop is not running. Note that it is the SCREEN, not the top of the Minesweeper application. In Windows XP, it is necessary to click at least one square before the pixel accurately reports mine placement.
In some Windows versions, the file "winmine.ini" contains the high score table data. Editing this file changes the high score table accordingly, and can be used to falsify "high scores". This does not work on Windows XP.
In the most recent Windows version of Minesweeper, the high scores list has been moved into the registry (HKEY_CURRENT_USER\Software\Microsoft\winmine). One can forge "high scores" by using a registry editor to access the highscore name and time files and change the data in them.
Another cheat code can be used to stop the timer. After the timer has started hold down both the right and left button on the cursor and press escape (ESC). This does not work on Windows XP. (In the Windows 2000 version, pressing the ESC key alone after the game has started will stop the timer.)
Alternatively, the timer can be stopped any time after it has started by pressing <Windows Key + D> to minimize the Minesweeper application, then immediately restoring it and selecting an unexplored tile. The timer will then remain frozen for the remainder of the current game.
The timer may also be stopped by clicking and holding the smiley face at the top of the minefield. Note that in order for this to work without simply causing a new game to start, you must move the pointer off of the face before releasing the mouse button.
Another way to win the game easily is to set the game difficulty to "custom", then enter 100 and 100 for the number of squares on the grid. The number of bombs should remain at 10. After this is done, clicking any square will give a result that allows you to almost instantly win the game, and there are cases where the game can be won on the first click.
Linux implementations
KDE
This section needs expansion. You can help by adding to it. |
Kmines, in the official release, for KDE. Originally created in 1996 by Nicolas Hadacek.
Developer(s) | Nicolas Hadacek |
---|---|
Stable release | 2.1.9
/ August 5, 2004 |
Operating system | Unix-like |
Type | Personal computer game |
License | GPL |
Website | kmines.sourceforge.net |
GNOME
Mines, in the official release.
Best times
On the Windows version, for Expert, a time under 85 seconds in Windows 2000 (and under 80 seconds in Windows 3.1) is considered to be very good. The official record for Intermediate is 9 seconds (Jake Warner, United States) and 1 second (many players) for the 9x9 Beginner board. The official record for Expert is 38 seconds (Dion Tiu, Australia). (Note that the timer instantly goes to 1 on the first click, rather than after a second.) Many people publish screenshots or video recordings of their best performances. The Minesweeper Community has compiled a bestever-list which includes videos of the fastest games ever played. In order to get on that list your records on beginner, intermediate and expert must sum up to no more than 99 (sub100).
The odds for winning Beginner (9x9 board) in a single click are as follows. Out of 127,800,681 games played in a row, by clicking in the corner, and seeing if all the squares get uncovered at once, 1,519 won on the first click. This gives an approximately 0.00119% chance of winning instantly, by clicking in the corner. In 6,713,134 games, clicking in the middle, 39 won on first click, giving only an approximately 0.00058% chance of winning instantly. In 10,839,687 games, clicking in the middle of an edge, 103 won on first click, giving an approximately 0.00095% chance of winning instantly. This could be more precisely calculated using combinatorial mathematics rather than statistics.
Examples of the classic game
There are several implementations of the game in its classic form. Here are some examples:
-
Minesweeper running in Windows XP
-
Minesweeper utilising the .NET Framework 3.0 for updated graphics and running on Windows Vista
-
Minesweeper in Firefox
-
GNOME Mines
-
The Ace of Penguins
-
XBomb
-
xdémineur (Look-alike clone of Microsoft version)
Variants
There are variations of Minesweeper available for download at various places on the Internet. These are generally differently shaped minefields in two and three dimensions, or various 2D layouts (such as triangular or hexagonal grids). For example, X11-based XBomb adds triangular and hexagonal grids, and Professional Minesweeper for Windows includes these and many others.
- There is a game called "Nonosweeper," which applies Minesweeper-style graphics to a nonogram game. It shows a grid with groupings of numbers on the right side and bottom side. These numbers indicate clusters of mines. An example might be 2 1 2 3, denoting that there are clusters of 2, 1, 2, and 3 mines each separated by at least one empty space.
- MineSweeper3D is a 3D version of the classic Minesweeper. The rules are the same, but the game takes place on the surface of a three-dimensional model rather than on a flat grid.
Examples of variants
-
A game on a surface of a truncated cuboctahedron
-
3D version
-
A game with hexagonal tiles
-
A game with triangular tiles
-
An ASCII version (played with the keyboard)
-
This is another variant.
External links
Minesweeper community
- Planet Minesweeper - Comprehensive online resource for Minesweeper. Contains tips and advice, official bestever-list, many statistics and records, videos, cheats, links, downloads, active forum...
- RSS Feed- containing all the new records of the Community.
- The Authoritative Minesweeper - Unofficial Home of the Minesweeper Community.
- Minesweeper Guestbook - Very popular guestbook for friends of Minesweeper. It is part of the Authoritative Minesweeper page.
- rilian net - forum-based site contains full information about the Minesweeper game. Tips, game strategies and research articles, contests tables, Minesweeper emulators and tools to download, polls, links to other Minesweeper community sites. (rebuilding)
- Minesweeper Active Ranking Page - Biweekly Score Submission and Ranking - Feel free to join
- IRC-Chatroom for Minesweeper - irc.initialized.org port:6667 and join channel #minesweeper
- Minesweeper Tournaments - International Minesweeper Tournaments and more
- Minesweeper Live - play a head-to-head networked Minesweeper game online
- Clearing the Mines - Video compilation of extremely fast solvers of minesweeper
- Minesweeper YouTube Videos - A youtube channel devoted to minesweeper videos. Many of the best times ever made are featured.
Minesweeper in science
- Ian Stewart on Minesweeper - Article by a lecturer in pure mathematics.
- Richard Kaye's Minesweeper Pages - Proof of NP-completeness.
- Martin HEINRICH's Minesweeper Page - Complexity and Variants
Minesweeper strategies to get better times
- Advanced tactics - Minesweeper page dedicated to explain how to handle guesses.
Minesweeper variants
3D variants
- MineSweeper3D
- [4]
- 3DMinesweeper - Another 3D version of the game. (commercial, trial version available for download)
- Mines3D - A 3D version of the game. (commercial, demo version available for download)
- Minesweeper 3D - Yet another 3D version of the game. (open source, public domain)
Hexagonal variants
- Dokidoki Idol Star Seeker - Hexagonal Minesweeper variant by Japanese game developer G.rev, released for arcades and later ported to the Sega Dreamcast. The original had arcade-style stick controls, and the Dreamcast port supported the Mouse peripheral.
- Hex Minesweeper - Free Minesweeper with a hexagonal grid. Must flag mines; remembers high scores.
- Hexa-MineSweeper - Online Flash app Minesweeper with a hexagonal grid. 5Levels Max 210 mines.
Unusual tile-size variants
- Super Minesweeper - version of minesweeper with 7 gameplay modes and many boards.
- XBomb - Minesweeper for X11 with hexagonal and triangular grids.
Logical variants
- Logic Minesweeper - Logical game where few numbers are revealed in the beginning in such a way that it is logically possible to solve the puzzle.
- Minesweeper clone in Simon Tatham's Portable Puzzle Collection which deliberately generates the mine layout in such a way that the player never has to guess. (Open source, MIT license)
- Minesweeper Infinity - A free clone which will never give you an unsolvable board. For windows and linux.
- Nonosweeper - Popular variation of Minesweeper using nonograms. (freeware)
- XOMines - a rational Minesweeper that leaves nothing to chance - fairware, evaluation version is free.
Others
- Minesweeper Risk Game online variant with calculated risk, as clues are vertical, horizontal and diagonal totals.
- Novel Mines Freeware version with five variants. An example of the Dodec variant can be seen at the top of this article.
- Braingle Pirate's Booty - A twist on the game where instead of avoiding mines, you are trying to find treasures.
- Crazy Minesweeper - Interesting minesweeper with mines of different power and other useful features.
- Crossmines - Freeware, shaped cells, linked cells, holes, timed game, score tables, many setup options.