Constraint Satisfaction Problems Russell and Norvig: Parts of Chapter 5 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Constraint Satisfaction Problems Russell and Norvig: Chapter
Constraint Satisfaction Problems (Chapter 6). What is search for? Assumptions: single agent, deterministic, fully observable, discrete environment Search.
Constraint Satisfaction Problems
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
1 Constraint Satisfaction Problems. 2 Intro Example: 8-Queens Generate-and-test: 8 8 combinations.
This lecture topic (two lectures) Chapter 6.1 – 6.4, except 6.3.3
MBD and CSP Meir Kalech Partially based on slides of Jia You and Brian Williams.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
Constraint Satisfaction problems (CSP)
Constraint Satisfaction Problems. Constraint satisfaction problems (CSPs) Standard search problem: – State is a “black box” – any data structure that.
Constraint Satisfaction Problems
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Artificial Intelligence Constraint satisfaction Chapter 5, AIMA.
Constraint Satisfaction Problems
Constraint Satisfaction Problems Russell and Norvig: Chapter 3, Section 3.7 Chapter 4, Pages Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/home.htm.
CPSC 322, Lecture 17Slide 1 Planning: Representation and Forward Search Computer Science cpsc322, Lecture 17 (Textbook Chpt 8.1 (Skip )- 8.2) February,
Constraint Satisfaction Problems Russell and Norvig: Chapter 5 CMSC 421 – Fall 2005.
Chapter 5 Outline Formal definition of CSP CSP Examples
Constraint Satisfaction Problems (CSP) (Where we postpone making difficult decisions until they become easy to make) R&N: Chap. 5 1.
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.
1 Constraint Satisfaction Problems Slides by Prof WELLING.
CSPs Tamara Berg CS Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart Russell, Andrew.
Constraint Satisfaction Problems Chapter 6. Review Agent, Environment, State Agent as search problem Uninformed search strategies Informed (heuristic.
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
PSU CS 370 – Introduction to Artificial Intelligence 1 Constraint Satisfaction Problems Chapter 5.
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.
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Fall 2006 Jim Martin.
1 Chapter 5 Constraint Satisfaction Problems. 2 Outlines  Constraint Satisfaction Problems  Backtracking Search for CSPs  Local Search for CSP  The.
CSC 8520 Spring Paula Matuszek CS 8520: Artificial Intelligence Search 3: Constraint Satisfaction Problems Paula Matuszek Spring, 2013.
1 CS B551: Elements of Artificial Intelligence Instructor: Kris Hauser
CSPs Tamara Berg CS Artificial Intelligence Many slides throughout the course adapted from Svetlana Lazebnik, Dan Klein, Stuart Russell, Andrew.
Chapter 5 Constraint Satisfaction Problems
Constraint Satisfaction Problems (Chapter 6)
1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3 Grand Challenge:
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
Constraint Satisfaction Problems University of Berkeley, USA
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Computing & Information Sciences Kansas State University Friday, 08 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 7 of 42 Friday, 08 September.
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
Constraint Satisfaction Problems Russell and Norvig: Chapter 3, Section 3.7 Chapter 4, Pages CS121 – Winter 2003.
Constraint Satisfaction Problems Rich and Knight: 3.5 Russell and Norvig: Chapter 3, Section 3.7 Chapter 4, Pages Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/home.htm.
Dr. Shazzad Hosain Department of EECS North South University Lecture 01 – Part C Constraint Satisfaction Problems.
PSU CS 370 – Introduction to Artificial Intelligence 1 Constraint Satisfaction Problems.
1 Constraint Satisfaction Problems (CSP). Announcements Second Test Wednesday, April 27.
Constraint Satisfaction Problems Russell and Norvig: Chapter 5 CMSC 421 – Fall 2006.
CS 561, Session 8 1 This time: constraint satisfaction - Constraint Satisfaction Problems (CSP) - Backtracking search for CSPs - Local search for CSPs.
Constraint Satisfaction Problems Lecture # 14, 15 & 16
Constraint Satisfaction Problems
Planning: Representation and Forward Search
CS 188: Artificial Intelligence
Computer Science cpsc322, Lecture 14
CS B551: Elements of Artificial Intelligence
Planning: Representation and Forward Search
Constraint Satisfaction Problems
Artificial Intelligence
Constraint Satisfaction Problems
Constraint satisfaction problems
Constraint Satisfaction Problems. A Quick Overview
Constraint Satisfaction
CS 8520: Artificial Intelligence
Constraint Satisfaction Problems
Constraint satisfaction problems
Planning: Representation and Forward Search
Presentation transcript:

Constraint Satisfaction Problems Russell and Norvig: Parts of Chapter 5 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang Lin.

Intro Example 1: 4 Queens

X1 {1,2,3,4} X3 {1,2,3,4} X4 {1,2,3,4} X2 {1,2,3,4} X1 X2 X3 X4

Intro Example 1: 4 Queens X1 {1,2,3,4} X3 {1,2,3,4} X4 {1,2,3,4} X2 {1,2,3,4} X1 X2 X3 X4

Intro Example 1: 4 Queens X1 {1,2,3,4} X3 {1,2,,4} X4 {1,2,3,4} X2 {,,3,4} X1 X2 X3 X4

Intro Example 1: 4 Queens X1 {1,2,3,4} X3 {,2,, } X4 {1,,,4} X2 {1,2,3, } X1 X2 X3 X4

Intro Example 1: 4 Queens X1 {,2,3,4} X3 {1,2,3,4} X4 {1,2,3,4} X2 {1,2,3,4} X1 X2 X3 X4

Intro Example 1: 4 Queens X1 {1,2,3,4} X3 {1,,3, } X4 {1,,3,4} X2 {1,2,3,4} X1 X2 X3 X4

Intro Example 1: 4 Queens X1 {,2,3,4} X3 {1,,,4} X4 {,,3,4} X2 {,,,4} X1 X2 X3 X4

Intro Example 1: 4 Queens X1 {,2,3,4} X3 {1,,,4} X4 {,,3,4} X2 {,,,4} X1 X2 X3 X4

Intro Example 1: 4 Queens X1 {,2,3,4} X3 {1,,,4} X4 {,,3, } X2 {,,,4} X1 X2 X3 X4

Intro Example 1: 4 Queens X1 {1,2,3,4} X3 {1,2,3,4} X4 {1,2,3,4} X2 {1,2,3,4} X1 X2 X3 X4

Intro Example 2: 8-Queens

Intro Example 2: 8-Queens

Intro Example 2: 8-Queens

Intro Example 2: 8-Queens

Intro Example 2: 8-Queens

Intro Example 2: 8-Queens

What is Needed? Not just a successor function and goal test But also a means to propagate the constraints imposed by one queen on the others and an early failure test  Explicit representation of constraints and constraint manipulation algorithms

Constraint Satisfaction Problem Set of variables {X 1, X 2, …, X n } Each variable X i has a domain D i of possible values. Usually, D i is discrete and finite Set of constraints {C 1, C 2, …, C p } Each constraint C k involves a subset of variables and specifies the allowable combinations of values of these variables Assign a value to every variable such that all constraints are satisfied

Example: 8-Queens Problem 64 variables X ij, i = 1 to 8, j = 1 to 8 Domain for each variable {1,0} Constraints are of the forms: X ij = 1  X ik = 0 for all k = 1 to 8, k  j X ij = 1  X kj = 0 for all k = 1 to 8, k  i Similar constraints for diagonals   X ij = 8

Example: 8-Queens Problem 8 variables X i, i = 1 to 8 Domain for each variable {1,2,…,8} Constraints are of the forms: X i = k  X j  k for all j = 1 to 8, j  i Similar constraints for diagonals

CSP as a Search Problem Initial state: empty assignment Successor function: a value is assigned to any unassigned variable, which does not conflict with the currently assigned variables Goal test: the assignment is complete Path cost: irrelevant n variables of domain size d  O(d n ) distinct complete assignments

Compare!! Most-constraining-variable heuristic: Select the variable that is involved in the largest number of constraints on other unassigned variables. (Rationale: maximize the number of values eliminated, hence future branching factors) Least-constraining-value heuristic: Prefer the value that leaves the largest subset of legal values for other unassigned variables Each variable will eventually have a value assigned to it (so, pick first the most-constraining one) but a value does not have to be assigned (so, pick first the least-constraining one)

Local Search for CSP Pick initial complete assignment (at random) Repeat Pick a conflicted variable var (at random) Set the new value of var to minimize the number of conflicts If the new assignment is not conflicting then return it (min-conflicts heuristics)

Why Does It Work? Local search with min-conflict heuristic works extremely well for million-queen problems The reason: Solutions are densely distributed in the O(n n ) space, which means that on the average a solution is only a few steps away from a randomly picked assignment

Applications CSP techniques have allowed solving very complex problems Numerous applications, e.g.: Crew assignments to flights Management of transportation fleet Flight/rail schedules Task scheduling in port operations Design Brain surgery

Stereotaxic Brain Surgery

2000 < Tumor < < B2 + B4 < < B4 < < B3 + B4 < < B3 < < B1 + B3 + B4 < < B1 + B4 < < B1 + B2 + B4 < < B1 < < B1 + B2 < < Critical < < B2 < 500 T C B1 B2 B3 B4 T

Stereotaxic Brain Surgery

 Constraint Programming “Constraint programming represents one of the closest approaches computer science has yet made to the Holy Grail of programming: the user states the problem, the computer solves it.” Eugene C. Freuder, Constraints, April 1997