• Keine Ergebnisse gefunden

Planning and Optimization C5. Delete Relaxation:

N/A
N/A
Protected

Academic year: 2022

Aktie "Planning and Optimization C5. Delete Relaxation:"

Copied!
110
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Planning and Optimization

C5. Delete Relaxation: hmax andhadd

Gabriele R¨oger and Thomas Keller

Universit¨at Basel

October 24, 2018

(2)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Content of this Course

Planning

Classical

Tasks Progression/

Regression Complexity Heuristics

Probabilistic

MDPs Uninformed Search

Heuristic Search Monte-Carlo

Methods

(3)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Content of this Course: Heuristics

Heuristics

Delete Relaxation Relaxed Tasks Relaxed Task Graphs

Relaxation Heuristics Abstraction

Landmarks Potential Heuristics Cost Partitioning

(4)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Introduction

(5)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Delete Relaxation Heuristics

In this chapter, we introduceheuristics based on delete relaxation.

Their basic idea is to propagate information

in relaxed task graphs, similar to the previous chapter.

Unlike the previous chapter, we do not just propagate information aboutwhether a given node is reachable, but estimates how expensiveit is to reach the node.

(6)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reminder: Running Example

We will use the same running example as in the previous chapter:

Π =hV,I,{o1,o2,o3,o4}, γi with V ={a,b,c,d,e,f,g,h}

I ={a7→T,b7→T,c 7→F,d 7→T, e 7→F,f 7→F,g 7→F,h7→F}

o1 =hc ∨(a∧b),c ∧((c∧d)Be),1i o2 =h>,f,2i

o3 =hf,g,1i o4 =hf,h,1i

γ =e∧(g∧h)

(7)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Algorithm for Reachability Analysis (Reminder)

reachability analysis in RTGs = computing all forced true nodes = computing the most conservative assignment Here is an algorithm that achieves this:

Reachability Analysis

Associate areachableattribute with each node.

for allnodes n:

n.reachable:=false whileno fixed point is reached:

Choose a node n.

if n is an AND node:

n.reachable:=V

n0∈succ(n)n0.reachable if n is an OR node:

n.reachable:=W

n0∈succ(n)n0.reachable

(8)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

a

F T

b

F T

c

F T

d

F T

e

F T

f

F T

g

F T

h

F T

I

F T F

T

F

T FT

o1,>

F T

o1,cd

F T

F T

o2,>

F T

o3,>

F T

o4,>

F T

F T

γ

F T

(9)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

a

F

T b

F

T c

F

T d

F

T e

F

T f

F

T g

F

T h

F

T

I

F

T

F

T

F

T

F

T o1,>

F

T o1,cd

F

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(10)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

a

F

T b

F

T c

F

T d

F

T e

F

T f

F

T g

F

T h

F

T

I F

T F

T

F

T

F

T o1,>

F

T o1,cd

F

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(11)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b

F

T c

F

T d

F

T e

F

T f

F

T g

F

T h

F

T

I F

T F

T

F

T

F

T o1,>

F

T o1,cd

F

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(12)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

c

F

T d

F

T e

F

T f

F

T g

F

T h

F

T

I F

T F

T

F

T

F

T o1,>

F

T o1,cd

F

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(13)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

c

F

T dF

T

e

F

T f

F

T g

F

T h

F

T

I F

T F

T

F

T

F

T o1,>

F

T o1,cd

F

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(14)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

c

F

T dF

T

e

F

T f

F

T g

F

T h

F

T

I F

T

F

T

F

T

F

T o1,>

F

T o1,cd

F

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(15)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

c

F

T dF

T

e

F

T f

F

T g

F

T h

F

T

I F

T

F

T

F

T F

T o1,>

F

T o1,cd

F

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(16)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

c

F

T dF

T

e

F

T f

F

T g

F

T h

F

T

I F

T

F

T

F

T F

T o1,F>

T

o1,cd

F

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(17)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

e

F

T f

F

T g

F

T h

F

T

I F

T

F

T

F

T F

T o1,F>

T

o1,cd

F

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(18)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

e

F

T f

F

T g

F

T h

F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cd

F

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(19)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

e

F

T f

F

T g

F

T h

F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cFd

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(20)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

eF

T

f

F

T g

F

T h

F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cFd

T

F

T o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(21)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

eF

T

f

F

T g

F

T h

F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cFd

T

F

T

o2,>

F

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(22)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

eF

T

f

F

T g

F

T h

F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cFd

T

F

T

o2F,>

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(23)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

eF

T

f F

T

g

F

T h

F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cFd

T

F

T

o2F,>

T

o3,>

F

T o4,>

F

T

F

T

γ

F

T

(24)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

eF

T

f F

T

g

F

T h

F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cFd

T

F

T

o2F,>

T

o3F,>

T

o4,>

F

T

F

T

γ

F

T

(25)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

eF

T

f F

T

gF

T

h

F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cFd

T

F

T

o2F,>

T

o3F,>

T

o4,>

F

T

F

T

γ

F

T

(26)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

eF

T

f F

T

gF

T

h

F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cFd

T

F

T

o2F,>

T

o3F,>

T

o4,F>

T

F

T

γ

F

T

(27)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

eF

T

f F

T

gF

T

h F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cFd

T

F

T

o2F,>

T

o3F,>

T

o4,F>

T

F

T

γ

F

T

(28)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

eF

T

f F

T

gF

T

h F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cFd

T

F

T

o2F,>

T

o3F,>

T

o4,F>

T

F

T

γ

F

T

(29)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Reachability Analysis: Example (Reminder)

aF

T

b F

T

Fc

T

d F

T

eF

T

f F

T

gF

T

h F

T

I F

T

F

T

F

T

F

T

o1,F>

T

o1,cFd

T

F

T

o2F,>

T

o3F,>

T

o4,F>

T

F

T

γF

T

(30)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h max and h add

(31)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

Associating Costs with RTG Nodes

Basic intuitions for associatingcostswith RTG nodes:

To apply an operator, we must pay itscost.

To make an OR nodetrue, it is sufficient to make oneof its successors true.

Therefore, we estimate the cost of an OR node as theminimumof the costs of its successors.

To make an AND nodetrue,allits successors must be made true first.

We can beoptimisticand estimate the cost as themaximumof the successor node costs.

Or we can bepessimisticand estimate the cost as thesumof the successor node costs.

We will prove later that this is indeed optimistic/pessimistic.

(32)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

Algorithm

(Differences to reachability analysis algorithm highlighted.) Computinghmax Values

Associate acostattribute with each node.

for allnodes n:

n.cost:=∞

whileno fixed point is reached:

Choose a node n.

if n is an AND nodethat is not an effect node:

n.cost:=maxn0∈succ(n)n0.cost if n is aneffect node for operator o:

n.cost:=cost(o) + maxn0∈succ(n)n0.cost if n is an OR node:

n.cost:=minn0∈succ(n)n0.cost

The overall heuristic value is the cost of thegoal node,nγ.cost.

(33)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

: Example

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

hmax(I) = 3

(34)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

: Example

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

hmax(I) = 3

(35)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

: Example

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

hmax(I) = 3

(36)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

: Example

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

hmax(I) = 3

(37)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

: Example

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

hmax(I) = 3

(38)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

: Example

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

hmax(I) = 3

(39)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

: Example

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

hmax(I) = 3

(40)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

: Example

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

hmax(I) = 3

(41)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

: Example

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

hmax(I) = 3

(42)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

: Example

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

hmax(I) = 3

(43)

Introduction hmaxandhadd Properties ofhmaxandhadd Summary

h

max

: Example

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

hmax(I) = 3

Referenzen

ÄHNLICHE DOKUMENTE

C3.1 Optimal Relaxed Plans C3.2 AND/OR Graphs C3.3 Forced Nodes?. C3.4 Most/Least Conservative Valuations

Therefore, we estimate the cost of an OR node as the minimum of the costs of its successors.. I To make an AND node true, all its successors must be made

According to hypothesis (i) above, FVD application should be least likely across a syntactic clause boundary, and most likely within a syntactic XP. For some target items, the

Freedom House rankings denote that an increase in democracy (compared with no change) is significantly more likely where a UN peacebuilding mission is deployed.. As shown in model

As a result, the water salinity in the Large Aral has grown by a factor of 7 reaching over 80 ppt in the Western basin and 100 ppt in the Eastern basin.... Summary

As a result, the water salinity in the Large Aral has grown by a factor of 7 reaching over 80 ppt in the Western basin and 100 ppt in the Eastern basin.. Summary

Wach, Wymiary europeizacja i jej kontekst [The Dimensions of Europeanisation and Its Context], „Zeszyty Naukowe Uniwersytetu Ekonomicznego w Krakowie”, 2011, nr 852 (seria „Prace

I saw this possibility already in 1977 when I wrote a contribution to the political and ethnic geography of North Pakistan, but I was well aware that the