2 research outputs found

    Higher-Level Consistencies: Where, When, and How Much

    Get PDF
    Determining whether or not a Constraint Satisfaction Problem (CSP) has a solution is NP-complete. CSPs are solved by inference (i.e., enforcing consistency), conditioning (i.e., doing search), or, more commonly, by interleaving the two mechanisms. The most common consistency property enforced during search is Generalized Arc Consistency (GAC). In recent years, new algorithms that enforce consistency properties stronger than GAC have been proposed and shown to be necessary to solve difficult problem instances. We frame the question of balancing the cost and the pruning effectiveness of consistency algorithms as the question of determining where, when, and how much of a higher-level consistency to enforce during search. To answer the `where\u27 question, we exploit the topological structure of a problem instance and target high-level consistency where cycle structures appear. To answer the \u27when\u27 question, we propose a simple, reactive, and effective strategy that monitors the performance of backtrack search and triggers a higher-level consistency as search thrashes. Lastly, for the question of `how much,\u27 we monitor the amount of updates caused by propagation and interrupt the process before it reaches a fixpoint. Empirical evaluations on benchmark problems demonstrate the effectiveness of our strategies. Adviser: B.Y. Choueiry and C. Bessier

    An Interactive Constraint-Based Approach to Minesweeper

    Get PDF
    We present a Java applet that uses Constraint Processing (CP) to assist a human in playing the popular game Minesweeper. Our goal is to illustrate the power of CP techniques to model and solve combinatorial problems in a context accessible to the general public. Minesweeper is a video game that has been included with Microsoft Windows since 1989. In this game, the player is presented with a grid of squares. Each of these squares may conceal a mine. When the player clicks on a square, it is revealed. If the square is a mine, the game is over. If the square is not a mine, it is replaced by a number indicating how many of the adjacent squares are mines. The goal of the game is to reveal all squares that are not mines. These simple rules yield a complex problem: Kaye proved that the minesweeper-consistency problem is NP-complete (2000). 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. A few programs have been written to solve Minesweeper. 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. In his implementation, Collet defines constraints intensionally and generates dual variables to achieve higher-level consistency. 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. Like (Collet 2004), our program assists the player in solving Minesweeper puzzles by modeling them as Constraint Satisfaction Problems (CSPs). Although our model is similar to that of Collet, it was developed independently. 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. We briefly discuss our motivations, then describe our model, interface and implementation
    corecore