10/27 Exam post-mortem Phased-relaxation approach Order generalization (Partialization) Temporal Networks.

Slides:



Advertisements
Similar presentations
Foundations of Constraint Processing Temporal Constraints Networks 1Topic Foundations of Constraint Processing CSCE421/821, Spring
Advertisements

1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
1 CMSC 471 Fall 2002 Class #6 – Wednesday, September 18.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Introduction to Algorithms
Anagh Lal Tuesday, April 08, Chapter 9 – Tree Decomposition Methods- Part II Anagh Lal CSCE Advanced Constraint Processing.
Optimal Rectangle Packing: A Meta-CSP Approach Chris Reeson Advanced Constraint Processing Fall 2009 By Michael D. Moffitt and Martha E. Pollack, AAAI.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
Best-First Search: Agendas
Problem Solving and Search in AI Part I Search and Intelligence Search is one of the most powerful approaches to problem solving in AI Search is a universal.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
An Approximation of Generalized Arc-Consistency for Temporal CSPs Lin Xu and Berthe Y. Choueiry Constraint Systems Laboratory Department of Computer Science.
1 Optimisation Although Constraint Logic Programming is somehow focussed in constraint satisfaction (closer to a “logical” view), constraint optimisation.
Improving Backtrack Search For Solving the TCSP Lin Xu and Berthe Y. Choueiry Constraint Systems Laboratory Department of Computer Science and Engineering.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
Firewall Policy Queries Author: Alex X. Liu, Mohamed G. Gouda Publisher: IEEE Transaction on Parallel and Distributed Systems 2009 Presenter: Chen-Yu Chang.
Efficient Techniques for Searching the Temporal CSP Lin Xu and Berthe Y. Choueiry Constraint Systems Laboratory Department of Computer Science and Engineering.
4/15: LPG contd. And Temp. constraint networks. --~30 min of LPG discussion --Temporal constraint networks --Next class: Read Scheduling paper --Next Week:
Handling non-determinism and incompleteness. Problems, Solutions, Success Measures: 3 orthogonal dimensions  Incompleteness in the initial state  Un.
A New Efficient Algorithm for Solving the Simple Temporal Problem Lin Xu & Berthe Y. Choueiry Constraint Systems Laboratory University of Nebraska-Lincoln.
Jean-Charles REGIN Michel RUEHER ILOG Sophia Antipolis Université de Nice – Sophia Antipolis A global constraint combining.
1.A finer version of PPC. 2.Cheaper than PPC and F-W. 3.Guarantees the minimal network. 4.Automatically decomposes the graph into its bi-connected components:
Chao Chen Wednesday, February 26, Temporal Constraint Networks Chapter 12 Chao Chen CSCE Advanced Constraint Processing.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Impact of Problem Centralization on Distributed Constraint Optimization Algorithms John P. Davin and Pragnesh Jay Modi Carnegie Mellon University School.
Distributed Scheduling. What is Distributed Scheduling? Scheduling: –A resource allocation problem –Often very complex set of constraints –Tied directly.
Consistency Methods for Temporal Reasoning Lin XU Constraint Systems Laboratory Advisor: Dr. B.Y. Choueiry April, 2003 Supported by a grant from NASA-Nebraska,
Advanced Constraint Processing, Fall 2009 An Efficient Consistency Algorithm for the Temporal Constraint Satisfaction Problem Berthe Y. Choueiry & Lin.
Distributed Constraint Optimization * some slides courtesy of P. Modi
Query Processing Presented by Aung S. Win.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Homework 1 ( Written Portion )  Max : 75  Min : 38  Avg : 57.6  Median : 58 (77%)
Introduction to Job Shop Scheduling Problem Qianjun Xu Oct. 30, 2001.
Dijkstra’s Algorithm. Announcements Assignment #2 Due Tonight Exams Graded Assignment #3 Posted.
Advanced Constraint Processing, Spring 2013 Temporal Constraints Networks 1/9/20131Temporal Reasoning Advanced Constraint Processing CSCE 921, Spring 2013:
Temporal Reasoning and Planning in Medicine Frame-Based Representations and Description Logics Yuval Shahar, M.D., Ph.D.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
1 Short Term Scheduling. 2  Planning horizon is short  Multiple unique jobs (tasks) with varying processing times and due dates  Multiple unique jobs.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Temporal Constraint Management in Artificial Intelligence - Introduction: time & temporal constraints - The problem - Survey of AI approaches to temporal.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
1 Outline:  Optimization of Timed Systems  TA-Modeling of Scheduling Tasks  Transformation of TA into Mixed-Integer Programs  Tree Search for TA using.
For Monday Finish chapter 19 No homework. Program 4 Any questions?
For Monday Finish chapter 19 Take-home exam due. Program 4 Any questions?
Chapter 5 Constraint Satisfaction Problems
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
Chapter 2) CSP solving-An overview Overview of CSP solving techniques: problem reduction, search and solution synthesis Analyses of the characteristics.
Machine Learning Concept Learning General-to Specific Ordering
Arc Consistency CPSC 322 – CSP 3 Textbook § 4.5 February 2, 2011.
1 CMSC 471 Fall 2004 Class #21 – Thursday, November 11.
CSEP 521 Applied Algorithms Richard Anderson Winter 2013 Lecture 3.
1 CMSC 471 Fall 2002 Class #24 – Wednesday, November 20.
Temporal Primitives Institute of Computer Science Foundation for Research and Technology - Hellas Manos Papadakis & Martin Doerr Workshop: Extending, Mapping.
NPC.
Introduction to NP Instructor: Neelima Gupta 1.
A Structural Characterization of Temporal Dynamic Controllability Paul Morris NASA Ames Research Center Moffett Field, CA 94035, U.S.A.
Of 24 lecture 11: ontology – mediation, merging & aligning.
Timetable Problem solving using Graph Coloring
Scheduling with Constraint Programming
Temporal Plan Execution: Dynamic Scheduling and Simple Temporal Networks Brian C. Williams J/6.834J December 2nd,
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Consistency Methods for Temporal Reasoning
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Instructor: Rajeev Alur
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Temporal Planning, Scheduling and Execution
Class #20 – Wednesday, November 5
Presentation transcript:

