Opentopia Directory Encyclopedia Tools

Minesweeper (computer game)

Encyclopedia : M : MI : MIN : 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 detonating a mine.

The game has been rewritten for many computer platforms and is most famous for the version that comes with Microsoft Windows.

A game of Minesweeper just getting started.
Enlarge
A game of Minesweeper just getting started.

A finished game.
Enlarge
A finished game.

Minesweeper's new look for Windows Vista Beta 2.
Enlarge
Minesweeper's new look for Windows Vista Beta 2.

MineSweeper3D is one of the many Minesweeper variants.
Enlarge
MineSweeper3D is one of the many Minesweeper variants.

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 amount 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; the game ends on such an action if the wrong squares were marked. 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: 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.

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 [link]. This tape even contains a 3D version of minesweeper. The author of this game, David Ahl [link] is a crucial figure in the early history of computer games.

Computer 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 8 × 8 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: 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 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.

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's 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.

Unsolvable without guessing

Minesweeper is not always solvable without guessing. For instance, in the following situation:

123211XXX113?3101?10_____
(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.

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

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 that it is easy to check whether a given arrangement of mines is consistent with 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:

2XXX312XaX5X24bdeX2XcX5X2XXX31
(As above X 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 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.

Measuring Board Difficulty

Beginner board with a 3BV of 16
Enlarge
Beginner board with a 3BV of 16

Beginner board with a 3BV of 6
Enlarge
Beginner board with a 3BV of 6

Intermediate board with a 3BV of 59
Enlarge
Intermediate board with a 3BV of 59

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.

The sum of the 3BV is the 3BV of the whole board.

3BV/s

3BV/s stands for 3BV per second.

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.

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 10 seconds and 1 second for the 8X8 Beginner board. The official record for Expert is 38 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 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[[Citing sources citation needed]].

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 ". 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).

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.

Alternatively, the timer can be stopped any time after it has started by pressing 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. This only works on Windows XP.

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.

Variations

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. There is also 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.

See also

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 in science Minesweeper strategies to get better times

    • [Advanced tactics] - Minesweeper page dedicated to explain how to handle guesses.
    Minesweeper Clones/Variants
    • [Minesweeper Clone] - Clone based on the original Minesweeper, giving enhanced version of it, with many new features (like video-recording). Custom sizes up to 49 X 49, but custom sizes are not available in legal mode.
    • [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 Arbiter] - extremely secure Minesweeper clone with video recording, custom board sizes, statistics, cheat options, and a detailed help file.
    • [Minesweeper X] - a third Minesweeper clone with a load of features, like recording engine, simple statistics and custom skins support.
    • [Hex Minesweeper] - Free Minesweeper with a hexagonal grid. Must flag mines; remembers high scores.
    • [Nonosweeper] - Popular variation of Minesweeper using nonograms. (freeware)
    • [Ivanche Minesweeper] - Good minesweeper clone with ability to scale window to any size and to select one of three font styles.
    • [MineSweeper Java Applet] - Play MineSweeper online.
    • [MineSweeper3D] - A 3D version of the game. (commercial, demo version available for download)
    • [3DMinesweeper] - Another 3D version of the game. (commercial, trial version available for download)
    • [Minesweeper 3D] - Yet another 3D version of the game. (open source, public domain)
    • [Crazy Minesweeper] - Interesting minesweeper with mines of different power and other useful features.
    • [XBomb] - Minesweeper for X11 with hexagonal and triangular grids.
    • [Ruckus Buck's Dangerous Mines] - Minesweeper game with 3 game modes, one that is played in rounds against the clock. Windows and MacOS X
    • [LuckySweeper] - LuckySweeper. You are "automatically" lucky in case you have to guess.
    • [Minesweeper] - Freeware Minesweeper game with different graphics than Windows.
    • [The Fastest, Best and Record Minesweeper Times] - Website with a minesweeper program which automatically uploads your scores for ranking.
    • [Mines-Perfect] - Minesweeper with autosolver, many different boards, murphys-law-mode and much more. (GNU General Public Licence)
    • [Braingle Pirate's Booty] - A twist on the game where instead of avoiding mines, you are trying to find treasures.
    • [Mines] - a GNOME implementation, part of the Gnome Games package.
    • [Crossmines] - Freeware, shaped cells, linked cells, holes, timed game, score tables, many setup options.
    • [Luminesweeper] - an implementation for Game Boy Advance
    • [Goobix Mines] - a Minesweeper clone playable online without additional downloads.
    • [Narkomania] - another version of minesweeper.
    • [Super Minesweeper] - version of minesweeper with 7 gameplay modes and many boards.
    • [Minimine] - miniature (small screen footprint) freeware clone of expert Minesweeper.
    • [Minesweeper Clones] - Six excellent Minesweeper clones that are graphically identical to the original. A few have additional features.
    • [XOMines] - a rational Minesweeper that leaves nothing to chance - fairware, evaluation version is free.
    • [KangarooIT Minesweeper] - Java Applet Windows 98 Minesweeper Clone - playable online (Beginner/Intermediate/Expert)
    • [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 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.
    • [Console Minesweeper] An ascii open-source version written in Visual Basic 2005, designed to be played using the Windows Console.
    • [Stellar Sweeper] - A Minesweeper variant with an outer space theme to it. Available only to Club Pogo members.

     


    From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
    All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

    Search Titles
    0123456789
    ABCDEFGHIJ
    KLMNOPQRST
    UVWXYZ?

    E-mail this article to:

    Personal Message: