Constraint Satisfaction Problems (CSP) (Where we postpone making difficult

Size: px
Start display at page:

Download "Constraint Satisfaction Problems (CSP) (Where we postpone making difficult"

Transcription

1 Constraint Satisfaction Problems (CSP) (Where we postpone making difficult decisions until they become easy to make) R&N: Chap. What we will try to do... Search techniques make choices in an often arbitrary order. Often little information is available to make each of them In many yp problems, the same states can be reached independent of the order in which choices are made ( commutative actions) Can we solve such problems more efficiently by picking the order appropriately? Can we even avoid making any choice? Place a queen in a square Remove the attacked squares from future consideration Count the number of non-attacked squares in every row and column Place a queen in a row or column with minimum number Remove the attacked squares from future consideration Repeat 6

2 What do we need? More than just a successor function and a goal test We also need: A means to propagate the constraints imposed by one queen s position on the positions of the other queens An early failure test Explicit representation of constraints Constraint propagation algorithms

3 Constraint Satisfaction Problem (CSP) Set of variables {,,, X n } Each variable X i has a domain D i of possible values. Usually, D i is finite Set of constraints {C, C,, C p } Each constraint relates a subset of variables by specifying the valid combinations of their values Goal: Assign a value to every variable such that all constraints are satisfied Map Coloring N 7 variables {,N,,,,,} Each variable has the same domain: {red, green, blue} No two adjacent variables have the same value: N,, N, N,,,,, 8-ueen Problem 8 variables X i, i = to 8 he domain of each variable is: {,,,8} Constraints are of the forms: X i = k X j k for all j = to 8, j i Similar constraints for diagonals All constraints are binary Street Puzzle N i = {English, Spaniard, Japanese, Italian, Norwegian} C i = {Red, Green, White, Yellow, Blue} D i = {ea, Coffee, Milk, Fruit-juice, Water} J i = {Painter, Sculptor, Diplomat, iolinist, Doctor} A i = {Dog, Snails, Fox, Horse, Zebra} he Englishman lives in the Red house he Spaniard has a Dog he Japanese is a Painter he Italian drinks ea he Norwegian lives in the first house on the left he owner of the Green house drinks Coffee he Green house is on the right of the White house he Sculptor breeds Snails he Diplomat lives in the Yellow house he owner of the middle house drinks Milk he Norwegian lives next door to the Blue house he iolinist drinks Fruit juice he Fox is in the house next to the Doctor s he Horse is next to the Diplomat s Who owns the Zebra? Who drinks Water? 6 Street Puzzle N i = {English, Spaniard, Japanese, Italian, Norwegian} C i = {Red, Green, White, Yellow, Blue} D i = {ea, Coffee, Milk, Fruit-juice, Water} J i = {Painter, Sculptor, Diplomat, iolinist, Doctor} A i = {Dog, Snails, Fox, Horse, Zebra} i,j [,], i j, N i N j he Englishman lives in the Red house he Spaniard has a Dog i,j [,], i j, C i C j he Japanese is a Painter... he Italian drinks ea he Norwegian lives in the first house on the left he owner of the Green house drinks Coffee he Green house is on the right of the White house he Sculptor breeds Snails he Diplomat lives in the Yellow house he owner of the middle house drinks Milk he Norwegian lives next door to the Blue house he iolinist drinks Fruit juice he Fox is in the house next to the Doctor s he Horse is next to the Diplomat s 7 Street Puzzle N i = {English, Spaniard, Japanese, Italian, Norwegian} C i = {Red, Green, White, Yellow, Blue} D i = {ea, Coffee, Milk, Fruit-juice, Water} J i = {Painter, Sculptor, Diplomat, iolinist, Doctor} A i = {Dog, Snails, Fox, Horse, Zebra} he Englishman lives in the Red house (N i = English) (C i = Red) he Spaniard has a Dog he Japanese is a Painter (N i = Japanese) (J i = Painter) he Italian drinks ea he Norwegian lives in the first house on the left (N = Norwegian) he owner of the Green house drinks Coffee he Green house is on the right of the White house he Sculptor breeds Snails he Diplomat lives in the Yellow house he owner of the middle house drinks Milk (C i = White) (C i+ = Green) (C White) he Norwegian lives next door to the Blue house (C Green) he iolinist drinks Fruit juice he Fox is in the house next to the Doctor s he Horse is next to the Diplomat s left as an exercise 8

4 Street Puzzle N i = {English, Spaniard, Japanese, Italian, Norwegian} C i = {Red, Green, White, Yellow, Blue} D i = {ea, Coffee, Milk, Fruit-juice, Water} J i = {Painter, Sculptor, Diplomat, iolinist, Doctor} A i = {Dog, Snails, Fox, Horse, Zebra} he Englishman lives in the Red house (N i = English) (C i = Red) he Spaniard has a Dog he Japanese is a Painter (N i = Japanese) (J i = Painter) he Italian drinks ea he Norwegian lives in the first house on the left (N = Norwegian) he owner of the Green house drinks Coffee he Green house is on the right of the White house he Sculptor breeds Snails he Diplomat lives in the Yellow house he owner of the middle house drinks Milk (C i = White) (C i+ = Green) (C White) he Norwegian lives next door to the Blue house (C Green) he iolinist drinks Fruit juice he Fox is in the house next to the Doctor s he Horse is next to the Diplomat s unary constraints 9 Street Puzzle N i = {English, Spaniard, Japanese, Italian, Norwegian} C i = {Red, Green, White, Yellow, Blue} D i = {ea, Coffee, Milk, Fruit-juice, Water} J i = {Painter, Sculptor, Diplomat, iolinist, Doctor} A i = {Dog, Snails, Fox, Horse, Zebra} he Englishman lives in the Red house he Spaniard has a Dog he Japanese is a Painter he Italian drinks ea he Norwegian lives in the first house on the left N = Norwegian he owner of the Green house drinks Coffee he Green house is on the right of the White house he Sculptor breeds Snails he Diplomat lives in the Yellow house he owner of the middle house drinks Milk D = Milk he Norwegian lives next door to the Blue house he iolinist drinks Fruit juice he Fox is in the house next to the Doctor s he Horse is next to the Diplomat s 0 Street Puzzle N i = {English, Spaniard, Japanese, Italian, Norwegian} C i = {Red, Green, White, Yellow, Blue} D i = {ea, Coffee, Milk, Fruit-juice, Water} J i = {Painter, Sculptor, Diplomat, iolinist, Doctor} A i = {Dog, Snails, Fox, Horse, Zebra} he Englishman lives in the Red house C Red he Spaniard has a Dog A Dog he Japanese is a Painter he Italian drinks ea he Norwegian lives in the first house on the left N = Norwegian he owner of the Green house drinks Coffee he Green house is on the right of the White house he Sculptor breeds Snails he Diplomat lives in the Yellow house he owner of the middle house drinks Milk D = Milk he Norwegian lives next door to the Blue house he iolinist drinks Fruit juice J iolinist he Fox is in the house next to the Doctor s he Horse is next to the Diplomat s ask Scheduling Four tasks,,, and are related by time constraints: must be done during must be achieved before starts must overlap with must start after is complete Are the constraints compatible? What are the possible time relations between two tasks? What if the tasks use resources in limited supply? How to formulate this problem as a CSP? - Finite vs. Infinite CSP n Boolean variables u,..., u n p constraints of the form u i * u j * u k *= where u* stands for either u or u Known to be NP-complete Finite CSP: each variable has a finite domain of values Infinite CSP: some or all variables have an infinite domain E.g., linear programming problems over the reals: for i =,,..., p : ai,x +ai,x +...+ai,nx n = ai,0 for j =,,..., q : bj,x +bj,x +...+bj,nx n bj,0 We will only consider finite CSP

5 CSP as a Search Problem n variables,..., X n alid assignment: {X i v i,..., X ik v ik }, 0 k n, such that the values v i,..., v ik satisfy all constraints relating the variables X i,..., X ik Complete assignment: one where k = n [if all variable domains have size d, there are O(d n ) complete assignments] States: valid assignments Initial state: empty assignment {}, i.e. k = 0 Successor of a state: {X i v i,..., X ik v ik } {X i v i,..., X ik v ik, X ik+ v ik+ } Goal test: k = n {X i v i,..., X ik v ik, X ik+ v ik+} {X i v i,..., X ik v ik } r = n k variables with s values r s branching factor 6 A Key property of CSP: Commutativity he order in which variables are assigned values has no impact on the reachable complete valid assignments {X i v i,..., X ik v ik } Hence: ) One can expand a node N by first selecting one variable X not in the assignment A associated with N and then assigning every value v in the domain of X [ big reduction in branching factor] 7 {X i v i,..., X ik v ik, X ik+ v ik+} r = n k n-k variables with s values r s s branching factor he depth of the solutions in the search tree is un-changed (n) 8 variables,..., X Let the valid assignment of N be: A = { v, v } For example pick variable X Let the domain of X be {v,, v,, v,} he successors of A are all the valid assignments among: { v, v, X v, } { v, v, X v, } { v, v, X v, } 9 A Key property of CSP: Commutativity he order in which variables are assigned values has no impact on the reachable complete valid assignments Hence: ) One can expand a node N by first selecting one variable X not in the assignment A associated with N and then assigning every value v in the domain of X [ big reduction in branching factor] ) One need not store the path to a node 0 Backtracking search algorithm

