Title: Exam post-mortem
110/27
- Exam post-mortem
- Phased-relaxation approach
- Order generalization (Partialization)
- Temporal Networks
2Phased Relaxation in SAPA
3Adjusting 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(AR)
? Cannot be applied to admissible heuristics
Similar phased relaxation is also applied to
negative interactions
4SAPA converts its position constrained plans to
order constrained plans
A position-constrained plan with makespan 22
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
A1
A2
A3
p
Order Constrained plan
The best makespan dispatch of the
order-constrained plan
A2
g2
A3
G
p
A2
A3
14e
A1
A1
g1
There could be multiple O.C. plans because of
multiple possible causal sources. Optimization
will involve Going through them all.
et(A1) lt et(A2) or st(A1) gt st(A3) et(A2)
lt st(A3) .
5Order 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
correctwhich 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 conceptbut 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 dont 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
6Plan representation
Is this representation general?
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.
A14,5?A2 (means 4 lt
ST(A2) ST(A1) lt 5 )
Plan views Pert and Gantt charts GANTT Chart
is what is shown on the right PERT shows the
Causal links
7Problem 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
t1
t2
t3
Q
R
Q
R
R
R
G
G
?R
?R
Q
Q
Q
G
Q
G
p.c plan
o.c plan
8(No Transcript)
9Goals and Environment Constraints
Projective Task Expansion
Temporal NetworkSolver
Temporal Planner
Temporal Plan
Task Dispatch
Dynamic Scheduling and Task Dispatch
10(No Transcript)
11Qualitative 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
- 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
X
Y
X
Y
X
Y
Y
X
Y
X
Y
X
Y
X
12Intervals 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 gt A starts C
- A starts B B during C gt 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) - Allens Interval Algebra
- Intervals can also be handled in terms of their
start and end points. This latter is what we will
see next.
13Example Deep Space One Remote Agent Experiment
Timer
Max_Thrust
Idle
Idle
SEP_Segment
Accum
SEP Action
Attitude
Poke
14Qualitative Temporal ConstraintsMaybe Expressed
as Inequalities (Vilain, Kautz 86)
- x before y X lt Y-
- x meets y X Y-
- x overlaps y (Y- lt X) (X- lt Y)
- x during y (Y- lt X-) (X lt Y)
- x starts y (X- Y-) (X lt Y)
- x finishes y (X- lt Y-) (X Y)
- x equals y (X- Y-) (X Y)
Inequalities may be expressed as binary interval
relations X - Y- lt -inf, 0
15Metric Constraints
- Going to the store takes at least 10 minutes and
at most 30 minutes. - 10 lt T(store) T-(store) lt 30
- Bread should be eaten within a day of baking.
- 0 lt T(baking) T-(eating) lt 1 day
- Inequalities, X lt Y- , may be expressed as
binary interval relations - - inf lt X - Y- lt 0
16Jerseyvotes
Incumbent rule
11/1 Temporal Networks Scheduling
Median Outcome
Turnout
The Cell-phone correction
17(No Transcript)
18Metric Time Quantitative Temporal Constraint
Networks(Dechter, Meiri, Pearl 91)
- A set of time points Xi at which events occur.
- Unary constraints (a0 lt Xi lt b0 ) or (a1 lt Xi lt
b1 ) or . . . - Binary constraints
- (a0 lt Xj - Xi lt b0 ) or (a1 lt Xj - Xi lt b1 ) or
. . .
Not n-ary constraints
19Digression 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 CSPsi.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 CSPany
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
analysis - 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.
20Temporal Constraint Satisfaction Problem (TCSP)
- lt Xi, Ti , Tij gt
- Xi continuous variables
- I1, . . . ,In interval constraints
- where Ii ai,bi interval
- Ti (ai Xi bi) or . . . or (ai Xi bi)
- Tij (a1 Xi - Xj b1) or ... or (an Xi - Xj
bn) - Simple Temporal Network if each constraint has
only one interval
Dechter, Meiri, Pearl, aij89
21TCSPs 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
22TCSP Are Visualized UsingDirected Constraint
Graphs
23TCSP Queries(Dechter, Meiri, Pearl, AIJ91)
- Is the TCSP consistent? Planning
- What are the feasible times for each Xi?
- What are the feasible durations between each Xi
and Xj? - 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
24Minimal 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 3b is tighter than a
constraint a0 10b - A constraint a1 1.51.6 1.91.9 2.3 2.3 4.8
5 6b is tighter than a constraint a0 10b - 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
25Operations on Constraints Intersection And Co
mposition
Compose 10,20 with 30,4060,inf to get
constraint between 0 and 3
26An example where minimal network is different
from the original one.
40,60
10,20
30,40
10,20
30,40
0
1
3
0
1
3
0,100
0,100
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
27Computing 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 STPs 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
28To Query an STN Map to aDistance Graph Gd lt
V,Ed gt
Edge encodes an upper bound on distance to target
from source.
Xj - Xi bij Xi - Xj - aij
Tij (aij Xj - Xi bij)
29Gd Induces Constraints
- Path constraint i0 i, i1 . . ., ik j
- Conjoined path constraints result in the
shortest path as bound - where dij is the shortest path from i to j
30Conjoined Paths are Computed using All Pairs
Shortest Path(e.g., Floyd-Warshalls algorithm )
- 1. for i 1 to n do dii 0
- 2. for i, j 1 to n do dij aij
- 3. for k 1 to n do
- 4. for i, j 1 to n do
- 5. dij mindij, dik dkj
k
i
j
31Shortest Paths of Gd
32STN Minimum Network
d-graph
STN minimum network
33Disjunctive TCSPs
- Suppose we have a TCSP, where just one of the
constraints is dijunctive a 1 25 6 b - We have two STPs one in which the constraint
a1 2b is there and the other contains a5 6b - Disjunctive TCSPs 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 STPsmany 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)
34Testing Plan Consistency
No negative cycles -5 gt TA TA 0
d-graph
35Latest Solution
Node 0 is the reference.
20
40
0
1
2
-10
-30
-10
20
50
4
3
-40
-60
70
d-graph
36Earliest Solution
Node 0 is the reference.
20
40
0
1
2
-10
-30
-10
20
50
4
3
-40
-60
70
d-graph
37Solution Earliest Times
S1 (-d10, . . . , -dn0)
20
40
0
1
3
-10
-30
-10
20
50
4
2
-40
-60
70
38SchedulingFeasible Values
Latest Times
- X1 in 10, 20
- X2 in 40, 50
- X3 in 20, 30
- X4 in 60, 70
d-graph
Earliest Times
39Scheduling without Search Solution by
Decomposition
- Select value for 1
- 15 10,20
d-graph
40Scheduling without Search Solution by
Decomposition
- Select value for 1
- 15 10,20
d-graph
41Solution by Decomposition
- Select value for 2, consistent with 1
- 45 40,50, 1530,40
d-graph
42Solution by Decomposition
- Select value for 2, consistent with 1
- 45 45,50
d-graph
43Solution by Decomposition
- Select value for 2, consistent with 1
- 45 45,50
d-graph
44Solution by Decomposition
- Select value for 2, consistent with 1
- 45
- Select value for 3, consistent with 1 2
- 30 20,30, 1510,20,45-20,-10
d-graph
45Solution by Decomposition
- Select value for 2, consistent with 1
- 45
- Select value for 3, consistent with 1 2
- 30 25,30
d-graph
46Solution by Decomposition
- Select value for 2, consistent with 1
- 45
- Select value for 3, consistent with 1 2
- 30 25,30
d-graph
47Solution by Decomposition
- Select value for 2, consistent with 1
- 45
- Select value for 3, consistent with 1 2
- 30
d-graph
- Select value for 4, consistent with 1,2 3