A game of logic where the player must assign the numbers 1..9 to cells on a 9x9 grid. The placement of the numbers must be such that every number must.

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Constraint Satisfaction Problems (Chapter 6). What is search for? Assumptions: single agent, deterministic, fully observable, discrete environment Search.
Constraint Satisfaction Problems
Constraint Systems Laboratory February 18, 2009 CSP Modeling Examples CSP: Examples Industrial applications: scheduling, resource allocation, product configuration,
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
This lecture topic (two lectures) Chapter 6.1 – 6.4, except 6.3.3
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
Foundations of Constraint Processing More on Constraint Consistency 1 Foundations of Constraint Processing CSCE421/821, Spring
Review: Constraint Satisfaction Problems How is a CSP defined? How do we solve CSPs?
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Constraint Satisfaction CSE 473 University of Washington.
Artificial Intelligence Constraint satisfaction Chapter 5, AIMA.
Minesweeper is a game of logic. It originated from “Relentless Logic,” which was written by Conway, Hong, and Smith around In Relentless Logic, the.
Constraint Satisfaction Problems
Game Gallery Project (1) Supervised By: Professor Mona Mursi 2007.
Support: UCARE grant awarded to Chris Reeson & CAREER Award # from the National Science Foundation. To the public: –Illustrate the power of CP For.
Constraint Systems Laboratory March 26, 2007Reeson–Undergraduate Thesis1 Using Constraint Processing to Model, Solve, and Support Interactive Solving of.
Sudoku as a Constraint Problem H. Simonis IC Parc.
Ken Bayer, Josh Snyder, and Berthe Y. Choueiry Constraint Systems Laboratory University of Nebraska-Lincoln A Constraint-Based Approach to Solving Minesweeper.
CS194 Project: Sudoku Difficulty Kha Chu Advisor: Professor Sahai.
SOLVING SUDOKU WITH MATLAB VERIFICATION FUNCTION correctness verification of the puzzle: checks if the current element appears twice in the same line,
Constraint Satisfaction Problems
Constraint Satisfaction Problems
ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 4 Constraint Satisfaction Problems Instructor: Alireza Tavakkoli September 17, 2009 University.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
SOLVING SUDOKU WITH MATLAB Raluca Marinescu, Andrea Garcia, Ivan Castro, Eduard Enoiu Mälardalen University, Västerås,
On Algorithms for Decomposable Constraints Kostas Stergiou Ian Gent, Patrick Prosser, Toby Walsh A.P.E.S. Research Group.
Constraint Satisfaction Problems Chapter 6. Review Agent, Environment, State Agent as search problem Uninformed search strategies Informed (heuristic.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Sudoku Solver Comparison A comparative analysis of algorithms for solving Sudoku.
Constraint Satisfaction CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
CSC 8520 Spring Paula Matuszek Based on Hwee Tou Ng, aima.eecs.berkeley.edu/slides-ppt, which are based on Russell, aima.eecs.berkeley.edu/slides-pdf.
1 CS B551: Elements of Artificial Intelligence Instructor: Kris Hauser
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
CSC 423 ARTIFICIAL INTELLIGENCE Constraint Satisfaction Problems.
CSC 8520 Spring Paula Matuszek CS 8520: Artificial Intelligence Search 3: Constraint Satisfaction Problems Paula Matuszek Spring, 2013.
1 Project Management Example Solving Sudoku 2 What is Sudoku?  Sudoku is a game with 9 columns and 9 rows and 9 “boxes” composed of a 3 x 3 Grid  Numbers.
Constraint Systems Laboratory 11/26/2015Zhang: MS Project Defense1 OPRAM: An Online System for Assigning Capstone Course Students to Sponsored Projects.
Chapter 5 Constraint Satisfaction Problems
Constraint Satisfaction Problems (Chapter 6)
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
How Do I Solve This Thing?. You are familiar with Sudoku puzzles. For this variation, place the integers 1 – 9 into each row or column such that the.
Monster (“Mega”) Sudoku
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
Constraint Satisfaction CSE 473 University of Washington.
CompSci Problem Solving: Sudoku  Rules of the Game Sudoku is played with a 9 by 9 "board" consisting of nine 3 by 3 sub-boards. The symbols 1 -
CS 171: Intro to AI Discussion Week 2 Jan 15 th 2016.
1 Constraint Satisfaction Problems (CSP). Announcements Second Test Wednesday, April 27.
CMPT 463. What will be covered A* search Local search Game tree Constraint satisfaction problems (CSP)
CS 561, Session 8 1 This time: constraint satisfaction - Constraint Satisfaction Problems (CSP) - Backtracking search for CSPs - Local search for CSPs.
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Monster (“Mega”) Sudoku
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Constraint Satisfaction Problem
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
CSP Search Techniques Backtracking Forward checking
Constraint Satisfaction Problems
Constraints and Search
CS 8520: Artificial Intelligence
Solving Sudoku with Consistency: A Visual and Interactive Approach
Constraint Satisfaction Problems
Constraint Satisfaction Problems (CSP)
Presentation transcript:

a game of logic where the player must assign the numbers 1..9 to cells on a 9x9 grid. The placement of the numbers must be such that every number must appear exactly once in every row, column, and 3x3 block, where the board is split into nine 3x3 blocks. Promote the study of Constraint Processing (CP) among CS students, and explain CP techniques to the general public. Sudoku is perfect to this end because it allows us to visualize the operation of CP algorithms. Discourage students from losing too much time playing by making a program to play games for them. Understand and demystify humans’ fascination with puzzles. A basic Sudoku is… Our goals are to… #15 on Royle’s web site SolverSolver & Constructor are available onlineConstructor cse.unl.edu/~sudoku/Solver/ & cse.unl.edu/~sudoku/Constructor/

Our approach is to… model Sudoku as a Constraint Satisfaction Problem (CSP) and use it to illustrate various CP techniques. We model Sudoku as a CSP as follows. Each cell is a variable whose domain is made of the numbers 1…9. The constraints correspond to all-diff constraints on each row, column, and block. We can model each all-diff constraint as either a set of binary mutex constraints... We implement both models to allow the player to compare and understand the effectiveness of constraint propagation operating on each model. …or single non-binary alldiff constraints with arity 9.

We built a Java applet that allows the user to play Sudoku with the assistance of CP techniques. The player can… …assign values to cells and play the game without aid …load a problem instance from the online library …display the remaining values in the domain of each cell …undo/redo any action Using the Constructor interface, the player can add new problems to the library, modify existing problems, and view all solutions of a puzzle in the grid …assign all cells whose domains have a single value …apply a variety of CP techniques …check the number of solutions left

The first propagation technique we implement is Forward Checking (FC), which removes all values that are not consistent with an assigned value. Binary Arc Consistency (AC) is stronger, iterating over every constraint until the entire problem is arc consistent. Generalized Arc Consistency (GAC) is even stronger, considering every non-binary all-diff constraint and removing inconsistent values. The player can run each algorithm on individual constraints, or on the entire problem. FC AC GAC

Shaving techniques enforce a stronger level of consistency. Singleton AC (SAC) considers every value x for each cell y. The algorithm assigns x to y and runs AC. If the problem is no longer consistent (i.e., domain wipeout occurs) we remove x from the domain of y. SGAC is similar to SAC, but executes GAC instead of AC. Empirically, we have seen that SGAC solves every 9x9 Sudoku that has a unique solution. We also implemented a Backtrack Search (BT) that enumerates and counts all possible solutions to a problem that has more than one solution (a not well posed Sudoku). SAC SGAC

When the player makes a mistake by assigning a value that violates a constraint, Solver detects the error and highlights the variables in the broken constraint If the player becomes completely stuck or wants sound advise, he or she can use the Hint feature. The application displays the number of hints found and allows the user to iterate through them. The user can increment the level of consistency and choose what kind of hint to display. A Singleton hint highlights a cell that will become a singleton after the selected consistency level is enforced. A Vital hint highlights a cell that will contain a value that will not appear in any other cell in the same row, block, or column after the selected consistency level is enforced.