6 Essentially a simplified depth-first algorithm using recursion Assignment = {} v Assignment = {(, )} Assignment = {(, ), (,v )} v hen, the search algorithm backtracks to the previous variable ( ) and tries another value v Assume that no value of X leads to a valid assignment Assignment = {(, ), (,v )} Assignment = {(, ), (, )} 6 6

7 v he search algorithm backtracks to the previous variable ( ) and tries another value. But assume that t has only two possible values. he algorithm backtracks to v v Assume again that no value of leads to a valid assignment Assignment = {(, ), (, )} 7 Assignment = {(,v )} 8 v v v v v v he algorithm need not consider the variables in the same order in this sub-tree as in the other Assignment = {(,v ), (,v )} 9 Assignment = {(,v ), (,v )} 0 v v v v v v he algorithm need not consider the values of in the same order in this sub-tree Assignment = {(,v ), (,v ), (, )} Assignment = {(,v ), (,v ), (, )} 7

8 v v Assignment = {(,v ), (,v ), (, )} v Since there are only three variables, the assignment is complete Backtracking Algorithm CSP-BACKRACKING(A). If assignment A is complete then return A. X select a variable not in A. D select an ordering on the domain of X. For each value v in D do a. Add (X v) to A b. If A is valid then i. result CSP-BACKRACKING(A) ii. If result failure then return result c. Remove (X v) from A. Return failure Call CSP-BACKRACKING({}) [his recursive algorithm keeps too much data in memory. An iterative version could save memory (left as an exercise)] Critical uestions for the Efficiency of CSP-Backtracking CSP-BACKRACKING(A). If assignment A is complete then return A. X select a variable not in A. D select an ordering on the domain of X. For each value v in D do a. Add (X v) to A b. If a is valid then i. result CSP-BACKRACKING(A) ii. If result failure then return result c. Remove (X v) from A. Return failure Critical uestions for the Efficiency of CSP-Backtracking ) Which variable X should be assigned a value next? he current assignment may not lead to any solution, but the algorithm still does know it. Selecting the right variable to which to assign a value may help discover the contradiction more quickly ) In which order should X s values be assigned? he current assignment may be part of a solution. Selecting the right value to assign to X may help discover this solution more quickly More on these questions in a short while... 6 Critical uestions for the Efficiency of CSP-Backtracking ) Which variable X should be assigned a value next? he current assignment may not lead to any solution, but the algorithm does not know it yet. Selecting the right variable X may help discover the contradiction more quickly ) In which order should X s values be assigned? he current assignment may be part of a solution. Selecting the right value to assign to X may help discover this solution more quickly Critical uestions for the Efficiency of CSP-Backtracking ) Which variable X should be assigned a value next? he current assignment may not lead to any solution, but the algorithm does not know it yet. Selecting the right variable X may help discover the contradiction more quickly ) In which order should X s values be assigned? he current assignment may be part of a solution. Selecting the right value to assign to X may help discover this solution more quickly More on these questions in a short while... 7 More on these questions in a short while

