Download presentation
Presentation is loading. Please wait.
1
10/27 Exam post-mortem Phased-relaxation approach Order generalization (Partialization) Temporal Networks
2
Phased Relaxation in SAPA
3
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
4
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
5
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
6
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?
7
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 RR {Q} {G} t1t1 t2t2 t3t3 p.c plano.c plan Q R R G Q RR {Q} {G}
9
Projective Task Expansion Dynamic Scheduling and Task Dispatch Task Dispatch Temporal Plan Goals and Environment Constraints Temporal Network Solver Temporal Planner
11
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
12
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.
13
Example: Deep Space One Remote Agent Experiment Max_Thrust Idle Poke Timer Attitude Accum SEP Action SEP_Segment
14
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]
15
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
16
Jerseyvotes Incumbent rule Turnout Median Outcome 11/1: Temporal Networks Scheduling The Cell-phone correction
18
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
19
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.
20
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]
21
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
22
TCSP Are Visualized Using Directed Constraint Graphs 13 42 0 [10,20] [30,40] [60,inf] [10,20] [20,30] [40,50] [60,70]
23
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
24
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][1.6 1.9][1.9 2.3] [2.3 4.8] [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…
25
Operations on Constraints: Intersection And Composition Compose [10,20] with [30,40][60,inf] to get constraint between 0 and 3
26
An example where minimal network is different from the original one. 13 0 [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]
27
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
28
To Query an STN Map to a Distance Graph G d = 70 13 42 0 20 50 -10 40 -30 20 -10 -40 -60 13 42 0 [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.
29
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
30
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
31
d-graph Shortest Paths of G d 70 12 43 0 20 50 -10 40 -30 20 -10 -40 -60
32
STN Minimum Network d-graphSTN minimum network
33
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)
34
Testing Plan Consistency d-graph 70 12 43 0 20 50 -10 40 -30 20 -10 -40 -60 No negative cycles: -5 > T A – T A = 0
35
Latest Solution 70 12 43 0 20 50 -10 40 -30 20 -10 -40 -60 d-graph Node 0 is the reference.
36
Earliest Solution 70 12 43 0 20 50 -10 40 -30 20 -10 -40 -60 d-graph Node 0 is the reference.
37
Solution: Earliest Times 70 13 42 0 20 50 -10 40 -30 20 -10 -40 -60 S 1 = (-d 10,..., -d n0 )
38
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
39
Scheduling without Search: Solution by Decomposition d-graph Select value for 1 à 15[10,20]
40
Scheduling without Search: Solution by Decomposition d-graph Select value for 1 à 15[10,20]
41
Solution by Decomposition d-graph Select value for 2, consistent with 1 à 45 [40,50], 15+[30,40] Select value for 1 à 15
42
Solution by Decomposition d-graph Select value for 2, consistent with 1 à 45[45,50] Select value for 1 à 15
43
Solution by Decomposition d-graph Select value for 2, consistent with 1 à 45 [45,50] Select value for 1 à 15
44
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]
45
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]
46
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]
47
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.