10/27 Exam post-mortem Phased-relaxation approach Order generalization (Partialization) Temporal Networks

Phased Relaxation in SAPA

Adjusting the Heuristic Values Ignored resource related information can be used to improve the heuristic values (such like +ve and –ve interactions in classical planning) Adjusted Cost: C = C +  R  (Con(R) – (Init(R)+Pro(R)))/  R  * C(A R )  Cannot be applied to admissible heuristics Similar phased relaxation is also applied to negative interactions

SAPA converts its position constrained plans to order constrained plans A1A2A3 A1(10) gives g1 but deletes p at the start A3(8) gives g2 but requires p at start A2(4) gives p at end We want g1,g2 A position-constrained plan with makespan 22 A1 A2 A3 G p g1 g2 [et(A1) = st(A3)] [et(A2) <= st(A3) …. Order Constrained plan The best makespan dispatch of the order-constrained plan A1 A2A3 14+  There could be multiple O.C. plans because of multiple possible causal sources. Optimization will involve Going through them all. ~p

Order generalization as Explanation-based learning  The order generalization (partialization) in the previous slide is an example of Explanation-based learning  The idea is to “explain” (prove) why an example (in our case, a specific plan) is an instance of a concept (in our case, “a correct solution plan”), and realize that only the aspects of the example that took part in the proof/explanation are relevant (needed) for the proof to proceed.  The explanation is done with respect to some background domain theory (in our case, the theory is the theory of what makes a plan “correct”—which is given by the causal proof).  If the background theory is incorrect, then explanation will be incorrect too (and you will learn superstitions ;-)  Sometimes, background theory may be partial (correct but incomplete). For example, you may not know how to explain why the example is an instance of the concept—but may know that certain attributes qualitatively influence (determine) certain class labels  E.g. you get down at Sao Paolo, Brazil and the first three people you see  Are speaking portugese  Are wearing red shirts  You induce that Brazilians speak Portugese, but you don’t induce that Brazilians all wear red clothes. This is because you think nationality does determine language, but does not determine color of clothes.  EBL can be used in conjunction with inductive learning. EBL can pick the relevant attributes over which you then do your induction  Recall that one major headache in many classification learning strategies is the issue of irrelevant attributes. The domain theory and EBL analysis can help you identify relevant attributes over which to do learning

Plan representation A1 A2 A3 Drive(cityA,cityB) Q At(truck,B) An executable plan must provide -- the actions that need to be executed -- the start times for each of the actions  Or a set of simple temporal constraints on the set of actions (S.T.C. are generalization of partial orders) E.g. A1—[4,5]  A2 (means 4 <= ST(A2) – ST(A1) <= 5 ) Plan views: Pert and Gantt charts GANTT Chart is what is shown on the right PERT shows the Causal links Is this represent ation general?

Problem Definitions  Position constrained (p.c) plan: The execution time of each action is fixed to a specific time point  Can be generated more efficiently by state-space planners  Order constrained (o.c) plan: Only the relative orderings between actions are specified  More flexible solutions, causal relations between actions  Partialization: Constructing a o.c plan from a p.c plan Q R R G Q RR {Q} {G} t1t1 t2t2 t3t3 p.c plano.c plan Q R R G Q RR {Q} {G}

Projective Task Expansion Dynamic Scheduling and Task Dispatch Task Dispatch Temporal Plan Goals and Environment Constraints Temporal Network Solver Temporal Planner

Y Qualitative Temporal Constraints (Allen 83)  x before y  x meets y  x overlaps y  x during y  x starts y  x finishes y  x equals y XY XY XY YX YX YX X  y after x  y met-by x  y overlapped-by x  y contains x  y started-by x  y finished-by x  y equals x

Intervals can be handled directly  The 13 in the previous page are primitive relations. The relation between a pair of intervals may well be a disjunction of these primitive ones:  A meets B OR A starts B  There are “transitive” axioms for computing the relations between A and C, given the relations between A and B & B and C  A meets B & B starts C => A starts C  A starts B & B during C => ~ [C before A]  Using these axioms, we can do constraint propagation directly on interval relations; to check for tight relations among any given pair of relations (as well as consistency of a set of relations)  Allen’s Interval Algebra  Intervals can also be handled in terms of their start and end points. This latter is what we will see next.

Example: Deep Space One Remote Agent Experiment Max_Thrust Idle Poke Timer Attitude Accum SEP Action SEP_Segment

Qualitative Temporal Constraints Maybe Expressed as Inequalities (Vilain, Kautz 86)  x before yX + < Y -  x meets yX + = Y -  x overlaps y(Y - < X + ) & (X - < Y + )  x during y (Y - < X - ) & (X + < Y + )  x starts y(X - = Y - ) & (X + < Y + )  x finishes y(X - < Y - ) & (X + = Y + )  x equals y(X - = Y - ) & (X + = Y + ) Inequalities may be expressed as binary interval relations: X + - Y - < [-inf, 0]

Metric Constraints  Going to the store takes at least 10 minutes and at most 30 minutes. → 10 < [T + (store) – T - (store)] < 30  Bread should be eaten within a day of baking. → 0 < [T + (baking) – T - (eating)] < 1 day  Inequalities, X + < Y -, may be expressed as binary interval relations: → - inf < [X + - Y - ] < 0

Jerseyvotes Incumbent rule Turnout Median Outcome 11/1: Temporal Networks Scheduling The Cell-phone correction

Metric Time: Quantitative Temporal Constraint Networks (Dechter, Meiri, Pearl 91)  A set of time points X i at which events occur.  Unary constraints (a 0 < X i < b 0 ) or (a 1 < X i < b 1 ) or...  Binary constraints (a 0 < X j - X i < b 0 ) or (a 1 < X j - X i < b 1 ) or... Not n-ary constraints

Digression: the less-than-fully-rational bias for binary CSP problems in CSP community  Much work in CSP community (including temporal networks) is directed at “binary” CSPs—i.e. csps where all the constraints are between exactly 2 variables.  E.g. Arc-consistency, Conflit-directed-backjumping etc are only clearly articulated for binary CSPs first. Temporal networks studied in Dechter et al are all binary.  Binary CSPs are a “canonical” subset of CSP—any n-ary CSP can be compiled into a binary CSP by introducing additional (hidden) variables. The conversion is not always good  [Bacchus and Vanbeek, 98] provides a tradeoff analysisBacchus and Vanbeek, 98]  The ostensible reason for the interest in binary CSPs is ostensibly that most naturally occuring constraints are between 2-entities.  A less charitable characterization is that the constraint graphs in binary CSPs are normal graphs so they can be analyzed better  The constraint graphs in n-ary CSPs will be “hyper graphs” (edges are between sets of vertices)  In the case of temporal networks that will arise in planning,even for simple constraints caused by causal threats, the disjunctive constraint that is posted is a 3-ary constraint (between threat, producer and consumer)—not a binary one  If you split the disjunction into the search space however, we will get two Simple temporal networks that are both binary.