9 Critical uestions for the Efficiency of CSP-Backtracking ) Which variable X should be assigned a value next? he current assignment may not lead to any solution, but the algorithm does not know it yet. Selecting the right variable X may help discover the contradiction more quickly ) In which order should X s values be assigned? he current assignment may be part of a solution. Selecting the right value to assign to X may help discover this solution more quickly X X X 6 X 7 X 8 Forward Checking A simple constraint-propagation technique: Assigning the value to leads to removing values from the domains of,,..., X 8 More on these questions very soon Forward Checking in Map Coloring Forward Checking in Map Coloring N Constraint graph N N RGB RGB RGB RGB RGB RGB RGB N RGB RGB RGB RGB RGB RGB RGB R RGB RGB RGB RGB RGB RGB Forward checking removes the value Red of N and of Forward Checking in Map Coloring Forward Checking in Map Coloring N N N RGB RGB RGB RGB RGB RGB RGB R GB RGB RGB RGB GB RGB R GB G RGB RGB GB RGB N RGB RGB RGB RGB RGB RGB RGB R GB RGB RGB RGB GB RGB R B G RB RGB B RGB R B G RB B B RGB 9

10 Forward Checking in Map Coloring Empty set: the current assignment {( R), ( G), ( B)} does not lead to a solution N RGB RGB RGB RGB RGB RGB RGB R GB RGB RGB RGB GB RGB R B G RB RGB B RGB R B G RB B B RGB Forward Checking (General Form) Whenever a pair (X v) is added to assignment A do: For each variable Y not in A do: For every constraint C relating Y to the variables in A do: Remove all values from Y s domain that do not satisfy C 6 Modified Backtracking Algorithm CSP-BACKRACKING(A, var-domains). If assignment A is complete then return A. X select a variable not in A. D select an ordering on the domain of X. For each value v in D do a. Add (X v) to A b. var-domains forward checking(var-domains, X, v, A) c. If no variable has an empty domain then (i) result CSP-BACKRACKING(A, var-domains) (ii) If result failure then return result d. Remove (X v) from A. Return failure 7 Modified Backtracking Algorithm CSP-BACKRACKING(A, var-domains). If assignment A is complete then return A. X select a variable not in A. D select an ordering on the domain of X. For each value v in D do No need any more to a. Add (X v) to A verify that A is valid b. var-domains forward checking(var-domains, X, v, A) c. If no variable has an empty domain then (i) result CSP-BACKRACKING(A, var-domains) (ii) If result failure then return result d. Remove (X v) from A. Return failure 8 Modified Backtracking Algorithm CSP-BACKRACKING(A, var-domains). If assignment A is complete then return A. X select a variable not in A. D select an ordering on the domain of X. For each value v in D do a. Add (X v) to A b. var-domains forward checking(var-domains, X, v, A) c. If no variable has an empty domain then (i) result CSP-BACKRACKING(A, var-domains) (ii) If result failure then return result d. Remove (X v) from A. Return failure Need to pass down the updated variable domains 9 Modified Backtracking Algorithm CSP-BACKRACKING(A, var-domains). If assignment A is complete then return A. X select a variable not in A. D select an ordering on the domain of X. For each value v in D do a. Add (X v) to A b. var-domains forward checking(var-domains, X, v, A) c. If no variable has an empty domain then (i) result CSP-BACKRACKING(A, var-domains) (ii) If result failure then return result d. Remove (X v) from A. Return failure 60 0

11 ) Which variable X i should be assigned a value next? Most-constrained-variable heuristic Most-constraining-variable heuristic ) In which order should its values be assigned? Least-constraining-value heuristic hese heuristics can be quite confusing Keep in mind that all variables must eventually get a value, while only one value from a domain must be assigned to each variable 6 Most-Constrained-ariable Heuristic ) Which variable X i should be assigned a value next? Select the variable with the smallest remaining domain [Rationale: Minimize the branching factor] 6 8-ueens 8-ueens Forward checking Forward checking New assignment New assignment Numbers of values for each un-assigned variable New numbers of values for each un-assigned variable 6 6 Map Coloring N s remaining domain has size (value Blue remaining) s remaining domain has size s, s, and s remaining domains have size Select 6 Most-Constraining-ariable Heuristic ) Which variable X i should be assigned a value next? Among the variables with the smallest remaining domains (ties with respect to the most-constrained-variable heuristic), select the one that appears in the largest number of constraints on variables not in the current assignment [Rationale: Increase future elimination of values, to reduce future branching factors] 66

12 Map Coloring N Before any value has been assigned, all variables have a domain of size, but is involved in more constraints () than any other variable Select and assign a value to it (e.g., Blue) 67 Least-Constraining-alue Heuristic ) In which order should X s values be assigned? Select the value of X that removes the smallest number of values from the domains of those variables which are not in the current assignment [Rationale: Since only one value will eventually be assigned to X, pick the least-constraining value first, since it is the most likely not to lead to an invalid assignment] [Note: Using this heuristic requires performing a forward-checking step for every value, not just for 68 the selected value] Map Coloring Map Coloring N N {} {Blue} s domain has two remaining values: Blue and Red Assigning Blue to would leave 0 value for, while assigning Red would leave value 69 s domain has two remaining values: Blue and Red Assigning Blue to would leave 0 value for, while assigning Red would leave value So, assign Red to 70 Modified Backtracking Algorithm CSP-BACKRACKING(A, var-domains). If assignment A is complete then return A. X select a variable not in A. D select an ordering on the domain of X. For each value v in D do a. Add (X v) to A ) Most-constrained-variable heuristic b. var-domains forward checking(var-domains, X, v, A) ) Most-constraining-variable heuristic c. If no variable has an empty domain then (i) result CSP-BACKRACKING(A, var-domains) (ii) If result failure then return result d. Remove (X v) from A ) Least-constraining-value heuristic. Return failure Applications of CSP CSP techniques are widely used Applications include: Crew assignments to flights Management of transportation fleet Flight/rail schedules Job shop scheduling ask scheduling in port operations Design, including spatial layout design Radiosurgical procedures 7 7

13 Radiosurgery Problem Minimally invasive procedure that uses a beam of radiation as an ablative surgical instrument to destroy tumors umor = bad Critical structures = good and sensitive Brain = good Burn tumor without damaging healthy tissue 7 7 he CyberKnife linear accelerator robot arm Inputs ) Regions of interest X-Ray cameras 7 76 Inputs Beam Sampling ) Dose constraints Dose to tumor Dose to critical structure Critical umor Falloff of dose around tumor Falloff of dose in critical structure 77 78

14 Constraints Case Results B B C B 000 < umor < < B + B < < B < < B + B < < B < < B + B + B < < B + B < < B + B + B < < B < < B + B < 00 B 000 umor B + B B B + B B B + B + B B + B B + B + B B B + B 00 0 Critical 00 0 B < umor < < B 000 < B B + B + B < 00 B + B + B < < B 79 0% Isodose Surface 80% Isodose Surface LINAC system Cyberknife 80 8

