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

Size: px
Start display at page:

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

Transcription

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

2 Standard search problems: State is a black box : arbitrary data structure Goal test can be any function over states Successor function can also be anything Constraint satisfaction problems (CSPs): A special subset of search problems State is defined by a set of variables X i with values from a domain D Goal test is a set of constraints specifying allowable combinations of values for the variables Allows useful general-purpose algorithms with more power than standard search algorithms

3 Example: N-Queens Formulation 1: Variables: Domains: Constraints:

4 Example: N-Queens Formulation 2: Variables: Domains: Constraints: Implicit: Explicit:

5 Example: Sudoku Variables: Each (open) square Domains: {1,2,,9} Constraints: 9-way alldiff for each column 9-way alldiff for each row 9-way alldiff for each region (or can have a bunch of pairwise inequality constraints)

6 Real-World CSPs Assignment problems: e.g., who teaches what class Timetabling problems: e.g., which class is offered when and where? Hardware configuration Transportation scheduling Factory scheduling Circuit layout Fault diagnosis

7 Constraint Satisfaction Problems, CSPs To formulate a problem as a CSP we need to define: a finite set of variables V 1, V 2, V n for each variable, a domain of possible values D 1, D 2, D n a finite set of constraints C 1, C 2, C m (each constraint C i limits the values that variables can take, e.g., V 1 V 2 ) each state in a CSP is defined as an assignment of values to some or all variables a partial assignment is one that assigns values to only some of the variables a complete assignment is one in which every variable is assigned a consistent assignment is an assignment that does not violate the constraints a solution to a CSP is a complete and consistent assignment

8 CSP example: map coloring Variables: {WA, NT, Q, NSW, V, SA, T} Domains: each variable has the domain D i ={red,green,blue} Constraints: adjacent regions must have different colors. eg. WA NT

9 CSP example: map coloring Solutions are complete assignments that satisfy all constraints, eg. {WA=red, NT=green, Q=red, NSW=green, V=red, SA=blue, T=green}

10 CSPs are often visualized with a constraint graph nodes correspond to variables an arc connects any two variables that participate in a constraint can use the graph structure to speed up search. E.g., Tasmania is an independent subproblem

11 Varieties of CSPs Discrete variables Finite domains; size d O(d n ) complete assignments. Infinite domains (integers, strings, etc.) E.g., job scheduling, variables are start/end times for each job Linear constraints solvable, nonlinear undecidable Continuous variables E.g., start/end times for Hubble Telescope observations Linear constraints solvable in polynomial time by LP methods.

12 Varieties of constraints Unary constraints involve a single variable. e.g. SA green Binary constraints involve pairs of variables. e.g. SA WA Higher-order constraints involve 3 or more variables. Professors A, B,and C cannot be on a committee together Can always be represented by multiple binary constraints Preference (soft constraints) e.g. red is better than green often can be represented by a cost for each variable assignment combination of optimization with CSPs

13 CSPs CSP benefits Standard representation Generic goal and successor functions Generic heuristics (no domain specific expertise). Many Applications: Airline schedules Cryptography Computer vision -> image interpretation

14 CSP as a Search Problem (incremental formulation) n variables X 1,..., X n Valid assignment: {X i1 v i1,..., X ik v ik }, 0 k n, such that the values v i1,... v ik satisfy all constraints relating the variables X i1,... X ik Complete assignment: one where k = n [if all variable domains have size d, there are O(d n ) complete assignments] Goal test: k = n Initial state: empty assignment {}, i.e. k = 0 Successor of a state: {X i1 v i1,..., X ik v ik } {X i1 v i1,..., X ik v ik, X ik+1 v ik+1 }

15 What would BFS do? - bunch of assignments to one variable, followed by assignments to two variables What would DFS do? What problems does naïve search have? ( this is not a goal yet, let s try successors)

16 A Key property of CSPs: Commutativity The order in which variables are assigned values has no impact on the reachable complete valid assignments [WA=red then NT=green] same as [NT=green then WA=red] Hence: One can expand a node N by first selecting one variable X not in the assignment A associated with N and then assigning any value v in the domain of X big reduction in branching factor (depth of solution is still n) One need not store the path to a node Backtracking search algorithm (DFS) Chooses values for one variable at a time and backtracks when a variable has no legal values left to assign.

17 Backtracking search is the basic uninformed algorithm to solve CSPs Idea 1: One variable at a time Variable assignments are commutative, so fix ordering I.e., [WA = red then NT = green] same as [NT = green then WA = red] Only need to consider assignments to a single variable at each step Idea 2: Check constraints as you go I.e. consider only values which do not conflict previous assignments Might have to do some computation to check the constraints Incremental goal test Depth-first search with these two improvements is called backtracking search (not the best name) Can solve n-queens for n 25

18 Assignment = {} Backtracking Search (3 variables)

19 Backtracking Search (3 variables) X 1 v 11 Assignment = {(X 1,v 11 )}

20 Backtracking Search (3 variables) X 1 v 11 X 3 v 31 Assignment = {(X 1,v 11 ), (X 3,v 31 )}

21 Backtracking Search (3 variables) X 1 v 31 v 11 X 3 Then, the search algorithm backtracks to the previous variable (X 3 ) and tries another value X 2 Assume that no value of X2 leads to a valid assignment Assignment = {(X 1,v 11 ), (X 3,v 31 )}

22 Backtracking Search (3 variables) X 1 v 11 X 3 v 31 v 32 X 2 Assignment = {(X 1,v 11 ), (X 3,v 32 )}

23 Backtracking Search (3 variables) v 31 v 11 X 3 v 32 X 1 The search algorithm backtracks to the previous variable (X 3 ) and tries another value. But assume that X 3 has only two possible values. The algorithm backtracks to X 1 X 2 X 2 Assume again that no value of X 2 leads to a valid assignment Assignment = {(X 1,v 11 ), (X 3,v 32 )}

24 Backtracking Search (3 variables) X 1 v 11 v 12 X 3 v 31 v 32 X 2 X 2 Assignment = {(X 1,v 12 )}

25 Backtracking Search (3 variables) X 1 v 11 v 12 X 3 X 2 v 31 v 32 v 21 X 2 X 2 Assignment = {(X 1,v 12 ), (X 2,v 21 )}

26 Backtracking Search (3 variables) X 1 v 11 v 12 X 3 X 2 v 31 v 32 v 21 X 2 X 2 The algorithm need not consider the variables in the same order in this sub-tree as in the other Assignment = {(X 1,v 12 ), (X 2,v 21 )}

27 Backtracking Search (3 variables) X 1 v 11 v 12 X 3 X 2 v 31 v 32 v 21 X 2 X 2 X 3 v 32 Assignment = {(X 1,v 12 ), (X 2,v 21 ), (X 3,v 32 )}

28 Backtracking Search (3 variables) X 1 v 11 v 12 X 3 X 2 v 31 v 32 v 21 X 2 X 2 v 32 X 3 The algorithm need not consider the values of X 3 in the same order in this sub-tree Assignment = {(X 1,v 12 ), (X 2,v 21 ), (X 3,v 32 )}

29 Backtracking Search (3 variables) X 1 v 11 v 12 X 3 X 2 v 31 v 32 v 21 X 2 X 2 X 3 Since there are only three variables, the assignment is complete v 32 Assignment = {(X 1,v 12 ), (X 2,v 21 ), (X 3,v 32 )}

30 CSP Backtracking Algorithm CSP-BACKTRACKING(A) 1. If assignment A is complete then return A 2. X select a variable not in A 3. D select an ordering on the domain of X 4. For each value v in D do a. Add (X v) to A b. If A is valid then i. result CSP-BACKTRACKING(A) ii. If result failure then return result c. Remove (X v) from A 5. Return failure Call CSP-BACKTRACKING({})

31 How to improve the Backtracking Algorithm so that it scales up better...

32 - inference in the course of a search - every time we assign a value to a variable we can infer new domain reductions in neighboring variables Forward Checking (filtering of domains) A simple constraint-propagation technique: Assigning the value 5 to X 1 leads to removing values from the domains of X 2, X 3,..., X 8 X 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8

33 Forward Checking in Map Coloring WA NT SA Q NSW Constraint graph T V WA NT Q NSW V SA T RGB RGB RGB RGB RGB RGB RGB

34 Forward Checking in Map Coloring WA NT SA Q NSW T V WA NT Q NSW V SA T RGB RGB RGB RGB RGB RGB RGB R RGB RGB RGB RGB RGB RGB Forward checking removes the value Red of NT and of SA

35 Forward Checking in Map Coloring WA NT SA Q NSW T V WA NT Q NSW V SA T RGB RGB RGB RGB RGB RGB RGB R GB RGB RGB RGB GB RGB R GB G RGB RGB GB RGB

