Minesweeper

Ken Bayer, Joshua J. Snyder, Berthe Y. Chouiery

This applet requires version 5.0 of the Java Runtime, which is available here.
MineSweeper
Java isn't enabled on this browser

Minesweeper is a single-player computer game invented by Robert Donner in 1989. A brief history of the game can be found at Wikipedia.


Implementation

This version of minesweeper is essentially a clone of the Microsoft Windows XP minesweeper game and is written in Java. In addition to the regular game, we have additional buttons that implement different levels of computer assistance.
  • Random - Uncover a square at random.
  • Cheat - Uncover a random square that doesn't have a mine.
  • GAC - Enforce Generalized Arc Consistency (1-Relational Consistency)
  • 2-RC - Enforce 2-Relational Consistency
  • 3-RC - Enforce 3-Relational Consistency

  • GAC, 2-RC, and 3-RC are techniques from Constraint Processing. Each button enforces a higher level of consistency, thus solving more of the problem.
    The Load option loads a pre-defined CSP instance from a file. This allows you to try out some particularly challenging instances, and see how well the solver handles them. Try out the following files by saving them to your computer and then loading them in the game.
  • twocircle.xml - A circle of 2s
  • small2circle.xml - A smaller variation on the circle of 2's
  • unsolvable.xml - An example of a situation where you have no choice but to guess.