Constraint Satisfaction Problems (CSP)

Constraint Satisfaction Problems (CSP) Constraint Satisfaction Problems (CSP) (Where we postpone making difficult decisions until they become easy to make) R&N: Chap. 5 1 What we will try to do... Search techniques make choices in an often

More information

Lecture 1. Introduction

Lecture 1. Introduction Lecture 1 1 Constraint Programming Alternative approach to programming Combination of reasoning and computing Constraint on a sequence of variables: a relation on their domains Constraint Satisfaction

More information

Constraint Satisfaction Problems. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe

Constraint Satisfaction Problems. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe Constraint Satisfaction Problems slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe Standard search problems: State is a black box : arbitrary data structure Goal test

More information

Objectives. Principles of Constraint Programming Krzysztof R. Apt. Chapter 2 Constraint Satisfaction Problems: Examples. Example: SEND + MORE = MONEY

Objectives. Principles of Constraint Programming Krzysztof R. Apt. Chapter 2 Constraint Satisfaction Problems: Examples. Example: SEND + MORE = MONEY Objectives Principles of Constraint Programming Krzysztof R. pt Chapter 2 Constraint Satisfaction Problems: xamples Define formally Constraint Satisfaction Problems (CSP), Modeling: representation of a

More information

Constraint satisfaction search. Combinatorial optimization search.

Constraint satisfaction search. Combinatorial optimization search. CS 1571 Introduction to AI Lecture 8 Constraint satisfaction search. Combinatorial optimization search. Milos Hauskrecht milos@cs.pitt.edu 539 Sennott Square Constraint satisfaction problem (CSP) Objective:

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available at http://ai.berkeley.edu.] What is Search

More information

Constraint satisfaction search

Constraint satisfaction search CS 70 Foundations of AI Lecture 6 Constraint satisfaction search Milos Hauskrecht milos@cs.pitt.edu 539 Sennott Square Search problem A search problem: Search space (or state space): a set of objects among

More information

What is Search For? CS 188: Artificial Intelligence. Constraint Satisfaction Problems

What is Search For? CS 188: Artificial Intelligence. Constraint Satisfaction Problems CS 188: Artificial Intelligence Constraint Satisfaction Problems What is Search For? Assumptions about the world: a single agent, deterministic actions, fully observed state, discrete state space Planning:

More information

Solving Constraint Satisfaction Problems Using Equivalence Relations. Author: Carl Devore

Solving Constraint Satisfaction Problems Using Equivalence Relations. Author: Carl Devore LogicProblem.mws 31 March 2001 Solving Constraint Satisfaction Problems Using Equivalence Relations Author: Carl Devore If you use this program, please send me email at ,

More information

CS 343: Artificial Intelligence

