Minesweeper as a Constraint Satisfaction Problem

This project was completed for the course CSC2512 (Constraint Satisfaction Problems). To summarize: using Programmer's Minesweeper (PGMS) I wrote a strategy for playing minesweeper that formulates the problem as a constraint satisfaction problem. Each square stepped on generates a new constraint on the neighbouring squares and coupled sets of these constraints can be solved using a backtracking technique to determine the location of other safe squares to step on or, in case there are none, determine the probability that each square is safe so as to choose the safest guess for a next move.

The paper I wrote for this project is available in PDF format (78kB).

The following source code is available under the General Public Licence:


Last modified: 16-April-2001
by Chris Studholme
Chris's Home Page