Temporal Constraint Satisfaction Problem (TCSP)  X i continuous variables  {I 1,...,I n }interval constraints where I i = [a i,b i ]interval  T i = (a i  X i  b i ) or... or (a i  X i  b i )  T ij = (a 1  X i - X j  b 1 ) or... or (a n  X i - X j  b n )  Simple Temporal Network if each constraint has only one interval [Dechter, Meiri, Pearl, aij89]

TCSPs vs CSPs  TCSP is a subclass of CSPs with some important properties  The domains of the variables are totally ordered  The domains of the variables are continuous  Most queries on TCSPs would involve reasoning over all solutions of a TCSP (e.g. earliest/latest feasible time of a temporal variable)  Since there are potentially an infinite number of solutions to a TCSP, we need to find a way of representing the set of all solutions compactly  Minimal TCSP network is such a representation

TCSP Are Visualized Using Directed Constraint Graphs [10,20] [30,40] [60,inf] [10,20] [20,30] [40,50] [60,70]

TCSP Queries (Dechter, Meiri, Pearl, AIJ91)  Is the TCSP consistent? Planning  What are the feasible times for each X i ?  What are the feasible durations between each X i and X j ?  What is a consistent set of times? Scheduling  What are the earliest possible times? Scheduling  What are the latest possible times? All of these can be done if we compute the minimal equivalent network

