• Keine Ergebnisse gefunden

E2. Landmarks: Cut Landmarks & LM-cut Heuristic

N/A
N/A
Protected

Academic year: 2022

Aktie "E2. Landmarks: Cut Landmarks & LM-cut Heuristic"

Copied!
8
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Planning and Optimization

E2. Landmarks: Cut Landmarks & LM-cut Heuristic

Gabriele R¨ oger and Thomas Keller

Universit¨ at Basel

November 12, 2018

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 1 / 32

Planning and Optimization

November 12, 2018 — E2. Landmarks: Cut Landmarks & LM-cut Heuristic

E2.1 i-g Form

E2.2 Cut Landmarks

E2.3 The LM-Cut Heuristic

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 2 / 32

Roadmap for this Chapter

I We first introduce a new normal form for delete-free STRIPS tasks that simplifies later definitions.

I We then present a method that computes disjunctive action landmarks for such tasks.

I We conclude with the LM-cut heuristic that builds on this method.

E2. Landmarks: Cut Landmarks & LM-cut Heuristic i-g Form

E2.1 i-g Form

(2)

Delete-Free STRIPS Planning Task in i-g Form (1)

In this chapter, we only consider delete-free STRIPS tasks in a special form:

Definition (i-g Form for Delete-free STRIPS)

A delete-free STRIPS planning task hV , I , O, γi is in i-g form if I V contains atoms i and g

I Initially exactly i is true: I (v ) = T iff v = i I g is the only goal atom: γ = g

I Every action has at least one precondition.

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 5 / 32

Transformation to i-g Form

Every delete-free STRIPS task Π = hV , I , O, γi can easily be transformed into an analogous task in i-g form.

I If i or g are in V already, rename them everywhere.

I Add i and g to V . I Add an operator hi, V

v∈V :I (v)=T v , 0i.

I Add an operator hγ, g , 0i.

I Replace all operator preconditions > with i . I Replace initial state and goal.

In what sense are the tasks “analogous”?

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 6 / 32

E2. Landmarks: Cut Landmarks & LM-cut Heuristic i-g Form

Delete-Free STRIPS Planning Task in i-g Form (2)

I In the following, we assume tasks in i-g form.

I Providing O suffices to describe the overall task:

I V are the variables mentioned in the operators in O.

I always exactly i true in I and γ = g I In the following, we only provide O for the

description of the task.

I Since we consider delete-free STRIPS tasks, pre(o) and eff(o) are conjunctions of atoms. In the following, we treat them as sets pre(o) and add(o) of atoms.

I We write operator o = hpre(o), add(o), cost(o)i as hpre(o) → add(o)i cost(o ) , omitting braces for sets.

E2. Landmarks: Cut Landmarks & LM-cut Heuristic i-g Form

Example: Delete-Free Planning Task in i-g Form

Example Operators:

I o 1 = hi → x , y i 3 I o 2 = hi → x , z i 4 I o 3 = hi → y , z i 5 I o 4 = hx , y , z → g i 0

optimal solution to reach g from i:

I plan: o 1 , o 2 , o 4

I cost: 3 + 4 + 0 = 7 (= h + (I ) because plan is optimal)

(3)

E2. Landmarks: Cut Landmarks & LM-cut Heuristic Cut Landmarks

E2.2 Cut Landmarks

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 9 / 32

E2. Landmarks: Cut Landmarks & LM-cut Heuristic Cut Landmarks

Content of this Course: Heuristics

Heuristics

Delete Relaxation

Abstraction

Landmarks

Action Landmarks

MHS Heuristic Uniform

Cost Partitioning Cut Landmarks

LM-Cut Heuristic Network Flows

Potential Heuristics Cost Partitioning

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 10 / 32

E2. Landmarks: Cut Landmarks & LM-cut Heuristic Cut Landmarks

Justification Graphs

Definition (Precondition Choice Function)

A precondition choice function (pcf) P : O → V for a delete-free STRIPS task Π = hV , I, O, γi in i-g form maps each operator to one of its preconditions (i.e. P (o) ∈ pre(o ) for all o ∈ O).

Definition (Justification Graphs)

Let P be a pcf for hV , I , O, γi in i-g form. The justification graph for P is the directed, edge-labeled graph J = hV , Ei, where

I the vertices are the variables from V , and

I E contains an edge P(o) − → o a for each o ∈ O, a ∈ add(o).

E2. Landmarks: Cut Landmarks & LM-cut Heuristic Cut Landmarks

Example: Justification Graph

Example

pcf P : P(o 1 ) = P(o 2 ) = P(o 3 ) = i, P (o 4 ) = y

o 1 = hi → x , y i 3 o 2 = hi → x , z i 4 o 3 = hi → y , z i 5 o 4 = hx , y , z → gi 0

i y

x

z

g o

1

o

