Minesweeper (computer game)



Minesweeper is a single-player computer game. The object of the game is to clear an abstract minefield without detonating a mine. The game has been rewritten for nearly every system platform in use today. The most well-known version comes bundled with later versions of Microsoft Windows.

Overview

When the game is started, the player is presented by a grid of blank squares. The size of the grid is dependent on the skill level chosen by the player, with higher skill levels having larger grids. If the player clicks on a square without a mine, a digit is revealed in that square, the digit indicating the number of adjacent squares (typically, out of the possible 8) which contain mines. By using logic, players can in many instances use this information to deduce that certain other squares are mine-free (or mine-filled), and proceed to click on additional squares to clear them or mark them with flag graphics to indicate the presence of a mine.

The player can place a flag graphic on any square believed to contain a mine by right-clicking on the square. Right-clicking on a square that is flagged will change the flag graphic into a question mark to indicate that the square may or may not contain a mine. Right-clicking on a square marked with a question mark will set the square back to its original state. Squares marked with a flag cannot be cleared by left-clicking on them, though question marks can be cleared as easily as normal squares. The third question mark state is often deemed unnecessary and can be disabled so that right clicking on a flagged mine will set it back to its original state right away so mines flagged in error can be corrected with one right-click instead of two.

Clicking the left and right buttons at the same time 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. As an alternative to clicking both buttons at the same time players can also middle-click or shift-click on fully-flagged numbers.

Some 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 the solution does not require guessing.

History

Gambling game

The earliest form of Minesweeper was a gambling game that was briefly popular during the 1950s. The player would buy a punchboard, which was made of paper and cardboard. The top layer was cardboard with a square lattice of holes, each of which corresponded to one of the buttons in the present-day Minesweeper game. The holes were blocked by a layer of paper underneath. The player could choose to punch the paper through any hole, and would then see what was printed on a third layer of cardboard underneath that hole. It revealed color-coded information equivalent to that which Minesweeper reveals from a button-click. If the player succeeded in punching a sufficient number of holes without punching a mined hole, he/she could return the board to the manufacturer for a prize.

These punchboards were sold in restaurants and bars, and probably made the manufacturer an enormous fortune before they became illegal. A familiar sound in a restaurant at that time was the wood-pecker sound of holes being punched at a rapid rate (usually with very little time for thought), which ended suddenly with a loud, vulgar shout.

Computer game

The earliest known ancestor of Minesweeper as a computer game is Cube, found in the PDP-11 program library catalogue and credited only as "CONVERTED TO RSTS/E BY DAVID AHL, DIGITAL" [1] (referring to David H. Ahl). Cube was played in a 3x3x3 cube with 5 mines, where the player had to find their way from one corner (1,1,1) to the opposite corner (3,3,3). The player entered the co-ordinates of the next square they wished to explore. If the target was more than one square away or there was a mine there, the player lost. No information about the number of surrounding mines was given.

The basic gameplay style became a popular but minor part of the puzzle game genre during the 1980s, with such titles as Mined-Out (Quicksilva, 1983), and Yomp (Virgin Interactive, 1983). Cube was further succeeded by Relentless Logic (or RLogic for short), by Conway, Hong, and Smith, which 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 is more similar to Minesweeper than to Cube 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 (the Command Center).
  • It is not necessary to clear all non-mine squares. Also, 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.

Game analysis

Patterns and solving

There are many patterns of numbered squares that may arise during a game that can be recognized as allowing only one possible configuration of mines in their vicinity. In the interest of finishing quickly, it is often easiest to process the known patterns first, and continue on with the uncertain parts later. There are a few broad methods for solving problems in minesweeper games without guessing.

1. Single-square analysis

When the number of unopened squares around a numbered square is equal to the number of the square, all the squares adjacent to it must be mines. Conversely, if a square has known adjacent mines equal to its number, any other squares adjacent are not mines and are safe. In Programmer's Minesweeper,[2] this is called "single point strategy".