Minimal Networks  A TCSP N1 is considered minimal network if there is no other network N2 that has the same solutions as N1, and has at least one tighter constraint than N1  Tightness means there are fewer valid composite labels for the variables. This has nothing to do with the “syntactic complexity” of the constraint  A Constraint a[ 1 3]b is tighter than a constraint a[0 10]b  A constraint a[1 1.5][ ][ ] [ ] [5 6]b is tighter than a constraint a[0 10]b  Computation of minimal networks, in general, involves doing two operations:  Intersection over constraints  Composition over constraints  For each path p in the network, connecting a pair of nodes a and b, find the path constraint between a and b (using composition)  Intersect all the constraints between a pair of nodes a and b to find the tightest constraint between a and b  Can lead to “fragmentation of constraints” in the case of disjunctive TCSPs…

Operations on Constraints: Intersection And Composition Compose [10,20] with [30,40][60,inf] to get constraint between 0 and 3

An example where minimal network is different from the original one [10,20][30,40] [0,100] 13 0 [10,20][30,40] [0,100] [40,60] To compute the constraint between 0 and 3, we first compose [10,20] and [30,40] to get [40,60] we then intersect [40,60] and [0,100] to get [40,60]

Computing Minimal Network for a STP  Minimal networks for STPs can be computed by ensuring “path consistency”  For each triple of vertices i,j,k  C(i,k) := C(i,k).intersection. [C(i,j).compose. C(j,k)]  For STP’s we are guaranteed to reach fixpoint by the time we visit each constraint once.  An alternative is to convert STP to a distance graph and do All pairs shortest path algorithm

