Foundations of Artificial Intelligence
39. Automated Planning: Landmark Heuristics
Malte Helmert
University of Basel
May 10, 2021
M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 1 / 23
Foundations of Artificial Intelligence
May 10, 2021 — 39. Automated Planning: Landmark Heuristics
39.1 Finding Landmarks 39.2 The LM-Cut Heuristic 39.3 Summary
M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 2 / 23
Automated Planning: Overview
Chapter overview: automated planning I 33. Introduction
I 34. Planning Formalisms
I 35.–36. Planning Heuristics: Delete Relaxation I 37 Planning Heuristics: Abstraction
I 38.–39. Planning Heuristics: Landmarks I 38. Landmarks
I 39. Landmark Heuristics
Formalism and Example
I As in the previous chapter, we consider delete-free planning tasks in normal form.
I We continue with the example from the previous chapter:
Example actions:
I a
1= i − →
3x , y I a
2= i − →
4x , z I a
3= i − →
5y , z I a
4= x , y , z − →
0g
landmark examples:
I A = {a
4} (cost = 0)
I B = {a
1, a
2} (cost = 3)
I C = {a
1, a
3} (cost = 3)
I D = {a
2, a
3} (cost = 4)
39. Automated Planning: Landmark Heuristics Finding Landmarks
39.1 Finding Landmarks
M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 5 / 23
39. Automated Planning: Landmark Heuristics Finding Landmarks
Justification Graphs
Definition (precondition choice function) A precondition choice function (pcf) P : A → V maps every action to one of its preconditions.
Definition (justification graph)
The justification graph for pcf P is a directed graph with labeled arcs.
I vertices: the variables V
I arcs: P (a) − → a e for every action a, every effect e ∈ add(a)
M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 6 / 23
39. Automated Planning: Landmark Heuristics Finding Landmarks
Example: Justification Graph
Example
pcf P: P (a 1 ) = P (a 2 ) = P(a 3 ) = i , P(a 4 ) = y
a 1 = i − →
3x , y a 2 = i − →
4x , z a 3 = i − →
5y , z a 4 = x , y , z − →
0g
i y
x
z
g a
1a
2a
1a
3a
2a
3a
439. Automated Planning: Landmark Heuristics Finding Landmarks
Cuts
Definition (cut)
A cut in a justification graph is a subset C of its arcs such that all paths from i to g contain an arc in C .
Proposition (cuts are landmarks)
Let C be a cut in a justification graph for an arbitrary pcf.
Then the arc labels for C form a landmark.
39. Automated Planning: Landmark Heuristics Finding Landmarks
Example: Cuts in Justification Graphs
Example
landmark A = {a 4 } (cost = 0)
a 1 = i − →
3x , y a 2 = i − →
4x , z a 3 = i − →
5y , z a 4 = x , y , z − →
0g
i y
x
z
g a
1a
2a
1a
3a
2a
3a
4M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 9 / 23
39. Automated Planning: Landmark Heuristics Finding Landmarks
Example: Cuts in Justification Graphs
Example
landmark B = {a 1 , a 2 } (cost = 3)
a 1 = i − →
3x , y a 2 = i − →
4x , z a 3 = i − →
5y , z a 4 = x , y , z − →
0g
i y
x
z
g a
1a
2a
1a
3a
2a
3a
4M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 10 / 23
39. Automated Planning: Landmark Heuristics Finding Landmarks
Example: Cuts in Justification Graphs
Example
landmark C = {a 1 , a 3 } (cost = 3)
a 1 = i − →
3x , y a 2 = i − →
4x , z a 3 = i − →
5y , z a 4 = x , y , z − →
0g
i y
x
z
g a
1a
2a
1a
3a
2a
3a
439. Automated Planning: Landmark Heuristics Finding Landmarks
Example: Cuts in Justification Graphs
Example
landmark D = {a 2 , a 3 } (cost = 4)
a 1 = i − →
3x , y a 2 = i − →
4x , z a 3 = i − →
5y , z a 4 = x , y , z − →
0g
i y
x
z
g a
1a
2a
1a
3a
2a
3a
439. Automated Planning: Landmark Heuristics Finding Landmarks
Power of Cuts in Justification Graphs
I Which landmarks can be computed with the cut method?
I all interesting ones!
Proposition (perfect hitting set heuristics)
Let L be the set of all “cut landmarks” of a given planning task.
Then h MHS (I ) = h + (I ) for L.
hitting set heuristic for L is perfect.
proof idea:
I Show 1:1 correspondence of hitting sets H for L and plans, i.e., each hitting set for L corresponds to a plan,
and vice versa.
M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 13 / 23
39. Automated Planning: Landmark Heuristics The LM-Cut Heuristic
39.2 The LM-Cut Heuristic
M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 14 / 23
39. Automated Planning: Landmark Heuristics The LM-Cut Heuristic
LM-Cut Heuristic: Motivation
I In general, there are exponentially many pcfs, hence computing all relevant landmarks is not tractable.
I The LM-cut heuristic is a method that chooses pcfs and computes cuts in a goal-oriented way.
I A cost partitioning is computed as a side effect and is usually not optimal.
I However, the cost partitioning can be computed efficiently and is optimal for planning tasks with uniform costs (i.e., cost(a) = 1 for all actions).
currently one of the best admissible planning heuristics
39. Automated Planning: Landmark Heuristics The LM-Cut Heuristic
LM-Cut Heuristic
h LM-cut : Helmert & Domshlak (2009) Initialize h LM-cut (I) := 0. Then iterate:
1
Compute h max values of the variables. Stop if h max (g ) = 0.
2
Compute justification graph G for a pcf
that chooses preconditions with maximal h max value.
(Requires a tie-breaking policy.)
3
Determine the goal zone V g of G that consists of all vertices that have a zero-cost path to g .
4
Compute the cut L that contains the labels of all arcs v − → a v 0 such that v ∈ / V g , v 0 ∈ V g and v can be reached from i without traversing a vertex in V g .
It is guaranteed that cost(L) > 0.
5
Increase h LM-cut (I ) by cost(L).
6
Decrease cost(a) by cost(L) for all a ∈ L.
39. Automated Planning: Landmark Heuristics The LM-Cut Heuristic
Example: Computation of LM-Cut
Example
round 1: P (a 4 ) = c L = {a 2 , a 3 } [4]
a 1 = i − →
3a, b a 2 = i − →
4a, c a 3 = i − →
5b, c a 4 = a, b, c − →
0g
i: 0 b: 3
a: 3
c: 4
g : 4 a
1a
2a
1a
3a
2a
3a
4M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 17 / 23
39. Automated Planning: Landmark Heuristics The LM-Cut Heuristic
Example: Computation of LM-Cut
Example
round 1: P(a 4 ) = c L = {a 2 , a 3 } [4] h LM-cut (I) := 4
a 1 = i − →
3a, b a 2 = i − →
0a, c a 3 = i − →
1b, c a 4 = a, b, c − →
0g
i : 0 b: 3
a: 3
c : 4
g : 4 a
1a
2a
1a
3a
2a
3a
4M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 18 / 23
39. Automated Planning: Landmark Heuristics The LM-Cut Heuristic
Example: Computation of LM-Cut
Example
round 2: P (a 4 ) = b L = {a 1 , a 3 } [1]
a 1 = i − →
3a, b a 2 = i − →
0a, c a 3 = i − →
1b, c a 4 = a, b, c − →
0g
i: 0 b: 1
a: 0
g : 1 a
1a
2a
1a
3a
2a
3a
439. Automated Planning: Landmark Heuristics The LM-Cut Heuristic
Example: Computation of LM-Cut
Example
round 2: P(a 4 ) = b L = {a 1 , a 3 } [1] h LM-cut (I ) := 4 + 1 = 5
a 1 = i − →
2a, b a 2 = i − →
0a, c a 3 = i − →
0b, c a 4 = a, b, c − →
0g
i : 0 b: 1
a: 0
g : 1 a
1a
2a
1a
3a
2a
3a
439. Automated Planning: Landmark Heuristics The LM-Cut Heuristic
Example: Computation of LM-Cut
Example
round 3: h max (g ) = 0 done! h LM-cut (I ) = 5
a 1 = i − →
2a, b a 2 = i − →
0a, c a 3 = i − →
0b, c a 4 = a, b, c − →
0g
i: 0 b: 0
a: 0
c: 0
g : 0 a
1a
2a
1a
3a
2a
3a
4M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 21 / 23
39. Automated Planning: Landmark Heuristics Summary
39.3 Summary
M. Helmert (University of Basel) Foundations of Artificial Intelligence May 10, 2021 22 / 23
39. Automated Planning: Landmark Heuristics Summary