2. Double-square analysis

With two numbers on the minefield, say an x and a y, there exist 3 distinct areas: a) mines near both x and y, b) mines near x only, and c) mines near y only. This method of solving works best for adjacent x and y, but it can be used in many situations. In this example the number of mines in b minus the number of mines in c must be equal to x-y, which can be used to clear squares or find mines in many situations. This covers many types of solving not solvable using single square analysis alone, like wall-1-1, 1-2-1, 1-4 etc.

Examples:
  • 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 two which is in the center 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.
  • 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.
  • A three in the corner indicates all squares touching it are mines

3. Shared-mine analysis

Basic example: The board has a 1. It can be found some other way that two of the squares around that 1 share a mine. That means all the other squares around the 1 except those two are safe and can be cleared.

More advanced examples of that involve a number of flagged mines around that number, having (for example) 2 mines shared by 3 cells being analysed, and "compound shared mine analysis", where you try this analysis, but all you can discover is that another set of squares share one or more mines, and you use that information to find out things about yet more other cells.

Example: When you have a 1 next to a wall and another 1 one square away perpendicular from the wall, all squares that aren't adjacent to the first 1 are safe (this can also be solved with method 2).

4. Final analysis

Used at the end of a game, this can be used to clear a square when all other squares on the board are either safe or can be shown to be mines. Often these final squares are on walls or in corners.

In some versions of the game the number of mines on the field is known. Near the end when almost all the tiles are lifted, knowing the number of mines remaining can give some insight to otherwise unresolvable patterns.

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 latter 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 the 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

In 2000, Kaye published a proof that it is NP-complete to determine whether a position in a Minesweeper game is consistent with some placement of mines. [3] Minesweeper is now mentioned in the Clay Mathematics Institute's unofficial description of the P versus NP problem. [4]

Mine probabilities must be balanced against rewards

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. Consider 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 2/3 probability of a mine on a, b, or c and 1/2 probability of mine on d or e; this can be derived by computing the six possibilities of mine placement on a+b+c+d+e. But playing d or e will give the player no useful information: if the player does not trigger mine, he or she will see a 6 appear under e, or a 5 appear under d. Overall, playing d or e will let the player solve the area in only 1 of the 6 possible cases. If he or she plays a (or b or c) and he or she does not step on a mine, he or she will immediately know whether there is a mine on d or not; overall the player would 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.

This is a specific example of a more general principle that applies when prioritising squares: an unknown square should not be clicked on if more information may be gained by first clicking on an adjacent square; conversely, if there is no way to gain more information about a square, then a guess is inevitable and it should be clicked on to provide more information about the rest of the area.

Measuring board difficulty

Enlarge picture
Beginner board with a 3BV of 25
The difficulty of a given minesweeper board is often measured using the 3BV measure (abbreviated from Bechtel's Board Benchmark Value).

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)
The subtraction of one from the time is required due to the fact that minesweeper begins with one second on the clock (as opposed to zero) and as such the time shown is always one second greater than the actual time taken. Thus, for example, if a Minesweeper board with a 3BV of 16 is finished with the clock displaying 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.

Implementations

There are several implementations of the game in its classic form. The game is frequently bundled with OS's or GUI's -- for example minesweeper in Windows, KMines in KDE(Unix-like OSes), Gnomine in Gnome (Unix-like OSes), in BeOS, etc. Apart from the bundled versions, a huge number of clones of all shapes and sizes can be found on the internet. This is because it is quite easy to write a basic minesweeper game. Here are a few examples:




Minesweeper in Firefox


freeware Minesweeper dashboard widget for Mac OS X

GNOME Mines

Minesweeper in BeOS

Minesweeper clone named KMines for KDE

xdémineur (Look-alike clone of Microsoft version)

XBomb

Winemine, Minesweeper game bundled with wine, according to the author "I wrote it because it rhymes ;)" [1]

The Ace of Penguins

Cellufun's version for Mobile WAP browsers.

