1 Motivation Problem formulation should change to accommodate changes in real world! Some examples: delayed trains, flights, … broken machines, ill workers,

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Non-Binary Constraint Satisfaction Toby Walsh Cork Constraint Computation Center.
Constraint Satisfaction Problems Russell and Norvig: Chapter
Foundations of Constraint Processing Lookahead Schemas 1 Foundations of Constraint Processing CSCE421/821, Spring
Constraint Satisfaction Problems
Presented by Monissa Mohan 1.  A highly optimized BCP algorithm  Two watched literals  Fast Backtracking  Efficient Decision Heuristic  Focused on.
Maintaining Arc Consistency We have a constraint graph G of variables X 1,...X n, and constraint relations {X i  X j}, and each Xi has a value set V (X.
Constraint Based Reasoning over Mutex Relations in Graphplan Algorithm Pavel Surynek Charles University, Prague Czech Republic.
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
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
1 Constraint operations: Simplification, Optimization and Implication.
an incremental version of A*
Maintaining Arc-consistency over Mutex Relations in Planning Graphs during Search Pavel Surynek Roman Barták Charles University, Prague Czech Republic.
1 Chapter 2: Simplification, Optimization and Implication Where we learn more fun things we can do with constraints.
Constraint Satisfaction problems (CSP)
An Improved Algorithm for Maintaining Arc Consistency in Dynamic Constraint Satisfaction Problems Pavel Surynek Czech Technical University Prague
1 Refining the Basic Constraint Propagation Algorithm Christian Bessière and Jean-Charles Régin Presented by Sricharan Modali.
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Constraint Satisfaction Problems
Hierarchical Constraint Satisfaction in Spatial Database Dimitris Papadias, Panos Kalnis And Nikos Mamoulis.
“IBM Research Report A faster Exponential-Time Algorithm for Max 2-Sat, Max Cut, and Max k- Cut”, Alexander D. Scott, Gregory B. Sorkin, IBM Research Division.
Chapter 5 Outline Formal definition of CSP CSP Examples
Constraint Satisfaction Problems
Identifying Solutions
Relaxation and Hybrid constraint processing Different relaxation techniques Some popular hybrid techniques.
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.
Constraint Satisfaction CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
1 CS B551: Elements of Artificial Intelligence Instructor: Kris Hauser
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Problem Solving with Constraints Lookahead Schemas 1 Foundations of Constraint Processing CSCE496/896, Fall
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
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.
Artificial Intelligence Tutorials
Chapter 2) CSP solving-An overview Overview of CSP solving techniques: problem reduction, search and solution synthesis Analyses of the characteristics.
Maintaining Arc Consistency (MAC) MAC is the same as Back-tracking, but with calls to AC-3 interleaved... function Backtracking-Search(csp) returns.
An Introduction to Artificial Intelligence Lecture 5: Constraint Satisfaction Problems Ramin Halavati In which we see how treating.
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
Constraint Propagation influenced by Dr. Rina Dechter, “Constraint Processing”
Making Path-Consistency Stronger for SAT Pavel Surynek Faculty of Mathematics and Physics Charles University in Prague Czech Republic.
IBM Labs in Haifa © 2005 IBM Corporation Assumption-based Pruning in Conditional CSP Felix Geller and Michael Veksler.
Roman Barták (Charles University in Prague, Czech Republic) ACAT 2010.
Optimization Problems
Chapter 2: Simplification, Optimization and Implication
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
CS B551: Elements of Artificial Intelligence
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Class #17 – Thursday, October 27
Constraint Propagation
Graphplan/ SATPlan Chapter
Running example The 4-houses puzzle:
Class #19 – Monday, November 3
Foundations of Constraint Processing All questions to Piazza
Lookahead Schemas Foundations of Constraint Processing
Constraint Satisfaction Problems
Chapter 5: General search strategies: Look-ahead
If you can easily isolate one of the variables,
Problem Solving With Constraints
Constraint satisfaction problems
Constraint Satisfaction Problems. A Quick Overview
Foundations of Constraint Processing All questions to Piazza
Graphplan/ SATPlan Chapter
Graphplan/ SATPlan Chapter
Constraint Graph Binary CSPs
Constraint satisfaction problems
Consistency algorithms
Presentation transcript:

1 Motivation Problem formulation should change to accommodate changes in real world! Some examples: delayed trains, flights, … broken machines, ill workers, … new demands, … interactive solvers, …

2 Problem area Dynamic CSP: constraints can be added to and retracted from the constraint model dynamically in an arbitrary order Solving approaches: robust solutions (still valid after small changes) new solutions with minimal perturbations (changes) reusing the original solutions for a new solution reusing the reasoning process maintaining maximal arc consistency after constraint addition or retraction

3 Current situation Dynamic versions of AC algorithms AC-4 DnAC-4 fast but large memory consumption AC-6 DnAC-6 fast but still large memory consumption so far fastest algorithm for maintaining dynamic AC AC-3 AC|DC low memory consumption but slow AC-3.1 AC-3.1|DC substitutes AC-3 in AC|DC by an optimal AC algorithm DnAC-4DnAC-6AC|DCAC-3.1|DC Space complexityO(ed 2 +nd)O(ed+nd)O(e+nd)O(ed+nd) Time complexityO(ed 2 ) O(ed 3 )O(ed 2 )

4 Constraint retraction base approach 1. restore values that were deleted when propagating through the retracted constraint 2. propagate domain extensions to other variables (like reverted AC) algorithms differ in how many values are returned back to domains 3. remove inconsistencies via “standard” arc consistency algorithms algorithms differ in used AC algorithm