2

o

1

o

3

o

2

o

3

o

4

(4)

Cuts

Definition (Cut)

A cut in a justification graph is a subset C of its edges such that all paths from i to g contain an edge from C .

i y

x

z

g o

1

o

2

o

1

o

3

o

2

o

3

o

4

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 13 / 32

Cuts are Disjunctive Action Landmarks

Theorem (Cuts are Disjunctive Action Landmarks) Let P be a pcf for hV , I, O , γi (in i-g form) and C be a cut in the justification graph for P.

The set of edge labels from C (formally {o | hv , o, v 0 i ∈ C }) is a disjunctive action landmark for I .

Proof idea:

I The justification graph corresponds to a simpler problem where some preconditions (those not picked by the pcf) are ignored.

I Cuts are landmarks for this simplified problem.

I Hence they are also landmarks for the original problem.

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 14 / 32

E2. Landmarks: Cut Landmarks & LM-cut Heuristic Cut Landmarks

Example: Cuts in Justification Graphs

Example

landmark A = {o 4 } (cost = 0)

o 1 = hi → x , y i 3 o 2 = hi → x , z i 4 o 3 = hi → y , zi 5 o 4 = hx, y , z → g i 0

i y

x

z

g o

1

o

2

o

1

o

3

o

2

o

3

o

4

E2. Landmarks: Cut Landmarks & LM-cut Heuristic Cut Landmarks

Example: Cuts in Justification Graphs

Example

landmark B = {o 1 , o 2 } (cost = 3)

o 1 = hi → x , y i 3 o 2 = hi → x , zi 4 o 3 = hi → y , zi 5 o 4 = hx , y , z → g i 0

i y

x

z

g o

1

o

2

o

1

o

3

o

2

o

3

o

4

(5)

E2. Landmarks: Cut Landmarks & LM-cut Heuristic Cut Landmarks

Example: Cuts in Justification Graphs

Example

landmark C = {o 1 , o 3 } (cost = 3)

o 1 = hi → x , y i 3 o 2 = hi → x , z i 4 o 3 = hi → y , zi 5 o 4 = hx, y , z → g i 0

i y

x

z

g o

1

o

2

o

1

o

3

o

2

o

3

o

4

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 17 / 32

E2. Landmarks: Cut Landmarks & LM-cut Heuristic Cut Landmarks

Example: Cuts in Justification Graphs

Example

landmark D = {o 2 , o 3 } (cost = 4)

o 1 = hi → x , y i 3 o 2 = hi → x , zi 4 o 3 = hi → y , zi 5 o 4 = hx , y , z → g i 0

i y

x

z

g o

1

o

2

o

1

o

3

o

2

o

3

o

4

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 18 / 32

E2. Landmarks: Cut Landmarks & LM-cut Heuristic Cut 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 with initial state I . Then h MHS (L) = h + (I ).

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.

E2. Landmarks: Cut Landmarks & LM-cut Heuristic The LM-Cut Heuristic

E2.3 The LM-Cut Heuristic

(6)

Content of this Course: Heuristics

Heuristics

Delete Relaxation

Abstraction

Landmarks

Action Landmarks

MHS Heuristic Uniform

Cost Partitioning Cut Landmarks

LM-Cut Heuristic Network Flows

Potential Heuristics Cost Partitioning

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 21 / 32

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 As a side effect, it computes a (non-uniform) cost partitioning.

currently one of the best admissible planning heuristic

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 22 / 32

E2. Landmarks: Cut Landmarks & LM-cut Heuristic The LM-Cut Heuristic

LM-Cut Heuristic (1)

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

Let P be a pcf that chooses preconditions with maximal h max value.

3

Compute the justification graph for P .

4

Compute a cut which guarantees cost(L) > 0 for the corresponding landmark L (next slide).

5

Increase h LM-cut (I) by cost(L).

6

Decrease cost(o) by cost(L) for all o ∈ L.

E2. Landmarks: Cut Landmarks & LM-cut Heuristic The LM-Cut Heuristic

LM-Cut Heuristic (2)

h LM-cut : Helmert & Domshlak (2009)

4

Compute a cut which guarantees cost(L) > 0 for the corresponding landmark L as follows:

I The goal zone V

g

of the justification graph consists of all nodes that have a path to g where all edges are labelled with zero-cost operators.

I The cut contains all edges hv, o, v

0

i such that v 6∈ V

g

, v

0

∈ V

g

and v can be reached from i without traversing a node in V

g

.

(7)

E2. Landmarks: Cut Landmarks & LM-cut Heuristic The LM-Cut Heuristic

Example: Computation of LM-Cut

Example

round 1: P (o 4 ) = c L = {o 2 , o 3 } [4]

o 1 = hi → a, bi 3 o 2 = hi → a, c i 4 o 3 = hi → b, c i 5 o 4 = ha, b, c → g i 0