"Mine Mayhem" in Freedos, a version of minesweeper for DOS.


Best times

The International Minesweeper Committee has compiled a "best ever" list[5] which includes videos of the fastest games submitted by players. In order to get on that list, records on beginner, intermediate and expert must add up to no more than 99.
  • 37 on expert by Dion Tiu
  • 9 on intermediate by Jake Warner
  • 1 on beginner, tied with many players who have played games where one click reveals the entire board instantly.

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.
  • Hexmines was a variant on a hexagonal grid created by Macintosh developer Ingemar Ragnemalm. Apart from the different board geometry, it is largely identical to the original game.
  • Michael Coan (COAN.NET) came up with a 2-4 player variant of the game in 2005. Super Sweeper / Frog Finder can currently be found on a few internet game sites with its popularity growing.

Examples of variants


Played on 3D surfaces (shown here on a truncated cuboctahedron). Includes tiles with between 3 and 12 sides

3D version

4D version

A game with hexagonal tiles

A game with triangular tiles

An ASCII version (played with the keyboard)

This program deliberately generates the mine layout in such a way that the player never has to guess.

MinesXP-MSN Flags like multiplayer variant with A.I. Player.


References

External links

Minesweeper in science

personal computer game (also known as a computer game or simply PC game) is a video game played on a personal computer, rather than on a video game console or arcade machine.
..... Click the link for more information.
land mine is an explosive device designed to be placed on or in the ground to explode when triggered by an operator or the proximity of a vehicle, person or animal. The name originates from the practice of sapping, where tunnels were dug (much like mining) under enemy
..... Click the link for more information.
land mine is an explosive device designed to be placed on or in the ground to explode when triggered by an operator or the proximity of a vehicle, person or animal. The name originates from the practice of sapping, where tunnels were dug (much like mining) under enemy
..... Click the link for more information.
In computing, a platform describes some sort of framework, either in hardware or software, which allows software to run. Typical platforms include a computer's architecture, operating system, or programming languages and their runtime libraries.
..... Click the link for more information.
Microsoft Windows

Screenshot of Windows Vista Ultimate, the latest version of Microsoft Windows.
Company/developer: Microsoft Corporation
OS family: MS-DOS/9x-based, Windows CE, Windows NT
Source model: Closed source

..... Click the link for more information.
The PDP-11 was a series of 16-bit minicomputers sold by Digital Equipment Corp. in the 1970s and 1980s. The PDP-11 was a successor to DEC's PDP-8 computer in the PDP series of computers. It had several uniquely innovative features, and was easier to program than its predecessors.
..... Click the link for more information.
David H. Ahl is the founder of Creative Computing magazine. He is also the author of many how-to books, including Basic Computer Games, the first million-selling computer book. [1]

References

1.

..... Click the link for more information.
Video puzzle game is a genre of video games that emphasize puzzle solving. The types of puzzles can be logic, strategy, pattern recognition, sequence solving, word completion, or, in some cases, just pure luck.

Description

There is no strict definition of a puzzle game.
..... Click the link for more information.
Quicksilva was one of the most successful British games software publishers during the early 1980s.

