Minesweeper (computer game)
|
Minesweeper is a single-player computer game invented by Robert Donner in 1989. The object of the game is to clear a minefield without exposing a mine.
The game has been rewritten for many computer platforms and is most famous for the version that comes with Microsoft Windows.
Minesweeper_start.PNG
Minesweeper_end.PNG
Contents |
Rules
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 contained a mine is clicked upon, the game is over. If the square did not contain a mine, one of two things can happen. A number could appear indicating the amount of adjacent (including diagonally-adjacent) squares containing mines. Or no number appears, in which case the game automatically clears those squares adjacent to the empty square (since they could not 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; the game ends on such an action if a mine is revealed.
Most implementations of minesweeper "cheat" in favour of the player by never placing a mine on the the first square clicked; some also change the board so there are no 50-50 guess situations.
History
A lesser known game known as 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 United States Marine Corps marine private, 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 — 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.
Clearly the game is older than this, though. There was a version on a Tektronix 4051 around 1981, but the tradition of passing around a 'games tape' goes back to at least 1973 (http://pdp-11.trailing-edge.com/rsts11/rsts-11-013/). This tape even contains a 3D version of minesweeper. The author of this game, David Ahl (http://ed-thelen.org/comp-hist/TheCompMusRep/TCMR-V22.html) is a crucial figure in the early history of computer games.
Computer implementations
In the popular Microsoft Windows version, there are three sizes:
- Beginner: 8 x 8 field with 10 mines
- Intermediate: 16 x 16 field with 40 mines
- Expert 30 x 16 field with 99 mines.
Newer versions of Windows (from Windows 2000 onwards) feature a 9 x 9 Beginner field instead of a 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:
8x8=64, 10/64
16x16=256, 40/256 = 10/64
Alternatively it could have been changed because controls had been increased 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.
3D versions of the game are also available; one is called MineSweeper3D. Some versions of minesweeper also feature different 2D layouts. For example, X11-based XBomb adds triangular and hexagonal grids, and Professional Minesweeper for Windows includes these and many others.
A version of the game was also available for the Game Boy portable console.
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 has uncovered the most mines when the game is over, which happens when all mines are uncovered or the game is quit for any reason, has won.
Elements of analysis of the game
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 patterns that are certain first, and continue on with the uncertain parts later.
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.
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 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.
Not always solvable without guessing
Minesweeper is not always solvable without guessing. For instance, in the following situation:
- Missing image
MinesweeperGuess.png
123211XXX113?3101?10_____
(Missing image
MinesweeperMine.png
X
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.
NP-completeness
The following is an interesting problem: given a board position with the numbers, is it valid? In other words, is there some way that the mines could be arranged in the hidden squares that would be consistent with those numbers? This problem is known to be NP-complete. That means it is easy to check that a particular arrangement of mines corresponds to the given numbers, but it is probably hard to find such an arrangement of mines, in some cases. This might mean that it's sometimes hard to play Minesweeper perfectly.
Because of Minesweeper's relation to mathematics here, it is mentioned in the Clay Mathematics Institute's unofficial description of one of the Millennium Prize problems, namely whether complexity class P equals NP.
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:
(As above Missing image
MinesweeperMine.png
X
represents a mine, and the numbers are the standard Minesweeper numbers; a, b, c, d and e are the unknown positions.)
There is 2/3 probability of mine on a, b or c and 1/2 probability of mine on d, e; you can see that by computing the 6 possibilities of mine placement on a+b+c+d+e. But playing d or e will bring 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 c with the highest immediate danger turn out to be the best in the long run.
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 11 seconds and 1 second for the 8X8 Beginner board. The official record for Expert is 39 seconds. (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 odds for winning Beginner (9x9 board) in a single second 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, by clicking in the middle. 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, by clicking in the middle of an edge. Of course this could be more precisely calculated by using combinatory mathematics rather than statistics.
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-ENTER>". 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.
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).
External links
- Minesweeper (http://www.planet-minesweeper.com/) - Comprehensive online resource for Minesweeper. Contains tips and advice, official world rankings, many statistics and records, videos, cheats, links, downloads, active forum...
- Minesweeper Clones (http://netfiles.freespaces.com/remakes.htm) - Six excellent Minesweeper clones that are graphically identical to the original. A few have additional features.
- Ivanche Minesweeper (http://www.ivanche.com/games.html) - Good minesweeper clone with ability to scale window to any size and to select one of three type of number appeareance.
- MineSweeper Java Applet (http://www.reed.edu/~mcphailb/applets/jmine2/) - Play MineSweeper online.
- MineSweeper3D (http://www.software3d.com/Mines3D/) - A 3D version of the game. (commercial, demo version available for download)
- 3DMinesweeper (http://www.shpits.com/ShpitsMedia/3dminesweeper.html) - Another 3D version of the game. (commercial, trial version available for download)
- Minesweeper 3D (http://www.xs4all.nl/~weegen/Minesweeper3D) - Yet another 3D version of the game. (open source, public domain)
- Crazy Minesweeper (http://www.astatix.com/crazyminesweeper.php) - Interesting minesweeper with mines of different power and other useful features.
- Minesweeper Active Ranking Page (http://www.active-ranking.de.vu/) - Biweekly Score Submission and Ranking
- The Authoritative Minesweeper (http://metanoodle.com/minesweeper/) - Unofficial Home for the Minesweeper Community
- Professional Minesweeper (http://granzeau.com/~gonzo/profmine/) - Minesweeper with a great variety of grids.
- XBomb (http://www.gedanken.demon.co.uk/xbomb/) - Minesweeper for X11 with hexagonal and triangular grids.
- Richard Kaye's Minesweeper Pages (http://web.mat.bham.ac.uk/R.W.Kaye/minesw/ordmsw.htm) - Proof of NP-completeness.
- Ruckus Buck's Dangerous Mines (http://www.dangerousmines.com) - Minesweeper game with 3 game modes, one that is played in rounds against the clock. Windows and MacOS X
- LuckySweeper (http://www.jsingler.de/java-applets/luckysweeper/index.php) - LuckySweeper. You are "automatically" lucky in case you have to guess.
- Minesweeper (http://www.numberonefree.com) - #1Free Minesweeper is Freeware Minesweeper game thats a looks a lot better than the one that came with windows.
- Ian Stewart on Minesweeper (http://www.claymath.org/Popular_Lectures/Minesweeper/) - Article by a lecturer in pure mathematics.
- The Fastest, Best and Record Minesweeper Times (http://www.minesweepers.org/) - The Web Site for Minesweeper times. Simple and secure.
- Mines-Perfect (http://www.czeppi.de/english/) - Minesweeper with autosolver, many different boards, murphys-law-mode and much more.
- Braingle Pirate's Booty (http://www.braingle.com/games/booty/index.php) - A twist on the game where instead of avoiding mines, you are trying to find treasures.
- KMines (http://kmines.sourceforge.net/) - a KDE implementation
- Crossmines (http://www.johnvalentine.co.uk/k00006.html) - Freeware, shaped cells, linked cells, holes, timed game, score tables, many setup options.
- Luminesweeper (http://pinocchio.jk0.org/lu/) - an implementation for Game Boy Advance
- Minesweeper Clone (http://www.geocities.com/minesweeperclone/) - Clone based on the original Minesweeper, giving enhanced version of it, with many new features that can make the gameplay more interesting, sophisticated and reliable for any player level. Most of best players are currently using it.
de:Minesweeper es:Buscaminas fr:Démineur (jeu) he:שולה המוקשים (משחק) sv:MS Röj