i: 0 b: 3

a: 3

c: 4

g: 4

o1

o2

o1

o3

o2 o3

o4

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 25 / 32

E2. Landmarks: Cut Landmarks & LM-cut Heuristic The LM-Cut Heuristic

Example: Computation of LM-Cut

Example

round 1: P(o 4 ) = c L = {o 2 , o 3 } [4] h LM-cut (I) := 4

o 1 = hi → a, bi 3 o 2 = hi → a, ci 0 o 3 = hi → b, ci 1 o 4 = ha, b, c → g i 0

i: 0 b: 3

a: 3

c: 4

g: 4

o1

o2

o1

o3

o2

o3 o4

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 26 / 32

E2. Landmarks: Cut Landmarks & LM-cut Heuristic The LM-Cut Heuristic

Example: Computation of LM-Cut

Example

round 2: P (o 4 ) = b L = {o 1 , o 3 } [1]

o 1 = hi → a, bi 3 o 2 = hi → a, c i 0 o 3 = hi → b, c i 1 o 4 = ha, b, c → g i 0

i: 0 b: 1

a: 0

c: 0

g: 1

o1

o2

o1

o3

o2 o3

o4

E2. Landmarks: Cut Landmarks & LM-cut Heuristic The LM-Cut Heuristic

Example: Computation of LM-Cut

Example

round 2: P(o 4 ) = b L = {o 1 , o 3 } [1] h LM-cut (I ) := 4 + 1 = 5

o 1 = hi → a, bi 2 o 2 = hi → a, ci 0 o 3 = hi → b, ci 0 o 4 = ha, b, c → g i 0

i: 0 b: 1

a: 0

c: 0

g: 1

o1

o2

o1

o3

o2 o3

o4

(8)

Example: Computation of LM-Cut

Example

round 3: h max (g ) = 0 done! h LM-cut (I ) = 5

o 1 = hi → a, bi 2 o 2 = hi → a, c i 0 o 3 = hi → b, c i 0 o 4 = ha, b, c → g i 0

i: 0 b: 0

a: 0

c: 0

g: 0

o1

o2

o1

o3

o2 o3

o4

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 29 / 32

Properties of LM-Cut Heuristic

Theorem

Let hV , I , O, G i be a delete-free STRIPS task in i-g normal form.

The LM-cut heuristic is admissible: h LM-cut (I ) ≤ h (I).

(Proof omitted.)

If Π is not delete-free, we can compute h LM-cut on Π + . Then h LM-cut is bound by h + .

G. R¨oger, T. Keller (Universit¨at Basel) Planning and Optimization November 12, 2018 30 / 32

E2. Landmarks: Cut Landmarks & LM-cut Heuristic Summary & Outlook

Summary

I Cuts in justification graphs are a general method to find disjunctive action landmarks.

I Hitting sets over all cut landmarks yield a perfect heuristic for delete-free planning tasks.

I The LM-cut heuristic is an admissible heuristic based on these ideas.

E2. Landmarks: Cut Landmarks & LM-cut Heuristic Summary & Outlook

Outlook

I We have only considered (disjunctive) action landmarks, not atom or formula landmarks.

I There are other landmark generation methods, e.g. based on a version of relaxed task graphs.

I The LM-cut heuristic extracts the landmarks for each state.

I Other methods extract landmarks once,

propagating them over the course of the search.

I Such methods are usually enhanced with orderings (e.g. stating that some landmark must be achieved before some other landmark).

I The (inadmissible) LM-Count heuristic counts the number of

formula landmarks that still need to be achieved.

Referenzen

ÄHNLICHE DOKUMENTE

Good expository introductions to and detailed motivations of an approach to common knowledge in the context of multi-modal propositional logics are presented, for example, in

Hitting sets over all cut landmarks yield a perfect heuristic for delete-free planning tasks. The LM-cut heuristic is an admissible heuristic based on

I Hitting sets over all cut landmarks yield a perfect heuristic for delete-free planning tasks. I The LM-cut heuristic is an admissible heuristic based on

I Relaxed task graphs allows efficient computation of landmarks I Hitting sets yield the most accurate heuristic for a given set of. disjunctive

some operator must be applied (action landmark) some atomic proposition must hold (fact landmark) some formula must be true (formula landmark).. → Derive heuristic estimate from

I The minimum hitting set over all cut landmarks is a perfect heuristic for delete-free planning tasks. I The LM-cut heuristic is an admissible heuristic based on

The minimum hitting set over all cut landmarks is a perfect heuristic for delete-free planning tasks. The LM-cut heuristic is an admissible heuristic based on

Theorem (Uniform Cost Partitioning Heuristic is Admissible) Let L be a set of disjunctive action landmarks for state s of Π. Then h UCP (L) is an admissible heuristic estimate