CS 343: Artificial Intelligence CS 343: Artificial Intelligence Constraint Satisfaction Problems Prof. Scott Niekum The University of Texas at Austin [These slides are based on those of Dan Klein and Pieter Abbeel for CS188 Intro to

More information

Admin. Quick search recap. Constraint Satisfaction Problems (CSPs)! Intro Example: 8-Queens. Where should I put the queens in columns 3 and 4?

Admin. Quick search recap. Constraint Satisfaction Problems (CSPs)! Intro Example: 8-Queens. Where should I put the queens in columns 3 and 4? Admin Constraint Satisfaction Problems (CSPs)! CS David Kauchak Spring 0 Final project comments: Use preexisting code Get your data now! Use preexisting data sets Finding good references Google scholar

More information

Lecture 6: Constraint Satisfaction Problems (CSPs)

Lecture 6: Constraint Satisfaction Problems (CSPs) Lecture 6: Constraint Satisfaction Problems (CSPs) CS 580 (001) - Spring 2018 Amarda Shehu Department of Computer Science George Mason University, Fairfax, VA, USA February 28, 2018 Amarda Shehu (580)

More information

Material. Thought Question. Outline For Today. Example: Map-Coloring EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Material. Thought Question. Outline For Today. Example: Map-Coloring EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 6, 4/20/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes Material Read all of chapter

More information

Constraint Satisfaction. CS 486/686: Introduction to Artificial Intelligence

Constraint Satisfaction. CS 486/686: Introduction to Artificial Intelligence Constraint Satisfaction CS 486/686: Introduction to Artificial Intelligence 1 Outline What are Constraint Satisfaction Problems (CSPs)? Standard Search and CSPs Improvements Backtracking Backtracking +

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems In which we see how treating states as more than just little black boxes leads to the invention of a range of powerful new search methods and a deeper understanding of

More information

CS 188: Artificial Intelligence. What is Search For? Constraint Satisfaction Problems. Constraint Satisfaction Problems

CS 188: Artificial Intelligence. What is Search For? Constraint Satisfaction Problems. Constraint Satisfaction Problems CS 188: Artificial Intelligence Constraint Satisfaction Problems Constraint Satisfaction Problems N variables domain D constraints x 1 x 2 Instructor: Marco Alvarez University of Rhode Island (These slides

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Section 1 3 Constraint Satisfaction 1 Outline Constraint Satisfaction Problems (CSP) Backtracking search for CSPs Local search for CSPs Constraint Satisfaction

More information

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Fall 2011 Announcements Project 1: Search is due next week Written 1: Search and CSPs out soon Piazza: check it out if you haven t CS 188: Artificial Intelligence Fall 2011 Lecture 4: Constraint Satisfaction 9/6/2011

More information

Constraint Satisfaction

Constraint Satisfaction Constraint Satisfaction Philipp Koehn 1 October 2015 Outline 1 Constraint satisfaction problems (CSP) examples Backtracking search for CSPs Problem structure and problem decomposition Local search for

More information

CONSTRAINT SATISFACTION

CONSTRAINT SATISFACTION 9// CONSRAI ISFACION oday Reading AIMA Chapter 6 Goals Constraint satisfaction problems (CSPs) ypes of CSPs Inference Search + Inference 9// 8-queens problem How would you go about deciding where to put

More information

Announcements. Homework 1: Search. Project 1: Search. Midterm date and time has been set:

Announcements. Homework 1: Search. Project 1: Search. Midterm date and time has been set: Announcements Homework 1: Search Has been released! Due Monday, 2/1, at 11:59pm. On edx online, instant grading, submit as often as you like. Project 1: Search Has been released! Due Friday 2/5 at 5pm.

More information

Announcements. CS 188: Artificial Intelligence Spring Today. Example: Map-Coloring. Example: Cryptarithmetic.

Announcements. CS 188: Artificial Intelligence Spring Today. Example: Map-Coloring. Example: Cryptarithmetic. CS 188: Artificial Intelligence Spring 2010 Lecture 5: CSPs II 2/2/2010 Pieter Abbeel UC Berkeley Many slides from Dan Klein Announcements Project 1 due Thursday Lecture videos reminder: don t count on

More information

CS 4100 // artificial intelligence

CS 4100 // artificial intelligence CS 4100 // artificial intelligence instructor: byron wallace Constraint Satisfaction Problems Attribution: many of these slides are modified versions of those distributed with the UC Berkeley CS188 materials

More information

Announcements. CS 188: Artificial Intelligence Fall 2010

Announcements. CS 188: Artificial Intelligence Fall 2010 Announcements Project 1: Search is due Monday Looking for partners? After class or newsgroup Written 1: Search and CSPs out soon Newsgroup: check it out CS 188: Artificial Intelligence Fall 2010 Lecture

More information

Announcements. Homework 4. Project 3. Due tonight at 11:59pm. Due 3/8 at 4:00pm

Announcements. Homework 4. Project 3. Due tonight at 11:59pm. Due 3/8 at 4:00pm Announcements Homework 4 Due tonight at 11:59pm Project 3 Due 3/8 at 4:00pm CS 188: Artificial Intelligence Constraint Satisfaction Problems Instructor: Stuart Russell & Sergey Levine, University of California,

More information

Constraint Satisfaction Problems. A Quick Overview (based on AIMA book slides)

Constraint Satisfaction Problems. A Quick Overview (based on AIMA book slides) Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides) Constraint satisfaction problems What is a CSP? Finite set of variables V, V 2,, V n Nonempty domain of possible values for

More information

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable //7 Review: Constraint Satisfaction Problems Constraint Satisfaction Problems II AIMA: Chapter 6 A CSP consists of: Finite set of X, X,, X n Nonempty domain of possible values for each variable D, D, D

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2013 Soleymani Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition,

More information

Example: Map-Coloring. Constraint Satisfaction Problems Western Australia. Example: Map-Coloring contd. Outline. Constraint graph

Example: Map-Coloring. Constraint Satisfaction Problems Western Australia. Example: Map-Coloring contd. Outline. Constraint graph Example: Map-Coloring Constraint Satisfaction Problems Western Northern erritory ueensland Chapter 5 South New South Wales asmania Variables, N,,, V, SA, Domains D i = {red,green,blue} Constraints: adjacent

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Last update: February 25, 2010 Constraint Satisfaction Problems CMSC 421, Chapter 5 CMSC 421, Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local

More information

CS W4701 Artificial Intelligence

CS W4701 Artificial Intelligence CS W4701 Artificial Intelligence Fall 2013 Chapter 6: Constraint Satisfaction Problems Jonathan Voris (based on slides by Sal Stolfo) Assignment 3 Go Encircling Game Ancient Chinese game Dates back At

More information

CSE 473: Artificial Intelligence

CSE 473: Artificial Intelligence CSE 473: Artificial Intelligence Constraint Satisfaction Luke Zettlemoyer Multiple slides adapted from Dan Klein, Stuart Russell or Andrew Moore What is Search For? Models of the world: single agent, deterministic

More information

Artificial Intelligence Constraint Satisfaction Problems

Artificial Intelligence Constraint Satisfaction Problems Artificial Intelligence Constraint Satisfaction Problems Recall Search problems: Find the sequence of actions that leads to the goal. Sequence of actions means a path in the search space. Paths come with

More information

Constraint Satisfaction Problems. Chapter 6

Constraint Satisfaction Problems. Chapter 6 Constraint Satisfaction Problems Chapter 6 Constraint Satisfaction Problems A constraint satisfaction problem consists of three components, X, D, and C: X is a set of variables, {X 1,..., X n }. D is a

More information

Announcements. Reminder: CSPs. Today. Example: N-Queens. Example: Map-Coloring. Introduction to Artificial Intelligence

Announcements. Reminder: CSPs. Today. Example: N-Queens. Example: Map-Coloring. Introduction to Artificial Intelligence Introduction to Artificial Intelligence 22.0472-001 Fall 2009 Lecture 5: Constraint Satisfaction Problems II Announcements Assignment due on Monday 11.59pm Email search.py and searchagent.py to me Next

More information

Comments about assign 1. Quick search recap. Constraint Satisfaction Problems (CSPs) Search uninformed BFS, DFS, IDS. Adversarial search

Comments about assign 1. Quick search recap. Constraint Satisfaction Problems (CSPs) Search uninformed BFS, DFS, IDS. Adversarial search Constraint Satisfaction Problems (CSPs) CS5 David Kauchak Fall 00 http://www.xkcd.com/78/ Some material borrowed from: Sara Owsley Sood and others Comments about assign Grading actually out of 60 check

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search for CSPs Chapter 5 2 Constraint satisfaction

More information

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 30 January, 2018

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 30 January, 2018 DIT411/TIN175, Artificial Intelligence Chapter 7: Constraint satisfaction problems CHAPTER 7: CONSTRAINT SATISFACTION PROBLEMS DIT411/TIN175, Artificial Intelligence Peter Ljunglöf 30 January, 2018 1 TABLE

More information

What is Search For? CSE 473: Artificial Intelligence. Example: N-Queens. Example: N-Queens. Example: Map-Coloring 4/7/17

What is Search For? CSE 473: Artificial Intelligence. Example: N-Queens. Example: N-Queens. Example: Map-Coloring 4/7/17 CSE 473: Artificial Intelligence Constraint Satisfaction Dieter Fox What is Search For? Models of the world: single agent, deterministic actions, fully observed state, discrete state space Planning: sequences

More information

Example: Map coloring

Example: Map coloring Today s s lecture Local Search Lecture 7: Search - 6 Heuristic Repair CSP and 3-SAT Solving CSPs using Systematic Search. Victor Lesser CMPSCI 683 Fall 2004 The relationship between problem structure and

More information

Australia Western Australia Western Territory Northern Territory Northern Australia South Australia South Tasmania Queensland Tasmania Victoria

Australia Western Australia Western Territory Northern Territory Northern Australia South Australia South Tasmania Queensland Tasmania Victoria Constraint Satisfaction Problems Chapter 5 Example: Map-Coloring Western Northern Territory South Queensland New South Wales Tasmania Variables WA, NT, Q, NSW, V, SA, T Domains D i = {red,green,blue} Constraints:

More information

Lecture 18. Questions? Monday, February 20 CS 430 Artificial Intelligence - Lecture 18 1

Lecture 18. Questions? Monday, February 20 CS 430 Artificial Intelligence - Lecture 18 1 Lecture 18 Questions? Monday, February 20 CS 430 Artificial Intelligence - Lecture 18 1 Outline Chapter 6 - Constraint Satisfaction Problems Path Consistency & Global Constraints Sudoku Example Backtracking

More information

Constraint satisfaction problems. CS171, Winter 2018 Introduction to Artificial Intelligence Prof. Richard Lathrop

Constraint satisfaction problems. CS171, Winter 2018 Introduction to Artificial Intelligence Prof. Richard Lathrop Constraint satisfaction problems CS171, Winter 2018 Introduction to Artificial Intelligence Prof. Richard Lathrop Constraint Satisfaction Problems What is a CSP? Finite set of variables, X 1, X 2,, X n

More information

Constraint Satisfaction Problems (CSPs) Introduction and Backtracking Search

Constraint Satisfaction Problems (CSPs) Introduction and Backtracking Search Constraint Satisfaction Problems (CSPs) Introduction and Backtracking Search This lecture topic (two lectures) Chapter 6.1 6.4, except 6.3.3 Next lecture topic (two lectures) Chapter 7.1 7.5 (Please read

More information

Constraint Satisfaction Problems Part 2

Constraint Satisfaction Problems Part 2 Constraint Satisfaction Problems Part 2 Deepak Kumar October 2017 CSP Formulation (as a special case of search) State is defined by n variables x 1, x 2,, x n Variables can take on values from a domain

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search for CSPs Chapter 5 2 Constraint satisfaction

More information

CONSTRAINT SATISFACTION

CONSTRAINT SATISFACTION CONSRAI ISFACION oday Constraint satisfaction problems (CSPs) ypes of CSPs Inference Search 1 8-queens problem Exploit the constraints Constraint Satisfaction Problems Advantages of CSPs Use general-purpose

More information

Space of Search Strategies. CSE 573: Artificial Intelligence. Constraint Satisfaction. Recap: Search Problem. Example: Map-Coloring 11/30/2012

Space of Search Strategies. CSE 573: Artificial Intelligence. Constraint Satisfaction. Recap: Search Problem. Example: Map-Coloring 11/30/2012 /0/0 CSE 57: Artificial Intelligence Constraint Satisfaction Daniel Weld Slides adapted from Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer Space of Search Strategies Blind Search DFS, BFS,

More information

CS 188: Artificial Intelligence. Recap: Search

CS 188: Artificial Intelligence. Recap: Search CS 188: Artificial Intelligence Lecture 4 and 5: Constraint Satisfaction Problems (CSPs) Pieter Abbeel UC Berkeley Many slides from Dan Klein Recap: Search Search problem: States (configurations of the

More information

Constraint Satisfaction Problems (CSPs)

Constraint Satisfaction Problems (CSPs) 1 Hal Daumé III (me@hal3.name) Constraint Satisfaction Problems (CSPs) Hal Daumé III Computer Science University of Maryland me@hal3.name CS 421: Introduction to Artificial Intelligence 7 Feb 2012 Many

More information

Constraint satisfaction search. Combinatorial optimization search.

Constraint satisfaction search. Combinatorial optimization search. S 1571 Introduction to I Lecture 8 onstraint satisfaction search. ombinatorial optimization search. Milos Hauskrecht milos@cs.pitt.edu 539 Sennott Square onstraint satisfaction problem (SP) Objective:

More information

Games and Adversarial Search II Alpha-Beta Pruning (AIMA 5.3)

Games and Adversarial Search II Alpha-Beta Pruning (AIMA 5.3) Games and Adversarial Search II Alpha-Beta Pruning (AIMA 5.) Some slides adapted from Richard Lathrop, USC/ISI, CS 7 Review: The Minimax Rule Idea: Make the best move for MAX assuming that MIN always replies

More information

Reading: Chapter 6 (3 rd ed.); Chapter 5 (2 nd ed.) For next week: Thursday: Chapter 8

Reading: Chapter 6 (3 rd ed.); Chapter 5 (2 nd ed.) For next week: Thursday: Chapter 8 Constraint t Satisfaction Problems Reading: Chapter 6 (3 rd ed.); Chapter 5 (2 nd ed.) For next week: Tuesday: Chapter 7 Thursday: Chapter 8 Outline What is a CSP Backtracking for CSP Local search for

More information

Map Colouring. Constraint Satisfaction. Map Colouring. Constraint Satisfaction

Map Colouring. Constraint Satisfaction. Map Colouring. Constraint Satisfaction Constraint Satisfaction Jacky Baltes Department of Computer Science University of Manitoba Email: jacky@cs.umanitoba.ca WWW: http://www4.cs.umanitoba.ca/~jacky/teaching/cour ses/comp_4190- ArtificialIntelligence/current/index.php

More information

Outline. Best-first search

Outline. Best-first search Outline Best-first search Greedy best-first search A* search Heuristics Local search algorithms Hill-climbing search Beam search Simulated annealing search Genetic algorithms Constraint Satisfaction Problems

More information

Week 8: Constraint Satisfaction Problems

Week 8: Constraint Satisfaction Problems COMP3411/ 9414/ 9814: Artificial Intelligence Week 8: Constraint Satisfaction Problems [Russell & Norvig: 6.1,6.2,6.3,6.4,4.1] COMP3411/9414/9814 18s1 Constraint Satisfaction Problems 1 Outline Constraint

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Tuomas Sandholm Carnegie Mellon University Computer Science Department [Read Chapter 6 of Russell & Norvig] Constraint satisfaction problems (CSPs) Standard search problem:

More information

CS 188: Artificial Intelligence Fall 2008

CS 188: Artificial Intelligence Fall 2008 CS 188: Artificial Intelligence Fall 2008 Lecture 4: CSPs 9/9/2008 Dan Klein UC Berkeley Many slides over the course adapted from either Stuart Russell or Andrew Moore 1 1 Announcements Grading questions:

More information

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens CS 188: Artificial Intelligence Fall 2008 Announcements Grading questions: don t panic, talk to us Newsgroup: check it out Lecture 4: CSPs 9/9/2008 Dan Klein UC Berkeley Many slides over the course adapted

More information

Constraint Satisfaction. AI Slides (5e) c Lin

Constraint Satisfaction. AI Slides (5e) c Lin Constraint Satisfaction 4 AI Slides (5e) c Lin Zuoquan@PKU 2003-2018 4 1 4 Constraint Satisfaction 4.1 Constraint satisfaction problems 4.2 Backtracking search 4.3 Constraint propagation 4.4 Local search

More information

Constraint Satisfaction Problems (CSPs)

Constraint Satisfaction Problems (CSPs) Constraint Satisfaction Problems (CSPs) CPSC 322 CSP 1 Poole & Mackworth textbook: Sections 4.0-4.2 Lecturer: Alan Mackworth September 28, 2012 Problem Type Static Sequential Constraint Satisfaction Logic

More information

Constraint Satisfaction Problems. Chapter 6

Constraint Satisfaction Problems. Chapter 6 Constraint Satisfaction Problems Chapter 6 Office hours Office hours for Assignment 1 (ASB9810 in CSIL): Sep 29th(Fri) 12:00 to 13:30 Oct 3rd(Tue) 11:30 to 13:00 Late homework policy You get four late

More information

What is Search For? CS 188: Artificial Intelligence. Example: Map Coloring. Example: N-Queens. Example: N-Queens. Constraint Satisfaction Problems

What is Search For? CS 188: Artificial Intelligence. Example: Map Coloring. Example: N-Queens. Example: N-Queens. Constraint Satisfaction Problems CS 188: Artificial Intelligence Constraint Satisfaction Problems What is Search For? Assumptions about the world: a single agent, deterministic actions, fully observed state, discrete state space Planning:

More information

Iterative improvement algorithms. Today. Example: Travelling Salesperson Problem. Example: n-queens

Iterative improvement algorithms. Today. Example: Travelling Salesperson Problem. Example: n-queens Today See Russell and Norvig, chapters 4 & 5 Local search and optimisation Constraint satisfaction problems (CSPs) CSP examples Backtracking search for CSPs 1 Iterative improvement algorithms In many optimization

More information

6.034 Quiz 1, Spring 2004 Solutions

6.034 Quiz 1, Spring 2004 Solutions 6.034 Quiz 1, Spring 2004 Solutions Open Book, Open Notes 1 Tree Search (12 points) Consider the tree shown below. The numbers on the arcs are the arc lengths. Assume that the nodes are expanded in alphabetical

More information

Constraint Satisfaction Problems: A Deeper Look

Constraint Satisfaction Problems: A Deeper Look Constraint Satisfaction Problems: A Deeper Look The last problem set covered the topic of constraint satisfaction problems. CSP search and solution algorithms are directly applicable to a number of AI

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 5. Constraint Satisfaction Problems CSPs as Search Problems, Solving CSPs, Problem Structure Wolfram Burgard, Bernhard Nebel, and Martin Riedmiller Albert-Ludwigs-Universität

More information

Outline. Best-first search

Outline. Best-first search Outline Best-first search Greedy best-first search A* search Heuristics Local search algorithms Hill-climbing search Beam search Simulated annealing search Genetic algorithms Constraint Satisfaction Problems

More information

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on Artificial Intelligence,

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on Artificial Intelligence, Course on Artificial Intelligence, winter term 2012/2013 0/35 Artificial Intelligence Artificial Intelligence 3. Constraint Satisfaction Problems Lars Schmidt-Thieme Information Systems and Machine Learning

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. S. Russell and P. Norvig. Artificial Intelligence:

More information

Logic-Oriented Programming (5/11/2004)

Logic-Oriented Programming (5/11/2004) 1 Logic-Oriented Programming (5/11/2004) Daniel P. Friedman, David W. Mack, William E. Byrd Computer Science Department, Indiana University Bloomington, IN 47405, USA Oleg Kiselyov Fleet Numerical Meteorology

More information

Spezielle Themen der Künstlichen Intelligenz

Spezielle Themen der Künstlichen Intelligenz Spezielle Themen der Künstlichen Intelligenz 2. Termin: Constraint Satisfaction Dr. Stefan Kopp Center of Excellence Cognitive Interaction Technology AG A Recall: Best-first search Best-first search =

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Constraint Satisfaction Problems Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) Inference The core topic of the following lectures

More information

Constraint Satisfaction Problems Chapter 3, Section 7 and Chapter 4, Section 4.4 AIMA Slides cstuart Russell and Peter Norvig, 1998 Chapter 3, Section

Constraint Satisfaction Problems Chapter 3, Section 7 and Chapter 4, Section 4.4 AIMA Slides cstuart Russell and Peter Norvig, 1998 Chapter 3, Section Constraint Satisfaction Problems Chapter 3, Section 7 and Chapter 4, Section 4.4 AIMA Slides cstuart Russell and Peter Norvig, 1998 Chapter 3, Section 7 and Chapter 4, Section 4.4 1 Outline } CSP examples

More information

6.034 Notes: Section 3.1

6.034 Notes: Section 3.1 6.034 Notes: Section 3.1 Slide 3.1.1 In this presentation, we'll take a look at the class of problems called Constraint Satisfaction Problems (CSPs). CSPs arise in many application areas: they can be used

More information

Mathematical Programming Formulations, Constraint Programming

Mathematical Programming Formulations, Constraint Programming Outline DM87 SCHEDULING, TIMETABLING AND ROUTING Lecture 3 Mathematical Programming Formulations, Constraint Programming 1. Special Purpose Algorithms 2. Constraint Programming Marco Chiarandini DM87 Scheduling,

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Revised by Hankui Zhuo, March 14, 2018 Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Robert Platt Northeastern University Some images and slides are used from: 1. AIMA What is a CSP? The space of all search problems states and actions are atomic goals are

More information

Constraints. CSC 411: AI Fall NC State University 1 / 53. Constraints

Constraints. CSC 411: AI Fall NC State University 1 / 53. Constraints CSC 411: AI Fall 2013 NC State University 1 / 53 Constraint satisfaction problems (CSPs) Standard search: state is a black box that supports goal testing, application of an evaluation function, production

More information

Recap: Search Problem. CSE 473: Artificial Intelligence. Space of Search Strategies. Constraint Satisfaction. Example: N-Queens 4/9/2012

Recap: Search Problem. CSE 473: Artificial Intelligence. Space of Search Strategies. Constraint Satisfaction. Example: N-Queens 4/9/2012 CSE 473: Artificial Intelligence Constraint Satisfaction Daniel Weld Slides adapted from Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer Recap: Search Problem States configurations of the world

More information

Chapter 6 Constraint Satisfaction Problems

Chapter 6 Constraint Satisfaction Problems Chapter 6 Constraint Satisfaction Problems CS5811 - Artificial Intelligence Nilufer Onder Department of Computer Science Michigan Technological University Outline CSP problem definition Backtracking search

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Soup Must be Hot&Sour Appetizer Pork Dish Total Cost < $30 Chicken Dish Vegetable No Peanuts No Peanuts Not Both Spicy Seafood Rice Constraint Network Not Chow Mein 1 Formal

More information

ARTIFICIAL INTELLIGENCE (CS 370D)

ARTIFICIAL INTELLIGENCE (CS 370D) Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) (CHAPTER-6) CONSTRAINT SATISFACTION PROBLEMS Outline What is a CSP CSP applications Backtracking search

