Constraint Propagation influenced by Dr. Rina Dechter, “Constraint Processing”

Slides:



Advertisements
Similar presentations
Non-Binary Constraint Satisfaction Toby Walsh Cork Constraint Computation Center.
Advertisements

Global Constraints Toby Walsh NICTA and University of New South Wales
Foundations of Constraint Processing Lookahead Schemas 1 Foundations of Constraint Processing CSCE421/821, Spring
This lecture topic (two lectures) Chapter 6.1 – 6.4, except
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
This lecture topic (two lectures) Chapter 6.1 – 6.4, except 6.3.3
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
Constraint Satisfaction problems (CSP)
Wednesday, January 29, 2003CSCE Spring 2003 B.Y. Choueiry Constraint Consistency Chapter 3.
Constraint Optimization Presentation by Nathan Stender Chapter 13 of Constraint Processing by Rina Dechter 3/25/20131Constraint Optimization.
Foundations of Constraint Processing More on Constraint Consistency 1 Foundations of Constraint Processing CSCE421/821, Spring
Search by partial solutions. Where are we? Optimization methods Complete solutions Partial solutions Exhaustive search Hill climbing Random restart General.
Lecture 5: Constraint Satisfaction
Constraint Satisfaction Problems. Constraint satisfaction problems (CSPs) Standard search problem: – State is a “black box” – any data structure that.
1 Refining the Basic Constraint Propagation Algorithm Christian Bessière and Jean-Charles Régin Presented by Sricharan Modali.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
©2007 Tarik Hadzic1 Lecture 11: Consistency Techniques 1. Arc Consistency 2. Directional Consistency 3. Generalized Arc Consistency Efficient AI Programming.
Constraint Satisfaction Problems
Jean-Charles REGIN Michel RUEHER ILOG Sophia Antipolis Université de Nice – Sophia Antipolis A global constraint combining.
1 Consistency algorithms Chapter 3. Spring 2007 ICS 275A - Constraint Networks 2 Consistency methods Approximation of inference: Arc, path and i-consistecy.
M. HardojoFriday, February 14, 2003 Directional Consistency Dechter, Chapter 4 1.Section 4.4: Width vs. Local Consistency Width-1 problems: DAC Width-2.
Constraint Networks ( slides courtesy of Natalia Flerova, based on slides courtesy of Rina Dechter)
Constraint Satisfaction Problem Solving Chapter 5.
General search strategies: Look-ahead Chapter 5 Chapter 5.
26 April 2013Lecture 5: Constraint Propagation and Consistency Enforcement1 Constraint Propagation and Consistency Enforcement Jorge Cruz DI/FCT/UNL April.
Chapter 5 Outline Formal definition of CSP CSP Examples
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 2 Ryan Kinworthy CSCE Advanced Constraint Processing.
Advanced Constraint Processing, Fall 2009 An Efficient Consistency Algorithm for the Temporal Constraint Satisfaction Problem Berthe Y. Choueiry & Lin.
ICS-270A:Notes 6: 1 Notes 6: Constraint Satisfaction Problems ICS 270A Spring 2003.
1 Constraint Programming: An Introduction Adapted by Cristian OLIVA from Peter Stuckey (1998) Ho Chi Minh City.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
Relaxation and Hybrid constraint processing Different relaxation techniques Some popular hybrid techniques.
N Model problem ä specify in terms of constraints on acceptable solutions ä define variables (denotations) and domains ä define constraints in some language.
Modelling for Constraint Programming Barbara Smith CP 2010 Doctoral Programme.
Constraint Satisfaction Basics strongly influenced by Rina Dechter, “Constraint Processing”, 2003.
Constraint Satisfaction Read Chapter 5. Model Finite set of variables: X1,…Xn Variable Xi has values in domain Di. Constraints C1…Cm. A constraint specifies.
Computer Science CPSC 322 Lecture 13 Arc Consistency (4.5, 4.6 ) Slide 1.
Constraint Networks Overview. Suggested reading Russell and Norvig. Artificial Intelligence: Modern Approach. Chapter 5.
Constraint Satisfaction CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Problem Solving with Constraints Lookahead Schemas 1 Foundations of Constraint Processing CSCE496/896, Fall
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CP Summer School Modelling for Constraint Programming Barbara Smith 4. Combining Viewpoints, Modelling Advice.
CSC 8520 Spring Paula Matuszek CS 8520: Artificial Intelligence Search 3: Constraint Satisfaction Problems Paula Matuszek Spring, 2013.
Constraint Satisfaction Basics strongly influenced by Dr. Rina Dechter: “Constraint Processing”
Chapter 5 Constraint Satisfaction Problems
Review Test1. Robotics & Future Technology Future of Intelligent Systems / Ray Kurzweil futurist Ray Kurzweil / A Long Bet A Long Bet / Robot Soccer.
An Introduction to Artificial Intelligence Lecture 5: Constraint Satisfaction Problems Ramin Halavati In which we see how treating.
1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3 Grand Challenge:
Arc Consistency CPSC 322 – CSP 3 Textbook § 4.5 February 2, 2011.
CS 175 Project in AI. 2 Lectures: ICS 180 Tuesday, Thursday Hours: am Discussion: DBH 1300 Wednesday Hours: pm Instructor: Natalia.
Fahiem Bacchus, University of Toronto CSC384: Intro to Artificial Intelligence  Backtracking Search (CSPs)  Chapter 5  5.3 talks about local search.
Arc Consistency and Domain Splitting in CSPs CPSC 322 – CSP 3 Textbook Poole and Mackworth: § 4.5 and 4.6 Lecturer: Alan Mackworth October 3, 2012.
EXAMPLE: MAP COLORING. Example: Map coloring Variables — WA, NT, Q, NSW, V, SA, T Domains — D i ={red,green,blue} Constraints — adjacent regions must.
Constraint Propagation Artificial Intelligence CMSC January 22, 2002.
Lecture 5: Constraint Satisfaction Problems
Constraint Satisfaction CSE 473 University of Washington.
Other partial solution strategies. Partial solution algorithms greedy  branch and bound  A*  divide and conquer  dynamic programming.
1 Constraint Satisfaction Problems (CSP). Announcements Second Test Wednesday, April 27.
1 Hojjat Ghaderi [Courtesy of Fahiem Bacchus], University of Toronto, Fall 2006 CSC384: Intro to Artificial Intelligence Backtracking Search I ● Announcements.
ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information Systems.
CS 561, Session 8 1 This time: constraint satisfaction - Constraint Satisfaction Problems (CSP) - Backtracking search for CSPs - Local search for CSPs.
Constraint Programming
Notes 6: Constraint Satisfaction Problems
Constraints and Search
Chapter 5: General search strategies: Look-ahead
Directional consistency Chapter 4
Constraint Graph Binary CSPs
Presentation transcript:

Constraint Propagation influenced by Dr. Rina Dechter, “Constraint Processing”

why propagate constraints?  tightens networks  leaves fewer choices for search by eliminating dead ends BUT  propagating can be costly in resources  tradeoff between constraint propagation and search  “bounded constraint propagation algorithms”

how constraints improve search  used in partial solution searches where the start state is root of search tree (no variables have assigned values)  at any level of tree, some variables are assigned, some are not  constraints reduce choice for next variable assigned

how constraints improve search -v1v2v3v4-v1v2v3v4 choosing v 4 satisfy constraints on scopes containing v 4 with v 1, v 2, v 3 choosing v 4 satisfy constraints on scopes containing v 4 with v 1, v 2, v 3

example - red/green graph red green red green red green v1v1 v2v2 v3v3 -v1v2v3-v1v2v3 

arc-consistency  local consistency property involves binary constraint and its two variables any value in the domain of one variable can be extended by a value of the other variable consistent with the constraint

arc-consistency example x 1, D 1 = {1,2,4}{1,2} x 2, D 2 = {1,2,4}{2,4} C 12 : {(x 1,x 2 ) | x 1 < x 2 } = {(1,2),(1,4),(2,4)} x1124x1124 x1124x1124 x2124x2124 x2124x2124 x112.x112. x112.x112. x2.24x2.24 x2.24x2.24 arc-inconsistentarc-consistent

enforcing arc-consistency reduces domains  algorithm to make x i arc-consistent w.r.t. x j Revise(D i ) w.r.t. C ij on S ij ={x i,x j } for each a i  D i if no a j  D j such that (a i,a j )  C ij delete a i from D i performance O(k 2 ) in domain size

