History of Minesweeper and logic

A number instead of a map: where Minesweeper came from, how the Windows version spread, and why a mathematics class uses the game.

A number instead of a map

Minesweeper fits in one rule: open every square that does not hide a mine. Each number says how many mines sit around it, and the rest is deduction. Earlier programs already used a count to cross hidden mines.

One published example is Mined-Out, by Ian Andrew, released in 1983 for the ZX Spectrum by Quicksilva, as the author himself records. The aim was to cross a minefield over several stages. An indicator showed how many invisible mines sat above, below or beside, and not on the diagonal, so the path had to be deduced. It was not today's game, and it was not the first of its kind. A number instead of a map was already in a commercial game years before Windows carried a related version onto many computers.

The version that came with Windows

The version that spread was made at Microsoft. Curt Johnson created the game for IBM's OS/2. Robert Donner, also a Microsoft employee at the time, brought it to Windows. It came out in 1990 in the Microsoft Entertainment Pack and, in 1992, entered the standard install of Windows 3.1, in place of the Reversi from Windows 3.0. Until Windows Vista, it changed little. On Vista, a version by Oberon Media replaced the earlier one. From Windows 8 on, it no longer came with a fresh install: Microsoft published it on the Microsoft Store, in a version by Arkadium.

The number, from 1 to 8, counts the neighbouring mines. Most are found by logic, but some positions ask for a guess, often between two squares. The right button places the flag. There were three ready-made sizes and a custom one. The game came with the system, so it reached homes and schools in many countries. In Portuguese, the name is Campo Minado.

When the logic does not close

In 2000, Richard Kaye, of the University of Birmingham, published "Minesweeper is NP-complete" in the Mathematical Intelligencer, volume 22, number 2, pages 9 to 15. The result does not say that every game asks for a guess. He defines the Minesweeper Consistency Problem: on a partly opened board, is there a placement of mines consistent with the numbers on the screen? That problem is NP-complete, and deciding whether a square is certainly a mine or certainly safe reduces to it.

NP-complete means the problem sits in the same class as other yes-or-no problems for which no efficient method is known that solves every case. A method for one of them would serve for the rest. In the reading Kaye calls the sober one, this shows a game that is genuinely hard: it is costly to know when a square is safe for certain and when a guess is unavoidable. It applies to the general case, in which the grid may be of any size.

Boards where the guess never comes in

Some people prefer to take the guess out of the game. A public example is Mines by Simon Tatham, in the Portable Puzzle Collection. In a piece dated 26 August 2019, he explains how the program guarantees a grid that can be solved without guessing. A solver makes the kind of deduction a person would. The mines are laid at random and the attempt starts from the first click. If the solver gets stuck, the mines in the region that is still closed are moved until a new deduction appears, and it runs again from the same point.

Solubility depends on that click: what can be solved from one square may not be solvable from another. With the generator, Tatham reached a mine density more than twice that of the standard Windows sizes, and the program still found a playable grid without taking too long.

In the classroom

In Brazil, the game shows up in writing for mathematics teacher education. In 2023, Leocádio and Tinti published, in Revista de Educação PUC-Campinas, "Reflexões acerca de uma proposta para o ensino de Probabilidade envolvendo o jogo campo minado". Correspondence is at the Department of Mathematics Education of the Federal University of Ouro Preto. It is a proposal, not a measure of how much a class learned. One activity compares moves and leads to the safer choice, through experiment. The other treats events and relative frequency. The text is aimed at teacher education and at secondary school.

In 2024, Rafael Luiz Ferreira Eleuthério submitted, at the Federal University of Rio Grande do Sul, in the mathematics teaching degree, "Construção e resolução de campo minado: um estudo de educação matemática envolvendo lógica e tomada de decisão", supervised by Marilaine de Fraga Sant'Ana. At a meeting in the Baltazar de Oliveira Garcia state school, secondary students built and solved a physical minefield. The work asks what difficulties that task brings, highlights the connective "if, then" for deciding the next square, and treats the construction as a tool for teaching probability.

On this site

On this site, every board, on every level and in the daily challenge, is built so a solver can open every safe square from the first click, using only the count on each number. A number equal to the closed squares around it: those are mines. Flags that already add up to the number: the rest is safe. In an ordinary game, the first square opened is never a mine, and neither are the squares within two steps, adding across and down.