More information

zebra puzzle continued recap Prolog concepts family relations

zebra puzzle continued recap Prolog concepts family relations zebra puzzle continued recap Prolog concepts family relations 1 recapping the Zebra puzzle 2 ****** the facts ****** There are 5 houses, occupied by politicallyincorrect gentlemen of 5 different nationalities,

More information

CONSTRAINT SATISFACTION

CONSTRAINT SATISFACTION CONSRAI ISFACION oday Reading AIMA Read Chapter 6.1-6.3, Skim 6.4-6.5 Goals Constraint satisfaction problems (CSPs) ypes of CSPs Inference (Search + Inference) 1 8-queens problem How would you go about

More information

CS 771 Artificial Intelligence. Constraint Satisfaction Problem

CS 771 Artificial Intelligence. Constraint Satisfaction Problem CS 771 Artificial Intelligence Constraint Satisfaction Problem Constraint Satisfaction Problems So far we have seen a problem can be solved by searching in space of states These states can be evaluated

More information

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Fall 2011 CS 188: Artificial Intelligence Fall 2011 Lecture 5: CSPs II 9/8/2011 Dan Klein UC Berkeley Multiple slides over the course adapted from either Stuart Russell or Andrew Moore 1 Today Efficient Solution

More information

Informed search algorithms. Chapter 4