36 Forward Checking in Map Coloring WA NT SA Q NSW T V WA NT Q NSW V SA T 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

37 Forward Checking in Map Coloring Empty set: the current assignment {(WA R), (Q G), (V B)} does not lead to a solution WA NT Q NSW V SA T 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

38 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

39 Modified Backtracking Algorithm CSP-BACKTRACKING(A, var-domains) 1. If assignment A is complete then return A 2. X select a variable not in A 3. D select an ordering on the domain of X 4. 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-BACKTRACKING(A, var-domains) (ii) If result failure then return result d. Remove (X v) from A 5. Return failure

40 Modified Backtracking Algorithm CSP-BACKTRACKING(A, var-domains) 1. If assignment A is complete then return A 2. X select a variable not in A 3. D select an ordering on the domain of X 4. For each value v in D do a. Add (X v) to A No need any more to 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-BACKTRACKING(A, var-domains) (ii) If result failure then return result d. Remove (X v) from A 5. Return failure

41 Modified Backtracking Algorithm CSP-BACKTRACKING(A, var-domains) 1. If assignment A is complete then return A 2. X select a variable not in A 3. D select an ordering on the domain of X 4. 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-BACKTRACKING(A, var-domains) (ii) If result failure then return result d. Remove (X v) from A 5. Return failure Need to pass down the updated variable domains

42

43 N-Queens Problem How to formulate as a CSP?

44 4-Queens Problem How to solve using CSP-Backtracking? X 1 {1,2,3,4} X 2 {1,2,3,4} X 3 {1,2,3,4} X 4 {1,2,3,4} The algorithm performs forward checking, which eliminates 2 values in each other variable s domain

45 1) Which variable X should be assigned a value next? The 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 2) In which order should X s values be assigned? The 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...

46 1) Which variable X should be assigned a value next? The 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 2) In which order should X s values be assigned? The 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...

47 1) Which variable X should be assigned a value next? The 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 2) In which order should X s values be assigned? The 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...

48 Heuristics 1) Which variable X i should be assigned a value next? Most-constrained-variable heuristic (minimum-remaining-values) Most-constraining-variable heuristic (degree) 2) In which order should its values be assigned? Least-constraining-value heuristic These heuristics can be 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

49 Modified Backtracking Algorithm CSP-BACKTRACKING(A, var-domains) 1. If assignment A is complete then return A 2. X select a variable not in A 3. D select an ordering on the domain of X 4. 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-BACKTRACKING(A, var-domains) (ii) If result failure then return result d. Remove (X v) from A 5. Return failure

50 Most-Constrained-Variable Heuristic 1) Which variable X i should be assigned a value next? Select the variable with the smallest remaining domain [Rationale: Minimize the branching factor]

51 Map Coloring WA NT Q SA V NSW T SA s remaining domain has size 1 (value Blue remaining) Q s remaining domain has size 2 NSW s, V s, and T s remaining domains have size 3 Select SA

52 Most-Constraining-Variable Heuristic 1) 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]

53 Map Coloring WA NT Q SA V NSW Before any value has been assigned, all variables have a domain of size 3, but SA is involved in more constraints (5) than any other variable Select SA and assign a value to it (e.g., Blue) T

54 Modified Backtracking Algorithm 1) Most-constrained-variable heuristic 2) Most-constraining-variable heuristic 3) Least-constraining-value heuristic 5. Return failure CSP-BACKTRACKING(A, var-domains) 1. If assignment A is complete then return A 2. X select a variable not in A 3. D select an ordering on the domain of X 4. 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-BACKTRACKING(A, var-domains) (ii) If result failure then return result d. Remove (X v) from A 1) Select the variable with the smallest remaining domain 2) Select the variable that appears in the largest number of constraints on variables not in the current assignment

55 Least-Constraining-Value Heuristic 2) 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 the selected value]

56 Map Coloring WA NT Q {} SA V NSW T Q s domain has two remaining values: Blue and Red Assigning Blue to Q would leave 0 value for SA, while assigning Red would leave 1 value

57 Map Coloring WA NT Q SA {Blue} V NSW T Q s domain has two remaining values: Blue and Red Assigning Blue to Q would leave 0 value for SA, while assigning Red would leave 1 value So, assign Red to Q

58 Modified Backtracking Algorithm 1) Most-constrained-variable heuristic 2) Most-constraining-variable heuristic 3) Least-constraining-value heuristic 5. Return failure CSP-BACKTRACKING(A, var-domains) 1. If assignment A is complete then return A 2. X select a variable not in A 3. D select an ordering on the domain of X 4. 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-BACKTRACKING(A, var-domains) (ii) If result failure then return result d. Remove (X v) from A