Amongst the company's big successes were Jeff Minter's Gridrunner (1983), Bugaboo (1983, aka La Pulga
..... Click the link for more information.
Virgin Interactive was a successful and influential British video game publisher. It was formed as Virgin Games from the remnants of the large-scale 1980s label, Mastertronics, which was purchased by Virgin in 1987.
..... Click the link for more information.
The United States Marine Corps (USMC) is a branch of the United States military responsible for providing power projection from the sea,[1] utilizing the mobility of the U.S. Navy to rapidly deliver combined-arms task forces.
..... Click the link for more information.
In complexity theory, the NP-complete problems are the most difficult problems in NP ("non-deterministic polynomial time") in the sense that they are the smallest subclass of NP that could conceivably remain outside of P, the class of deterministic polynomial-time problems.
..... Click the link for more information.
The Clay Mathematics Institute (CMI) is a private, non-profit foundation, based in Cambridge, Massachusetts. The Institute is dedicated to increasing and disseminating mathematical knowledge. It gives out various awards and sponsorships to promising mathematicians.
..... Click the link for more information.
The relationship between the complexity classes P and NP is an unsolved question in theoretical computer science. It is considered to be the most important problem in the field--the Clay Mathematics Institute has offered a $1 million US prize for the first correct proof.
..... Click the link for more information.
graphical user interface (GUI) is a type of user interface which allows people to interact with a computer and computer-controlled devices which employ graphical icons, visual indicators or special graphical elements called "widgets", along with text, labels or text
..... Click the link for more information.
Minesweeper is a computer game of minesweeper included in Microsoft Windows.

Features

In the widespread Microsoft Windows version, there are three sizes:

Beginner: 8 × 8 or 9 × 9 field with 10 mines

..... Click the link for more information.
KMines is a minesweeper game for KDE, originally created in 1996 (latest release August 25, 2005 2.1.10) by Nicolas Hadacek under the GPL. See the homepage[1]. It has three default sizes, "easy" (8×8), "normal" (16×16), and "expert" (16×30), as well as
..... Click the link for more information.
Maintainer: The KDE Team

OS: Cross-platform
Available language(s): Multilingual (80 different languages.)
Use: Desktop environment
License: GNU General Public License and others
Website: [1] KDE (
..... Click the link for more information.
Gnomines (or Mine) is a minesweeper game for GNOME is licensed under the GPL as part of Gnome Games. [1] The game's premise is that the player has to locate mines floating in an ocean.
..... Click the link for more information.
gnome is a mythical creature characterized by its extremely small size and subterranean free lifestyle.

The word gnome is derived from the New Latin gnomus.
..... Click the link for more information.
BeOS

A screenshot of BeOS R4.5
Company/developer: Be Inc.
OS family: BeOS
Source model: Closed source
Stable release: BeOS R5.0.
..... Click the link for more information.
Maintainer: Mozilla Corporation / Mozilla Foundation

OS: Cross-platform
Available language(s): Multilingual,[1] EULA in English only[2]
Use: Web browser
License: Mozilla EULA for binary redistribution

..... Click the link for more information.
Dashboard is an application for Apple's Mac OS X v10.4 Tiger operating system, used for hosting mini-applications known as widgets. It is a semi-transparent layer that is invisible to the user unless activated by a hotkey, which can be set to the user's preference.
..... Click the link for more information.
Mac OS X (IPA: /mæk.oʊ.ɛs.tɛn/) is a line of graphical operating systems developed, marketed, and sold by Apple Inc., the latest of which is pre-loaded on all currently shipping Macintosh computers.
..... Click the link for more information.
gnome is a mythical creature characterized by its extremely small size and subterranean free lifestyle.

The word gnome is derived from the New Latin gnomus.
..... Click the link for more information.
BeOS

A screenshot of BeOS R4.5
Company/developer: Be Inc.
OS family: BeOS
Source model: Closed source
Stable release: BeOS R5.0.
..... Click the link for more information.
KMines is a minesweeper game for KDE, originally created in 1996 (latest release August 25, 2005 2.1.10) by Nicolas Hadacek under the GPL. See the homepage[1]. It has three default sizes, "easy" (8×8), "normal" (16×16), and "expert" (16×30), as well as
..... Click the link for more information.
Maintainer: The KDE Team

OS: Cross-platform
Available language(s): Multilingual (80 different languages.)
Use: Desktop environment
License: GNU General Public License and others
Website: [1] KDE (
..... Click the link for more information.
Wine is a software application which aims to allow Unix-like computer operating systems on the x86 architecture to execute programs that were originally written for Microsoft Windows.
..... Click the link for more information.
Cellufun, Inc

Venture-backed Corporation
Founded 2005
Headquarters New York City, New York, United States Coordinates:
..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.