Informed search algorithms. Chapter 4 Informed search algorithms Chapter 4 Outline Best-first search Greedy best-first search A * search Heuristics Memory Bounded A* Search Best-first search Idea: use an evaluation function f(n) for each node

More information

Solving Problems by Searching: Constraint Satisfaction Problems

Solving Problems by Searching: Constraint Satisfaction Problems Course 16 :198 :520 : Introduction To Artificial Intelligence Lecture 6 Solving Problems by Searching: Constraint Satisfaction Problems Abdeslam Boularias Wednesday, October 19, 2016 1 / 1 Outline We consider

More information

What is Search For? CS 188: Ar)ficial Intelligence. Constraint Sa)sfac)on Problems Sep 14, 2015

What is Search For? CS 188: Ar)ficial Intelligence. Constraint Sa)sfac)on Problems Sep 14, 2015 CS 188: Ar)ficial Intelligence Constraint Sa)sfac)on Problems Sep 14, 2015 What is Search For? Assump)ons about the world: a single agent, determinis)c ac)ons, fully observed state, discrete state space

More information

General Methods and Search Algorithms

General Methods and Search Algorithms DM811 HEURISTICS AND LOCAL SEARCH ALGORITHMS FOR COMBINATORIAL OPTIMZATION Lecture 3 General Methods and Search Algorithms Marco Chiarandini 2 Methods and Algorithms A Method is a general framework for