59 - inference before the search begins - a pre-processing step - constraint propagation, like forward checking - the AC-3 algorithm (Arc Consistency Algorithm 3) A.K. Mackworth. Consistency in networks of relations. Artificial Intelligence, 8:99-118, 1977.

60 Constraint propagation Solving CSPs with combination of heuristics plus forward checking is more efficient than either approach alone FC checking does not detect all failures (just checks for assigned variables and their neighbors) E.g., NT and SA cannot be blue

61 Constraint propagation Techniques like CP and FC are in effect eliminating parts of the search space Somewhat complementary to search Constraint propagation goes further than FC by repeatedly enforcing constraints locally Needs to be faster than actually searching to be effective Arc-consistency (AC) is a systematic procedure for constraing propagation

62 Arc consistency An Arc X Y is consistent if for every value x of X there is some value y consistent with x (note that this is a directed property) Consider state of search after WA and Q are assigned: SA NSW is consistent if SA=blue and NSW=red

63 Arc consistency X Y is consistent if for every value x of X there is some value y consistent with x NSW SA is consistent if NSW=red and SA=blue NSW=blue and SA=???

64 Arc consistency Can enforce arc-consistency: Arc can be made consistent by removing blue from NSW Continue to propagate constraints. Check V NSW Not consistent for V = red Remove red from V

65 Arc consistency Continue to propagate constraints. SA NT is not consistent and cannot be made consistent Arc consistency detects failure earlier than FC

66 Constraint Propagation for Binary Constraints REMOVE-VALUES(X,Y) removes every value of Y that is incompatible with the values of X REMOVE-VALUES(X,Y) 1. removed false 2. For every value v in the domain of Y do If there is no value u in the domain of X such that the constraint on (X,Y) is satisfied then a. Remove v from Y s domain b. removed true 3. Return removed

67 Constraint Propagation for Binary Constraints AC3 1. Initialize queue Q with all variables (not yet instantiated) 2. While Q do a. X Remove(Q) b. For every (not yet instantiated) variable Y related to X by a (binary) constraint do If REMOVE-VALUES(X,Y) then i. If Y s domain = then exit ii. Insert(Y,Q)

68 Complexity Analysis of AC3 n = number of variables d = size of initial domains s = maximum number of constraints involving a given variable (s n-1) Each variable is inserted in Q up to d times REMOVE-VALUES takes O(d 2 ) time AC3 takes O(n d s d 2 ) = O(n s d 3 ) time Usually more expensive than forward checking AC3 1. Initialize queue Q with all variables (not yet instantiated) 2. While Q do a. X Remove(Q) b. For every (not yet instantiated) variable Y related to X by a (binary) constraint do If REMOVE-VALUES(X,Y) then i. If Y s domain = then exit ii. Insert(Y,Q) REMOVE-VALUES(X,Y) 1. removed false 2. For every value v in the domain of Y do If there is no value u in the domain of X such that the constraint on (x,y) is satisfied then a. Remove v from Y s domain b. removed true 3. Return removed 69

69

70 K-consistency Arc consistency does not detect all inconsistencies: Partial assignment {WA=red, NSW=red} is inconsistent. Stronger forms of propagation can be defined using the notion of k-consistency. A CSP is k-consistent if for any set of k-1 variables and for any consistent assignment to those variables, a consistent value can always be assigned to any kth variable. E.g. 1-consistency = node-consistency E.g. 2-consistency = arc-consistency E.g. 3-consistency = path-consistency Strongly k-consistent: k-consistent for all values {k, k-1, 2, 1}

71 Trade-offs Running stronger consistency checks Takes more time But will reduce branching factor and detect more inconsistent partial assignments No free lunch In worst case n-consistency takes exponential time

72 Further improvements Checking special constraints Checking Alldif( ) constraint E.g. {WA=red, NSW=red} Checking Atmost( ) constraint Bounds propagation for larger value domains Intelligent backtracking Standard form is chronological backtracking i.e. try different value for preceding variable. More intelligent, backtrack to conflict set. Set of variables that caused the failure or set of previously assigned variables that are connected to X by constraints. Backjumping moves back to most recent element of the conflict set. Forward checking can be used to determine conflict set.