5 Our approach improve practical time efficiency of AC|DC while keeping low memory consumption  using an optimal (fine-grained) AC algorithm increases memory consumption (AC-3.1|DC)  restore only the most promising values (our experiments showed that AC|DC restores many values that are immediately deleted by AC) How? use information about the reason and “time” of value removal

6 Removal information When and why a given value has been removed? Justification the first neighboring variable in which the eliminated value lost all supports (like in DnAC) Removal time when the variable was eliminated (a continual counter of all deleted values) Usage: A value V is restored if the neighboring variable is justification for the value V has a restored supporter for the value V has a restored value that has been eliminated before V new

7 Example initial pruning A: 2 3 4/C 2 B: 2/D 6 3/D 9 4 C: 1/A 3 2/A 4 3/E 7 4 D: 1/B 1 2/C 5 3/C 8 4 E: 3 B=D (1) C=D (3) A<C (2) C≠E (4) order number when the constraint is added justification for value removal Variable Time Constraints are incrementally added to the problem and AC is established after each step

8 Example constraint retraction A: B: 2/D 6 3/D 9 4 C: 1 2 3/E 7 4 D: 1/B 1 2/C 5 3/C 8 4 E: 3 B=D (1) C=D (3) C≠E (4) Constraint A<C is removed from the problem These values are returned to domains because they were deleted when propagating via the retracted constraint

9 Example propagation A: B: 2 3/D 9 4 C: 1 2 3/E 7 4 D: 1/B 1 2 3/C 8 4 E: 3 B=D C=D C≠E A: B: 2 3/D 9 4 C: 1/D /E 7 4 D: 1/B 1 2 3/C 8 4 E: 3 B=D C=D C≠E AC is re-established at the end again Propagate extended domains

10 The algorithm modified AC-3 function propagate-ac3'(P, data, revise) 1queue := revise 2while queue not empty do 3 select and remove a constraint c from queue 4 {u,v} := the variables constrained by c 5 (P,data,revise_u) := filter-arc-ac3'(P, data, c, u, v) 6 (P,data,revise_v) := filter-arc-ac3'(P, data, c, v, u) 7 queue := queue  revise_u  revise_v 8return (P,data) function filter-arc-ac3'(P, data, c, u, v) 1modified := false 2for each d in P.D[u] do 3 if d has no support in P.D[v] w.r.t. c then 4 P.D[v] := P.D[v] - {d} 5 data.justif[u,d].var := v 6 data.justif[u,d].time := data.time 7 data.time := data.time modified := true 9if not modified then 10 return (P,data,Ø) 11return (P,data,{e in P.C|u is constrained by e and e≠c}) new

11 The algorithm initialization function retract-constraint-ac|dc2(P, data, c) 1(P,data,restored_u) := 2 initialize-ac|dc2(P, data, c, u, v) 3(P,data,restored_v) := 4 initialize-ac|dc2(P, data, c, v, u) 5P.C := P.C - {c} 6(P,data,revise) := 7 propagate-ac|dc2(P, data,{restored_u,restored_v}) 8(P,data) := propagate-ac3'(P, data, revise) 9return (P,data) function initialize-ac|dc2(P, data, c, u, v) 1restored_u := Ø 2time_u :=  3for each d in (P.D 0 [u] - P.D[u]) do 4 if data.justif[u,d].var = v then 5 P.D[u] := P.D[u]  {d} 6 data.justif[u,d].var := NIL 7 restored_u := restored_u  {d} 8 time_u := min(time_u, data.justif[u,d].time) 9return (P,data,(u,time_u,restored_u)) new

12 The algorithm propagation function propagate-ac|dc2(P, data, restore) 1revise := Ø 2while restore not empty do 3 select and remove (u,time_u,restored_u) from restore 4 for each c in P.C|u is constrained by c do 5 {u,v} := the variables constrained by c 6 restored_v := Ø 7 time_v :=  8 for each d in (P.D 0 [v] - P.D[v]) do 9 if data.justif[v, d].var = u then 10 if data.justif[v, d].time > time_u then 11 if d has a support in restored_u w.r.t. c then 12 P.D[v] := P.D[v]  {d} 13 data.justif[v,d].var := NIL 14 restored_v := restored_v  {d} 15 time_v := min(time_v, data.justif[v,d].time) 16 restore := restore  {(v,time_v,restored_v)} 17 revise := revise  {e in P.C|u is constrained by e}) 18return (P,data,revise) new

13 Experiments constraint checks Consistent statesInconsistent states AC|DC AC|DC-2 DnAC-6 (tightness) RCSP  100, 50, 0.3, p2  constraints added incrementally until a given density reached or inconsistency detected and after that 10% of randomly selected constraints retracted

14 Experiments runtime comparison Consistent statesInconsistent states AC|DC AC|DC-2 DnAC-6 (tightness) RCSP  100, 50, 0.3, p2  constraints added incrementally until a given density reached or inconsistency detected and after that 10% of randomly selected constraints retracted

15 Experiments memory consumption Domain size (d) *p 2 68%74%77%78%80%81% AC|DC20MB22MB27MB38MB44MB51MB DnAC-641MB48MB59MB80MB93MB106MB AC|DC-220MB22MB27MB38MB44MB51MB %83%84% 85% 60MB66MB72MB87MB90MB110MB127MB 124MB137MB149MB174MB184MB217MB247MB 60MB66MB72MB87MB90MB110MB127MB NOTE: includes extensional representation of the constraints that is almost identical to memory consumption of AC|DC and AC|DC-2! RCSP  100, d, 0.3, p2 

A New Algorithm for Maintaining Arc Consistency after Constraint Retraction Pavel Surynek and Roman Barták Charles University, Prague