reducing search spaces  apply arc-consistency to all constraints in problem space removes infeasible solutions focuses search  arc consistency may be applied repeatedly to same constraints

interaction of constraints: example x 1, D 1 = {1,2,4} C 12 : {x 1 = x 2 } x 2, D 2 = {1,2,4} C 23 : {x 2 = x 3 } x 3, D 2 = {1,2,4} C 31 : {x 1 = 2*x 3 } x1124x1124 x1124x1124 x2124x2124 x2124x2124 x3124x3124 x3124x3124

AC-3 arc-consistency algorithm problem: R =(X,D,C) AC-3(R) q = new Queue() for every constraint C ij  C q.add((x i,x j )); q.add((x j,x i )); while !q.empty() (x i,x j ) = q.get(); Revise(D i ) wrt C ij if(D i changed) for all k ≠i or j q.add( (x k,x i ) performance O(c.k 3 ) c binary constraints, k domain size

arc-consistency  automated version of problem-solving activity by people - propagating constraints

loopholes in arc-consistency x 1, D 1 = {1,2} C 12 : {x 1 ≠ x 2 } x 2, D 2 = {1,2} C 23 : {x 2 ≠ x 3 } x 3, D 2 = {1,2} C 31 : {x 1 ≠ x 3 } x112x112 x112x112 x212x212 x212x212 x212x212 x212x212 ≠≠ ≠

stronger constraint checking  path-consistency extends arc-consistency to three variables at once (tightening)  global constraints -specialized consistency for set of variables e.g., alldifferent(x 1, …, x m ) - equivalent of permutation set  who owns the zebra? problem fixed sum, cumulative maximum

constraints in partial solution search space example problem: V = {x,y,l,z}, D = {D x, D y, D l, D z } D x ={2,3,4}, D y ={2,3,4}, D l ={2,5,6}, D z ={2,3,5} C = {C zx, C zy, C zl }: z must divide other variables 2,3,4 y 2,5,6 l 2,3,4 x 2,3,5 z

reducing search space size 1.variable ordering 2.arc-consistency (or path-consistency, etc) i.pre-search check to reduce domains ii.during search check for consistency with values already assigned

reducing space size 1.variable ordering

reducing space size 2.arc-consistency

reducing space size 2.path-consistency (tightening) C xl, C xy, C yl (slashed subtrees)

dfs with constraints - detail  extending a partial solution x k-1 x k x k ? D` k+1 = {1,2,3,4} SELECT-VALUE(D` k+1 ) while (! D` k+1.empty()) a = D` k+1.pop() if (CONSISTENT(x k+1 =a)) return a return null // dead end SELECT-VALUE(D` k+1 ) while (! D` k+1.empty()) a = D` k+1.pop() if (CONSISTENT(x k+1 =a)) return a return null // dead end

dfs algorithm with constraints dfs(X,D,C) returns consistent solution i=1, D` i = D i while (1≤ i ≤ n) // n=|X| x i = SELECT-VALUE(D` i ) if(x i == null) // dead end i-- // backtrack else i++ D` i = D i if (i==0) return “no solution” return (x 1, x 2, …, x n )

improving search performance  changing the resource balance between constraint propagation and search  do more pruning by consistency checking many strategies e.g., look-ahead algorithms

look-ahead consistency SELECT-FORWARD (D` k+1 ) while (!D` k+1.empty()) a = D` k+1.pop() if (CONSISTENT(x k+1 =a)) for (i; k+1 < i ≤ n) for all b  D` i if(!CONSISTENT(x i =b)) remove b from D` i if(D` i.empty()) // x k+1 =a is dead end reset all D` j, j>k+1 else return a return null SELECT-VALUE(D` k+1 ) while (!D` k+1.empty()) a = D` k+1.pop() if ( CONSISTENT (x k+1 =a)) return a return null SELECT-VALUE(D` k+1 ) while (!D` k+1.empty()) a = D` k+1.pop() if ( CONSISTENT (x k+1 =a)) return a return null

optimization algorithms  same strategies can be used in other search algorithms greedy, etc  example problem - sudoku