73 Local search for CSPs Use complete-state representation Initial state = all variables assigned values Successor states = change 1 (or more) values For CSPs allow states with unsatisfied constraints (unlike backtracking) operators reassign variable values hill-climbing with n-queens is an example Variable selection: randomly select any conflicted variable Value selection: min-conflicts heuristic Select new value that results in a minimum number of conflicts with the other variables

74 Local search for CSP function MIN-CONFLICTS(csp, max_steps) return solution or failure inputs: csp, a constraint satisfaction problem max_steps, the number of steps allowed before giving up current an initial complete assignment for csp for i = 1 to max_steps do if current is a solution for csp then return current var a randomly chosen, conflicted variable from VARIABLES[csp] value the value v for var that minimize CONFLICTS(var,v,current,csp) set var = value in current return failure

75 Min-conflicts example 1 h=5 h=3 h=1 Use of min-conflicts heuristic in hill-climbing.

76 Min-conflicts example 2 A two-step solution for an 8-queens problem using min-conflicts heuristic At each stage a queen is chosen for reassignment in its column The algorithm moves the queen to the min-conflict square breaking ties randomly.

77 Comparison of CSP algorithms on different problems Median number of consistency checks over 5 runs to solve problem Parentheses -> no solution found USA: 4 coloring n-queens: n = 2 to 50 Zebra: see exercise 5.13

78 Advantages of local search Local search can be particularly useful in an online setting Airline schedule example E.g., mechanical problems require than 1 plane is taken out of service Can locally search for another close solution in state-space Much better (and faster) in practice than finding an entirely new schedule The runtime of min-conflicts is roughly independent of problem size. Can solve the millions-queen problem in roughly 50 steps. Why? n-queens is easy for local search because of the relatively high density of solutions in state-space