More information

CMU-Q Lecture 7: Searching in solution space Constraint Satisfaction Problems (CSPs) Teacher: Gianni A. Di Caro

CMU-Q Lecture 7: Searching in solution space Constraint Satisfaction Problems (CSPs) Teacher: Gianni A. Di Caro CMU-Q 15-381 Lecture 7: Searching in solution space Constraint Satisfaction Problems (CSPs) Teacher: Gianni A. Di Caro AI PLANNING APPROACHES SO FAR Goal: Find the (best) sequence of actions that take

More information

A4B36ZUI - Introduction ARTIFICIAL INTELLIGENCE

A4B36ZUI - Introduction ARTIFICIAL INTELLIGENCE A4B36ZUI - Introduction to ARTIFICIAL INTELLIGENCE https://cw.fel.cvut.cz/wiki/courses/a4b33zui/start Michal Pechoucek, Branislav Bosansky, Jiri Klema & Olga Stepankova Department of Computer Science Czech

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Constraint satisfaction problems Backtracking algorithms for CSP Heuristics Local search for CSP Problem structure and difficulty of solving Search Problems The formalism

More information

4 Search Problem formulation (23 points)

4 Search Problem formulation (23 points) 4 Search Problem formulation (23 points) Consider a Mars rover that has to drive around the surface, collect rock samples, and return to the lander. We want to construct a plan for its exploration. It

More information

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2014

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2014 CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2014 YOUR NAME: YOUR ID: ID TO RIGHT: ROW: SEAT: The exam will begin on the next page. Please, do not turn the page until told. When you are told to begin

More information

Constraint Satisfaction Problems. Some material from: D Lin, J You, JC Latombe

Constraint Satisfaction Problems. Some material from: D Lin, J You, JC Latombe RN, Chapter 5 Constraint Satisfaction Problems Some material from: D Lin, J You, JC Latombe 1 Search Overview Introduction to Search Blind Search Techniques Heuristic Search Techniques Constraint Satisfaction

More information

1. (15 points) Consider the crossword puzzle

1. (15 points) Consider the crossword puzzle ICS 271 Fall 2017 Instructor : Kalev Kask Homework Assignment 4 Due Tuesday 11/7 1. (15 points) Consider the crossword puzzle We represent the problem as a CSP where there is a variable for each of the

More information

Announcements. CS 188: Artificial Intelligence Spring Today. A* Review. Consistency. A* Graph Search Gone Wrong

Announcements. CS 188: Artificial Intelligence Spring Today. A* Review. Consistency. A* Graph Search Gone Wrong CS 88: Artificial Intelligence Spring 2009 Lecture 4: Constraint Satisfaction /29/2009 John DeNero UC Berkeley Slides adapted from Dan Klein, Stuart Russell or Andrew Moore Announcements The Python tutorial

More information

Heuristic (Informed) Search

Heuristic (Informed) Search Heuristic (Informed) Search (Where we try to choose smartly) R&N: Chap., Sect..1 3 1 Search Algorithm #2 SEARCH#2 1. INSERT(initial-node,Open-List) 2. Repeat: a. If empty(open-list) then return failure

More information