![]() ![]() We briefly discuss our motivations, then describe our model, interface and implementation.You are encouraged to solve this task according to the task description, using any language you may know. Also, our constraints are defined in extension, and, importantly, our implementation uses text- book propagation-algorithms to determine the locations of mines, thus better serving our pedagogical goals. Although our model is similar to that of Collet, it was developed independently. Like (Collet 2004), our program assists the player in solving Minesweeper puzzles by modeling them as Constraint Satisfaction Problems (CSPs). This model artificially and unnecessarily increases the number of variables (thus increasing the cost in terms of time and space), and obscures the concept of ‘consistency level,’ which is central to Constraint Processing. In his implementation, Collet defines constraints intensionally and generates dual variables to achieve higher-level consistency. One notable such program was developed by Collet (2004), and uses the Oz language to model and solve Minesweeper as a set of Boolean linear constraints. The minesweeper-consistency problem is to determine if, given a board with some known squares, there exists a layout of mines in the unknown squares that is consistent with the numbers displayed.Ī few programs have been written to solve Minesweeper. These simple rules yield a complex problem: Kaye proved that the minesweeper-consistency problem is NP-complete (2000). ![]() The goal of the game is to reveal all squares that are not mines. If the square is not a mine, it is replaced by a number indicating how many of the adjacent squares are mines. If the square is a mine, the game is over. When the player clicks on a square, it is revealed. Each of these squares may conceal a mine. In this game, the player is presented with a grid of squares. Minesweeper is a video game that has been included with Microsoft Windows since 1989. Our goal is to illustrate the power of CP techniques to model and solve combinatorial problems in a context accessible to the general public. We present a Java applet that uses Constraint Processing (CP) to assist a human in playing the popular game Minesweeper. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |