• Keine Ergebnisse gefunden

Planning and Optimization C6. Delete Relaxation: Best Achievers and

N/A
N/A
Protected

Academic year: 2022

Aktie "Planning and Optimization C6. Delete Relaxation: Best Achievers and"

Copied!
41
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Planning and Optimization

C6. Delete Relaxation: Best Achievers and hFF

Gabriele R¨oger and Thomas Keller

Universit¨at Basel

October 24, 2018

(2)

Content of this Course

Planning

Classical

Tasks Progression/

Regression Complexity Heuristics

Probabilistic

MDPs Uninformed Search

Heuristic Search Monte-Carlo

Methods

(3)

Content of this Course: Heuristics

Heuristics

Delete Relaxation Relaxed Tasks Relaxed Task Graphs

Relaxation Heuristics Abstraction

Landmarks Potential Heuristics Cost Partitioning

(4)

Choice Functions

(5)

Motivation

In this chapter, we analyze the behaviour of hmax andhadd more deeply.

Our goal is to understand their shortcomings and use this understanding to devise an improved heuristic.

As a preparation for our analysis, we need some further definitions that concern choicesin AND/OR graphs.

The key observation is that if we want to establish the value of a certain node n, we can to some extentchoose how we want to achieve the OR nodes that are relevant to achieving n.

(6)

Preview: Choice Function & Best Achievers

Preserve at most one outgoing arc of each OR node but node values may not change.

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ: 8

(precondition ofo1modified to c(ab))

(7)

Preview: Choice Function & Best Achievers

Preserve at most one outgoing arc of each OR node but node values may not change.

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ: 8

(precondition ofo1modified to c(ab))

(8)

Choice Functions

Definition (Choice Function)

LetG be an AND/OR graph with nodes N and OR nodes NOR. Achoice function for G is a functionf :N0 →N defined on some setN0⊆NOR such thatf(n)∈succ(n) for all n∈N0.

In words, choice functions select (at most) one successor for each OR node of G.

Intuitively,f(n) selects by which disjunct n is achieved.

Iff(n) is undefined for a givenn, the intuition is that n is not achieved.

(9)

Reduced Graphs

Once we have decided how to achieve an OR node, we can remove the other alternatives:

Definition (Reduced Graph)

LetG be an AND/OR graph, and let f be a choice function forG defined on nodesN0.

Thereduced graphfor f is the subgraph ofG where all outgoing arcs of OR nodes are removed except for the chosen arcshn,f(n)i with n∈N0.

(10)

Best Achievers

(11)

Choice Functions Induced by h

max

and h

add

Which choices dohmax andhadd make?

At every OR node n, we set the cost ofn

to the minimumof the costs of the successors of n.

The motivation for this is to achieve n via the successor that can be achieved most cheaply according to our cost estimates.

This corresponds to defining a choice function f

with f(n)∈arg minn0∈N0n0.costfor all reached OR nodesn, whereN0 ⊆succ(n) are all successors ofn processed before n.

The successors chosen by this cost function are called best achievers (according tohmax or hadd).

Note that the best achiever function f is in general not well-defined because there can be multiple minimizers.

We assume that ties are broken arbitrarily.

(12)

Example: Best Achievers (1)

best achievers forhadd

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ: 8

(13)

Example: Best Achievers (1)

best achievers forhadd

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ: 8

(14)

Example: Best Achievers (2)

best achievers forhadd; modified goale∨(g ∧h)

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ:2

(15)

Example: Best Achievers (2)

best achievers forhadd; modified goale∨(g ∧h)

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ:2

(16)

Best Achiever Graphs

Observation: Thehmax/hadd costs of nodes remain the same if we replace the RTG by the reduced graph for the respective best achiever function.

The AND/OR graph that is obtained by removing all nodes with infinite cost from this reduced graph is called the best achiever graph forhmax/hadd.

We writeGmax andGadd for the best achiever graphs.

Gmax (Gadd) is alwaysacyclic: for all arcs hn,n0i it contains, n is processed by hmax (byhadd) after n0.

(17)

Paths in Best Achiever Graphs

Letn be a node of the best achiever graph.

LetNeff be the set of effect nodes of the best achiever graph.

Thecostof aneffect nodeis the cost of the associated operator.

Thecostof a pathin the best achiever graph is the sum of costs of alleffect nodes on the path.

The following properties can be shown by induction:

hmax(n) is themaximum costof all paths originating fromn in Gmax. A path achieving this maximum is called acritical path.

hadd(n) is the sum, over all effect nodes n0, of the cost ofn0 multiplied by the number of pathsfromn ton0 inGadd. In particular, these properties hold for the goal nodenγ if it is reachable.

(18)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Example: Undercounting in h

max

Gmax: undercounting inhmax

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

3

γ: 3

(19)

Example: Undercounting in h

max

Gmax: undercounting inhmax

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

3

γ: 3

o1 ando4 not counted because they are off the critical path

(20)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Example: Overcounting in h

add

Gadd: overcounting inhadd

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ: 8

(21)

Example: Overcounting in h

add

Gadd: overcounting inhadd

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ: 8

o2 counted twice because there are two paths tono>2

(22)

Example: Overcounting in h

add

Gadd: overcounting inhadd

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ: 8

o2 counted twice because there are two paths tono>2

(23)

The FF Heuristic

(24)

Inaccuracies in h

max

and h

add

hmax is often inaccurate because it undercounts:

the heuristic estimate only reflects the cost of a critical path, which is often only a small fraction of the overall plan.

hadd is often inaccurate because it overcounts:

if the same subproblem is reached in many ways, it will be counted many times although it only needs to be solved once.

(25)

The FF Heuristic

Fortunately, with the perspective of best achiever graphs, there is a simple solution: count all effect nodes thathadd would count, but only count each of them once.

Definition (FF Heuristic)

Let Π =hV,I,O, γibe a propositional planning task

in positive normal form. TheFF heuristic for a state s of Π, writtenhFF(s), is computed as follows:

Construct the RTG for the task hV,s,O+, γi.

Construct the best achiever graph Gadd. Compute the set of effect nodes{nχo11, . . . ,noχkk} reachable from nγ in Gadd.

Return hFF(s) =Pk

i=1cost(oi).

Note: hFF isnotwell-defined; different tie-breaking policies for best achievers can lead to different heuristic values

(26)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Example: FF Heuristic (1)

FF heuristic computation

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

o2,>: 2

+2

o3,>: 3

o3,>: 3

+1

o4,>: 3

o4,>: 3

+1

6

γ: 8

Construct RTG.

(27)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Example: FF Heuristic (1)

FF heuristic computation

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

o2,>: 2

+2

o3,>: 3

o3,>: 3

+1

o4,>: 3

o4,>: 3

+1

6

γ: 8

Construct best achiever graph Gadd.

(28)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Example: FF Heuristic (1)

FF heuristic computation

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0

o2,>: 2

o2,>: 2 +2

o3,>: 3

o3,>: 3 +1

o4,>: 3

o4,>: 3 +1

6

γ: 8

Compute effect nodes reachable from goal node.

(29)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Example: FF Heuristic (1)

FF heuristic computation

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0

o2,>: 2

o2,>: 2 +2

o3,>: 3

o3,>: 3 +1

o4,>: 3

o4,>: 3 +1

6

γ: 8

hFF(s) = 1 + 1 + 2 + 1 + 1 = 6

(30)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Example: FF Heuristic (2)

FF heuristic computation; modified goal e∨(g∧h)

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ:2

Construct RTG.

(31)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Example: FF Heuristic (2)

FF heuristic computation; modified goal e∨(g∧h)

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ:2

Construct best achiever graph Gadd.

(32)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Example: FF Heuristic (2)

FF heuristic computation; modified goal e∨(g∧h)

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ:2

Compute effect nodes reachable from goal node.

(33)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Example: FF Heuristic (2)

FF heuristic computation; modified goal e∨(g∧h)

a: 0 b: 0 c: 1 d: 0 e: 2 f: 2 g: 3 h: 3

I: 0 0

0 1

o1,>: 1 o1,cd: 2

+1 +1

0 o2,>: 2

+2

o3,>: 3 +1

o4,>: 3 +1

6

γ:2

hFF(s) = 1 + 1 = 2

(34)

h max vs. h add vs. h FF vs. h +

(35)

Optimal Delete Relaxation Heuristic

Definition (h+ Heuristic)

Let Π be a propositional planning task in positive normal form, and lets be a state of Π.

Theoptimal delete relaxation heuristic fors, written h+(s), is defined as the perfect heuristich(s) of states

in the delete-relaxed task Π+.

Reminder: We proved thath(s) is hard to compute.

(BCPlanExis NP-complete for delete-relaxed tasks.) The optimal delete relaxation heuristic is often used as a reference point for comparison.

(36)

Relationships between Delete Relaxation Heuristics (1)

Theorem

LetΠbe a propositional planning task in positive normal form, and let s be a state ofΠ.

Then:

1 hmax(s)≤h+(s)≤hFF(s)≤hadd(s)

2 hmax(s) =∞ iff h+(s) =∞ iff hFF(s) =∞ iff hadd(s) =∞

3 hmax and h+ are admissible and consistent.

4 hFF and hadd are neither admissible nor consistent.

5 All four heuristics are safe and goal-aware.

(37)

Relationships between Delete Relaxation Heuristics (2)

Proof Sketch.

for 1:

To show hmax(s)≤h+(s), show that critical path costs can be defined for arbitrary relaxed plans and that the critical path cost of a plan is never larger than the cost of the plan.

Then show that hmax(s) computes the minimal critical path cost over all delete-relaxed plans.

To show h+(s)≤hFF(s), prove that the operators belonging to the effect nodes counted by hFF form a relaxed plan.

No relaxed plan is cheaper than h+ by definition ofh+. hFF(s)≤hadd(s) is obvious from the description ofhFF: both heuristics count the same operators,

but hadd may count some of them multiple times.

. . .

(38)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Relationships between Delete Relaxation Heuristics (3)

Proof Sketch (continued).

for 2: all heuristics are infinite iff the task has no relaxed solution for 3: follows from hmax(s)≤h+(s)

because we already know that h+ is admissible for 4: construct a counterexample to admissibility for hFF for 5: goal-awareness is easy to show; safety follows from 2.+3.

(39)

Summary

(40)

Summary

hmax andhadd can be used to decidehow to achieve OR nodes in a relaxed task graph best achievers

Best achiever graphs help identify shortcomings of hmax and hadd compared to the perfect delete relaxation heuristic h+.

hmax underestimatesh+because it only considers the cost of acritical pathfor the relaxed planning task.

hadd overestimatesh+because it double-counts operators occurring onmultiple pathsin the best achiever graph.

The FF heuristicrepairs this flaw of hadd and therefore approximates h+ more closely.

In general,hmax(s)≤h+(s)≤hFF(s)≤hadd(s).

hmax andh+ are admissible;hFF andhadd are not.

(41)

Choice Functions Best Achievers The FF Heuristic hmaxvs.haddvs.hFFvs.h+ Summary

Literature Pointers

(Some) delete-relaxation heuristics in the planning literature:

additive heuristic hadd (Bonet, Loerincs & Geffner, 1997) maximum heuristic hmax (Bonet & Geffner, 1999) (original) FF heuristic (Hoffmann & Nebel, 2001) cost-sharing heuristic hcs (Mirkis & Domshlak, 2007) set-additive heuristics hsa (Keyder & Geffner, 2008) FF/additive heuristichFF (Keyder & Geffner, 2008) local Steiner tree heuristichlst (Keyder & Geffner, 2008) also hybrids such as semi-relaxedheuristics

and delete-relaxation landmarkheuristics

Referenzen

ÄHNLICHE DOKUMENTE

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

Since change is non-trivial, we focus on A ∗ variant now and generalize later to acyclic probabilistic tasks (AO ∗ ) and probabilistic tasks in general (LAO ∗ ).. Heuristic

From plans to acyclic policies, we only changed backup procedure from backward induction to Bellman backups When solutions may be cyclic, we cannot perform updates in reverse

[r]

Die Auswirkungen des Klimawandels auf die zukünftige Schneedeckendauer und -ausdehnung wurde im Rahmen des ACRP-Projekts CC-Snow (CC-Snow, 2013 a, b) exemplarisch für die

67>()?@(GEE$'20.=(@GH+ Beispiele von wichtigen Krankheiten an Waldbäumen, die von eingeschleppten oder möglicherweise einge- schleppten pathogenen Pilzen in Österreich

Da es derzeit keine gesicherten Aussagen über eine Zunahme von Starkregenereignissen gibt (vgl. BMLFUW, 2011), kann auch keine Aussage über eine eventuelle Zunahme

[r]