Minesweeper (video game)
Minesweeper is a single-player puzzle video game. The objective of the game is to clear a rectangular board containing hidden "mines" or bombs without detonating any of them, with help from clues about the number of neighboring mines in each field. The game originates from the 1960s, and it has been written for many computing platforms in use today. It has many variations and offshoots.

Some versions of Minesweeper set up the board (after the first click) so that the solution does not require guessing.[1] Minesweeper for versions of Windows protects the first square revealed; from Windows Vista onward, players may elect to replay a board, in which the game is played by revealing squares of the grid by clicking or otherwise indicating each square. If a square containing a mine is revealed, the player loses the game. If no mine is revealed, a digit is instead displayed in the square, indicating how many adjacent squares contain mines; if no mines are adjacent, the square becomes blank, and all adjacent squares will be recursively revealed. The player uses this information to deduce the contents of other squares and may either safely reveal each square or mark the square as containing a mine.
Gameplay
In Minesweeper, mines (that resemble naval mines in the classic theme) are scattered throughout a board, which is divided into cells. Cells have three states: unopened, opened and flagged. An unopened cell is blank and clickable, while an opened cell is exposed. Flagged cells are those marked by the player to indicate a potential mine location.
Controls
A player left-clicks a cell to open it. If a player opens a mined cell, the game ends, as there is only one life per game. Otherwise, the opened cell displays either a number, indicating the number of mines diagonally and/or adjacent to it, or a blank tile (or "0"), and all adjacent non-mined cells will automatically be opened. Right-clicking on a cell will flag it, causing a flag to appear on it. Flagged cells are still considered unopened, and a player can click on them to open them, although typically they must first be unflagged with an additional right-click.
If a player both left-clicks and right-clicks on an opened cell that has the number of adjacent mines equal to the number of adjacent flagged cells, all adjacent non-flagged unopened cells will be opened.[2] This is known as chording and in many variants it can be done by middle-clicking or by simply left-clicking.
Gameplay
A game of Minesweeper begins when the player makes the first click on a board with all cells unopened. This click is guaranteed to be safe[3] with some variants further guaranteeing that all adjacent cells are safe as well.[4] During the game, the player uses information given from the opened cells to deduce further cells that are safe to open, iteratively gaining more information to solve the board. The player is also given the number of remaining mines in the board, known as the minecount, which is calculated as the total number of mines subtracted by the number of flagged cells (note that because of this, the minecount can be negative). The minecount is mainly useful when there are only a few remaining mines.
Frequently when playing the game, the player encounters situations when they cannot deduce any further safe cells from the information given so they would need to make a guess. Some variants of Minesweeper ensure that the board can be solved without the need to guess.[1]
To win the game, players must open all non-mine cells while not opening any mines. Flagging all the mined cells is not required.
The "score" of the game is the time taken to complete it. The timer starts when the player makes their first click and ends when they make their last click.
Common board configurations
Most variants of Minesweeper offer three default board configurations, usually known as beginner, intermediate and expert, in order of increasing difficulty. Beginner is usually on an 8x8 or 9x9 board containing 10 mines, Intermediate is usually on a 16x16 board with 40 mines and expert is usually on a 30x16 board with 99 mines.[2] Most variants also allow the player to play a custom board in which the player can choose both the dimensions and number of mines of that board.
Example
Here is an example of how logic is used when solving a Minesweeper board.
- The first click will be in the top-left corner on the cell highlighted red.
- This cell is a 0, having no adjacent mines, so all adjacent cells are recursively opened.
- The cyan 1 indicates that the red cells must contain one mine.
- The 1 below the cyan 1 indicates that both the red and green cells contain one mine.
- Because one mine must be in the red cells, the three green cells cannot be mines so they can be safely opened.
- The cyan 1 has only one adjacent unopened cell so that must be a mine so it can be flagged as follows.
- The cyan 1 has two adjacent unopened cells, one of these was known to be a mine in the previous step.
- This means that the other cell highlighted red is safe to open.
- Opening that cell reveals a 1, highlighted as cyan.
- Because its one adjacent mine is known, all other adjacent cells highlighted red can be opened.
- This step is repeated but now with four cells.
- This results in a large opening clearing out a large amount of the board.
- The cyan 2 has one known adjacent mine and one non-flagged unopened adjacent cell highlighted red so that must be a mine.
- The 1 that is two cells to the right of the 2 has its one mine in that red cell so all green cells can be safely opened.
- Also at the bottom of the board, the magenta 1 indicates one mine shared between its two adjacent unopened cells.
- The 1 above it indicates that there is one mine shared between its three adjacent cells.
- Two of those adjacent cells are shared by the magenta 1 so the one mine must be in there, leaving the blue cell safe to open.
- The cyan 1 has one adjacent unopened cell highlighted red so that cell is a mine.
- The magenta 1 has its adjacent mine known so all three adjacent unopened cells highlighted green can be opened.
- The cyan 1 has its adjacent mine known so its one adjacent unopened cell highlighted red can be opened.
- The magenta 3 has two of its adjacent mines known and has one adjacent unopened cell highlighted green so that must be a mine.
- The two yellow 1s have their one adjacent mine known so the other adjacent unopened cell highlighted blue is safe.
- The cyan 2 has one unknown adjacent mine in two of its unopened adjacent cells.
- The 2 below it has its one unknown adjacent mine in its three unopened adjacent cells.
- Because two of those adjacent cells are shared by the cyan 2, the other unopened cell highlighted red must be safe.
- The magenta 3 has all of its adjacent mines known so its one unopened adjacent cell highlighted green is safe.
- The cyan 1 has one mine between its two adjacent unopened cells.
- The 1 to the right of it has five adjacent unopened cells, two of which have a mine in them because of the cyan 1.
- This means that the three remaining cells highlighted red can be safely opened.
- The 2 below the magenta 1 has one of its mines known and its other mine is between the two adjacent cells of the magenta 1.
- This means that the other adjacent unopened cell of the 2 highlighted green is safe.
- The two cyan 2s have one of their mines known and the other mine between the two red cells.
- The magenta 1 has one mine between both the red and green cells.
- From the cyan 2s, because one mine is in the red cells, the green cells must all be safe.
- Opening those four cells results in a large opening.
- The 1 to the left of the cyan 1 has four adjacent unopened cells.
- The cyan 1 has its mine between two of those cells so the other two cells highlighted red are safe.
- The magenta 1 has its mine between its two adjacent cells.
- The yellow 2 has one of its adjacent mines known and another is between the two unopened cells adjacent to the magenta 1.
- This leaves two unopened cells highlighted green which must be safe.
- All three cells highlighted red, green and blue must contain a mine because all three sets of corresponding opened cells highlighted cyan, magenta and yellow having one remaining mine which must be in the one remaining unopened cell.
- Flagging those mines and opening three more cells gives this final position.
- The three cyan 1s have their one mine in their only unopened adjacent cell highlighted red so it must a mine and the other unopened cell must be safe.
- Opening this final cell results in the game finally being won because all non-mine cells have been opened without opening any mines.
History
Minesweeper has its origins in the earliest mainframe games of the 1960s and 1970s. The earliest ancestor of Minesweeper was Jerimac Ratliff's Cube. The basic gameplay style became a popular segment of the puzzle video game genre during the 1980s, with titles such as Mined-Out (Quicksilva, 1983), Yomp (Virgin Interactive, 1983), and Cube. Cube was succeeded by Relentless Logic (or RLogic for short), by Conway, Hong, and Smith, available for MS-DOS as early as 1985; the player took the role of a private in the United States Marine Corps, delivering an important message to the U.S. Command Center. RLogic had greater similarity 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 right angled corner to the bottom right angled 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.
The gameplay mechanics of Minesweeper are included in a variety of other software titles, including:
- The mini-game Vinesweeper implemented into the MMORPG RuneScape; in this iteration (written by Jagex developer Danny J), the Minesweeper gameplay is given a large multiplayer aspect and the "game board" adopts a continually resetting timer. This allows for a never-ending game of Minesweeper where the skill is assessed in points rather than "game completion".
- The PC game Mole Control (developed by Remode); in this game, the Minesweeper mechanic is integrated into a puzzle adventure game based in a village called Molar Creek, which has been overrun with exploding moles. The player acts as the local inventor's assistant, who is tasked with clearing the village of exploding moles. A time attack mode, called the Molar Creek Annual Mole Control competition, is also available.
Windows Minesweeper
First appearing in a game pack for Microsoft in 1990, a version of the game called Microsoft Minesweeper was released as a standard part of Windows 3.1 in 1992.[5] This saw an explosion in popularity and awareness of the game, with tech bloggers and journalists calling it "iconic",[6] "famous",[7] and even "the most successful game ever".[8] Versions of the game continued to be included in standard installs of Windows up through Windows Vista in 2007, though in Windows 8 (2012) and later, it must be downloaded as an app from the Microsoft Store.
Distribution and variants