To Query an STN Map to a Distance Graph G d = [10,20][30,40] [10,20] [40,50] [60,70] T ij = (a ij  X j - X i  b ij ) X j - X i  b ij X i - X j  - a ij Edge encodes an upper bound on distance to target from source.

G d Induces Constraints  Path constraint: i 0 =i, i 1 =..., i k = j → Conjoined path constraints result in the shortest path as bound: where d ij is the shortest path from i to j

Conjoined Paths are Computed using All Pairs Shortest Path (e.g., Floyd-Warshall’s algorithm ) 1. for i := 1 to n do d ii 0; 2. for i, j := 1 to n do d ij a ij ; 3. for k := 1 to n do 4. for i, j := 1 to n do 5. d ij min{d ij, d ik + d kj }; i k j

d-graph Shortest Paths of G d

STN Minimum Network d-graphSTN minimum network

Disjunctive TCSPs  Suppose we have a TCSP, where just one of the constraints is dijunctive: a [1 2][5 6] b  We have two STPs one in which the constraint a[1 2]b is there and the other contains a[5 6]b  Disjunctive TCSP’s can be solved by solving the exponential number of STPs  Minimal network for DTP is the union of minimal networks for the STPs  This is a brute-force method; Exponential number of STPs—many of which have significant overlapping constraints.  There are better approaches that work directly on DTPs [Decther, Schwalb, 97]  Scheduling can be seen as solving a DTP (the disjunction is induced because of the resource contention constraints)

Testing Plan Consistency d-graph No negative cycles: -5 > T A – T A = 0

Latest Solution d-graph Node 0 is the reference.

Earliest Solution d-graph Node 0 is the reference.

Solution: Earliest Times S 1 = (-d 10,..., -d n0 )

Scheduling: Feasible Values d-graph X 1 in [10, 20] X 2 in [40, 50] X 3 in [20, 30] X 4 in [60, 70] Latest Times Earliest Times

Scheduling without Search: Solution by Decomposition d-graph Select value for 1 à 15[10,20]

Scheduling without Search: Solution by Decomposition d-graph Select value for 1 à 15[10,20]

Solution by Decomposition d-graph Select value for 2, consistent with 1 à 45 [40,50], 15+[30,40] Select value for 1 à 15

Solution by Decomposition d-graph Select value for 2, consistent with 1 à 45[45,50] Select value for 1 à 15

Solution by Decomposition d-graph Select value for 2, consistent with 1 à 45 [45,50] Select value for 1 à 15

Solution by Decomposition d-graph Select value for 2, consistent with 1 à 45 Select value for 1 à 15 Select value for 3, consistent with 1 & 2 à 30 [20,30], 15+[10,20],45+[-20,-10]

Solution by Decomposition d-graph Select value for 2, consistent with 1 à 45 Select value for 1 à 15 Select value for 3, consistent with 1 & 2 à 30 [25,30]

Solution by Decomposition d-graph Select value for 2, consistent with 1 à 45 Select value for 1 à 15 Select value for 3, consistent with 1 & 2 à 30 [25,30]

Solution by Decomposition d-graph Select value for 4, consistent with 1,2 & 3 O(N 2 ) Select value for 2, consistent with 1 à 45 Select value for 1 à 15 Select value for 3, consistent with 1 & 2 à 30