79

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

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 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

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

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

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

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

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

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

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 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 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 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

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

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

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

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

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

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

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 (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

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

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

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

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

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements CS 188: Artificial Intelligence Spring 2006 Lecture 4: CSPs 9/7/2006 Dan Klein UC Berkeley Many slides over the course adapted from either Stuart Russell or Andrew Moore Announcements Reminder: Project

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

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

Artificial Intelligence

Artificial Intelligence Contents Artificial Intelligence 5. Constraint Satisfaction Problems CSPs as Search Problems, Solving CSPs, Problem Structure Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller What

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence 5. Constraint Satisfaction Problems CSPs as Search Problems, Solving CSPs, Problem Structure Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller SA-1 Contents

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

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

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements CS 188: Artificial Intelligence Spring 2010 Lecture 4: A* wrap-up + Constraint Satisfaction 1/28/2010 Pieter Abbeel UC Berkeley Many slides from Dan Klein Announcements Project 0 (Python tutorial) is due

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 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

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

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

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

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

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

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

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

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

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

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

AI Fundamentals: Constraints Satisfaction Problems. Maria Simi

AI Fundamentals: Constraints Satisfaction Problems. Maria Simi AI Fundamentals: Constraints Satisfaction Problems Maria Simi Constraints satisfaction LESSON 3 SEARCHING FOR SOLUTIONS Searching for solutions Most problems cannot be solved by constraint propagation

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

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

Constraint Satisfaction Problems (CSP) (Where we postpone making difficult 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

More information

Discussion Section Week 1

Discussion Section Week 1 Discussion Section Week 1 Intro Course Project Information Constraint Satisfaction Problems Sudoku Backtracking Search Example Heuristics for guiding Search Example Intro Teaching Assistant Junkyu Lee

More information

Announcements. CS 188: Artificial Intelligence Fall Reminder: CSPs. Today. Example: 3-SAT. Example: Boolean Satisfiability.

Announcements. CS 188: Artificial Intelligence Fall Reminder: CSPs. Today. Example: 3-SAT. Example: Boolean Satisfiability. CS 188: Artificial Intelligence Fall 2008 Lecture 5: CSPs II 9/11/2008 Announcements Assignments: DUE W1: NOW P1: Due 9/12 at 11:59pm Assignments: UP W2: Up now P2: Up by weekend Dan Klein UC Berkeley

More information

CS 188: Artificial Intelligence Fall 2008

CS 188: Artificial Intelligence Fall 2008 CS 188: Artificial Intelligence Fall 2008 Lecture 5: CSPs II 9/11/2008 Dan Klein UC Berkeley Many slides over the course adapted from either Stuart Russell or Andrew Moore 1 1 Assignments: DUE Announcements

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

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

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

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

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

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 Constraint Satisfaction Problems CHAPTER 6 CSC 370 SPRING 2013 ALAN C. JAMIESN CSP Backtracking Search Problem Structure and Decomposition Local Search SME SLIDE CNTENT FRM RUSSELL & NRVIG PRVIDED SLIDES

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 188: Artificial Intelligence

CS 188: Artificial Intelligence CS 188: Artificial Intelligence CSPs II + Local Search Prof. Scott Niekum The University of Texas at Austin [These slides based on those of Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley.

More information

Today. CS 188: Artificial Intelligence Fall Example: Boolean Satisfiability. Reminder: CSPs. Example: 3-SAT. CSPs: Queries.

Today. CS 188: Artificial Intelligence Fall Example: Boolean Satisfiability. Reminder: CSPs. Example: 3-SAT. CSPs: Queries. CS 188: Artificial Intelligence Fall 2007 Lecture 5: CSPs II 9/11/2007 More CSPs Applications Tree Algorithms Cutset Conditioning Today Dan Klein UC Berkeley Many slides over the course adapted from either

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

CS 4100/5100: Foundations of AI

CS 4100/5100: Foundations of AI CS 4100/5100: Foundations of AI Constraint satisfaction problems 1 Instructor: Rob Platt r.platt@neu.edu College of Computer and information Science Northeastern University September 5, 2013 1 These notes

More information

CS 188: Artificial Intelligence Spring Today

CS 188: Artificial Intelligence Spring Today CS 188: Artificial Intelligence Spring 2006 Lecture 7: CSPs II 2/7/2006 Dan Klein UC Berkeley Many slides from either Stuart Russell or Andrew Moore Today More CSPs Applications Tree Algorithms Cutset

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

CS 188: Artificial Intelligence

CS 188: Artificial Intelligence CS 188: Artificial Intelligence Constraint Satisfaction Problems II Instructors: Dan Klein and Pieter Abbeel University of California, Berkeley [These slides were created by Dan Klein and Pieter Abbeel

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Frank C. Langbein F.C.Langbein@cs.cf.ac.uk Department of Computer Science Cardiff University 13th February 2001 Constraint Satisfaction Problems (CSPs) A CSP is a high

More information

G53CLP Constraint Logic Programming

G53CLP Constraint Logic Programming G53CLP Constraint Logic Programming Dr Rong Qu Constraint Satisfaction Problems An Example Map coloring A region in a map has several sub-regions Given a set of colors Assign each sub-region a color so

More information

Announcements. CS 188: Artificial Intelligence Spring Production Scheduling. Today. Backtracking Search Review. Production Scheduling

Announcements. CS 188: Artificial Intelligence Spring Production Scheduling. Today. Backtracking Search Review. Production Scheduling CS 188: Artificial Intelligence Spring 2009 Lecture : Constraint Satisfaction 2/3/2009 Announcements Project 1 (Search) is due tomorrow Come to office hours if you re stuck Today at 1pm (Nick) and 3pm

More information

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 6 February, 2018

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 6 February, 2018 DIT411/TIN175, Artificial Intelligence Chapters 5, 7: Search part IV, and CSP, part II CHAPTERS 5, 7: SEARCH PART IV, AND CSP, PART II DIT411/TIN175, Artificial Intelligence Peter Ljunglöf 6 February,

More information

Moving to a different formalism... SEND + MORE MONEY

Moving to a different formalism... SEND + MORE MONEY Moving to a different formalism... SEND + MORE -------- MONEY Consider search space for cryptarithmetic. DFS (depth-first search) Is this (DFS) how humans tackle the problem? Human problem solving appears

More information

Lecture 9 Arc Consistency

Lecture 9 Arc Consistency Computer Science CPSC 322 Lecture 9 Arc Consistency (4.5, 4.6) Slide 1 Lecture Overview Recap of Lecture 8 Arc Consistency for CSP Domain Splitting 2 Problem Type Static Sequential Constraint Satisfaction

More information

CS 188: Artificial Intelligence

CS 188: Artificial Intelligence CS 188: Artificial Intelligence Constraint Satisfaction Problems II and Local Search Instructors: Sergey Levine and Stuart Russell University of California, Berkeley [These slides were created by Dan Klein

More information

Artificial Intelligence

Artificial Intelligence Torralba and Wahlster Artificial Intelligence Chapter 8: Constraint Satisfaction Problems, Part I 1/48 Artificial Intelligence 8. CSP, Part I: Basics, and Naïve Search What to Do When Your Problem is to

More information