Versions of Minesweeper are frequently bundled with operating systems and GUIs, including Minesweeper for IBM's OS/2, Minesweeper in Windows, KMines in KDE (Unix-like OSes), GNOME Mines in GNOME and MineHunt in Palm OS. Many clones can be found on the Internet.
Variants of the basic game generally have differently shaped minefields, in either two or three dimensions, and may have more than one mine per cell. For example, X11-based XBomb adds triangular and hexagonal grids, and Professional Minesweeper for Windows includes these and others. There are also variants for more than one player, in which the players compete against each other.
The HP-48G graphing calculator includes a variation on the theme called "Minehunt", where the player has to move safely from one corner of the playfield to the other. The only clues given are how many mines are in the squares surrounding the player's current position.
The Voltorb Flip game in the non-Japanese releases of Pokémon HeartGold and SoulSilver is a variation of Minesweeper and Picross.[9]
A logic puzzle variant of minesweeper, suitable for playing on paper, starts with some squares already revealed. The player cannot reveal any more squares, but must instead mark the remaining mines correctly. Unlike the usual form of minesweeper, these puzzles usually have a unique solution.[10] These puzzles appeared under the name "tentaizu" (天体図), Japanese for a star map, in Southwest Airlines' magazine Spirit in 2008–2009.
In the game Minecraft, the 2015 April Fool's update "The Love and Hugs Update" added "Minescreeper". It is a near exact copy of Minesweeper, except, instead of avoiding the mines, the player must avoid hidden Creepers.
- Online, non-rectangular
- 3D
- Hexagonal
- Triangular
- Multiple mines in cells
Computational complexity
In 2000, Richard Kaye published a proof that it is NP-complete to determine whether a given grid of uncovered, correctly flagged, and unknown squares, the labels of the foremost also given, has an arrangement of mines for which it is possible within the rules of the game. The argument is constructive, a method to quickly convert any Boolean circuit into such a grid that is possible if and only if the circuit is satisfiable; membership in NP is established by using the arrangement of mines as a certificate.[11] If, however, a minesweeper board is already guaranteed to be consistent, solving it is not known to be NP-complete, but it has been proven to be co-NP-complete.[12] In the latter case, however, minesweeper exhibits a phase transition analogous to k-SAT: when more than 25% squares are mined, solving a board requires guessing an exponentially-unlikely set of mines.[13]
Kaye also proved that infinite Minesweeper is Turing-complete.[14]
Notes
- "Mines". www.chiark.greenend.org.uk. Retrieved 28 March 2017.
- "How To Play Minesweeper". Authoritative Minesweeper. Retrieved 22 April 2022.
- "How to Play Minesweeper". wikiHow. Retrieved 9 February 2020.
- "Minesweeper Strategy - First Click". Authoritative Minesweeper. Retrieved 2 April 2022.
Windows Vista introduced guaranteed openings [a cell with no adjacent mines] on the first click...
- "Column from Tony "Tablesaw" Delgado about puzzle games". Gamesetwatch.com. 26 February 2007. Retrieved 22 June 2011.
- Weinberger, Matt (18 August 2015). "Bill Gates was so addicted to Minesweeper, he used to sneak into a colleague's office after work to play". Business Insider Australia. Allure Media. Retrieved 20 January 2017.
- "Minesweeper community Wiki". 18 April 2021. Retrieved 13 February 2022.
- Cobbett, Richard (5 May 2009). "The most successful game ever: a history of Minesweeper". TechRadar. Retrieved 13 February 2022.
- Scullion, Chris (3 February 2010). "News: Pokémon HeartGold/SoulSilver mini-game revealed! - Official Nintendo Magazine". officialnintendomagazine.co.uk. Archived from the original on 6 February 2010. Retrieved 13 January 2020.
- Minesweeper Puzzle Magazine, accessed 2017-02-07.
- Kaye (2000).
- Allan Scott, Ulrike Stege, Iris van Rooij, Minesweeper may not be NP-complete but is hard nonetheless, The Mathematical Intelligencer 33:4 (2011), pp. 5–17.
- Dempsey, Ross; Guinn, Charles (2020). "A Phase Transition in Minesweeper". arXiv:2008.04116 [cs.AI].
- Kaye, Richard (31 May 2007). "Infinite versions of minesweeper are Turing complete" (PDF). Archived from the original (PDF) on 3 August 2016. Retrieved 8 July 2016.
References
- Adamatzky, Andrew (1997). "How cellular automaton plays Minesweeper". Applied Mathematics and Computation. 85 (2–3): 127–137. doi:10.1016/S0096-3003(96)00117-8.
- Lakshtanov, Evgeny; Oleg German (2010). "'Minesweeper' and spectrum of discrete Laplacians". Applicable Analysis. 89 (12): 1907–1916. arXiv:0806.3480. doi:10.1080/00036811.2010.505189. S2CID 17474183.
- Kaye, Richard (2000). "Minesweeper is NP-complete". Mathematical Intelligencer. 22 (2): 9–15. doi:10.1007/BF03025367. S2CID 122435790. — Further information available online at Richard Kaye's Minesweeper pages.
- Mordechai Ben-Ari (2018). Minesweeper is NP-Complete (PDF) (Report). Weizmann Institute of Science, Department of Science Teaching. — An open-access paper explaining Kaye's NP-completeness result.