• Keine Ergebnisse gefunden

Foundations of Artificial Intelligence 36. Automated Planning: Delete Relaxation Heuristics Malte Helmert

N/A
N/A
Protected

Academic year: 2022

Aktie "Foundations of Artificial Intelligence 36. Automated Planning: Delete Relaxation Heuristics Malte Helmert"

Copied!
75
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Foundations of Artificial Intelligence

36. Automated Planning: Delete Relaxation Heuristics

Malte Helmert

University of Basel

May 5, 2021

(2)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Automated Planning: Overview

Chapter overview: automated planning 33. Introduction

34. Planning Formalisms

35.–36. Planning Heuristics: Delete Relaxation 35. Delete Relaxation

36. Delete Relaxation Heuristics 37. Planning Heuristics: Abstraction 38.–39. Planning Heuristics: Landmarks

(3)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Relaxed Planning Graphs

(4)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Relaxed Planning Graphs

relaxed planning graphs: representwhich variables in Π+ can be reached and how

graphs withvariable layers Vi andaction layersAi

variable layerV0 contains thevariable vertexv0 for allvI action layerAi+1 contains theaction vertexai+1 for actiona ifVi contains the vertexvi for allvpre(a)

variable layerVi+1 contains the variable vertexvi+1 if previous variable layer containsvi,

or previous action layer containsai+1 withv add(a) German: relaxierter Planungsgraph, Variablenknoten, Aktionsknoten

(5)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Relaxed Planning Graphs (Continued)

goal verticesGi ifvi ∈Vi for all v ∈G

graph can be constructed for arbitrary many layers but stabilizes after a bounded number of layers

Vi+1=Vi andAi+1=Ai (Why?) directed edges:

fromvi toai+1 ifvpre(a) (precondition edges) fromai tovi if vadd(a) (effect edges)

fromvi toGi ifv G (goal edges) fromvi tovi+1 (no-op edges)

German: Zielknoten, Vorbedingungskanten, Effektkanten, Zielkanten, No-Op-Kanten

(6)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example

We will write actionsa with pre(a) ={p1, . . . ,pk}, add(a) ={a1, . . . ,al},del(a) =∅andcost(a) =c asp1, . . . ,pk −→c a1, . . . ,al

V ={a,b,c,d,e,f,g,h}

I ={a}

G ={c,d,e,f,g}

A={a1,a2,a3,a4,a5,a6} a1 =a−→3 b,c

a2 =a,c −→1 d a3 =b,c −→1 e a4 =b −→1 f a5 =d −→1 e,f a6 =d −→1 g

(7)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: Relaxed Planning Graph

a0 b0 c0 d0 e0 f0 g0 h0

(8)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: Relaxed Planning Graph

a0 b0 c0 d0 e0 f0 g0 h0

a1

(9)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: Relaxed Planning Graph

a0 b0 c0 d0 e0 f0 g0 h0

a1

a1 b1 c1 d1 e1 f1 g1 h1

(10)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: Relaxed Planning Graph

a0 b0 c0 d0 e0 f0 g0 h0

a1

a1 b1 c1 d1 e1 f1 g1 h1

a1 a2 a3

a4

(11)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: Relaxed Planning Graph

a0 b0 c0 d0 e0 f0 g0 h0

a1

a1 b1 c1 d1 e1 f1 g1 h1

a1 a2 a3

a4

a2 b2 c2 d2 e2 f2 g2 h2

(12)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: Relaxed Planning Graph

a0 b0 c0 d0 e0 f0 g0 h0

a1

a1 b1 c1 d1 e1 f1 g1 h1

a1 a2 a3

a4

a2 b2 c2 d2 e2 f2 g2 h2

a1 a2 a3

a4

a5

a6

(13)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: Relaxed Planning Graph

a0 b0 c0 d0 e0 f0 g0 h0

a1

a1 b1 c1 d1 e1 f1 g1 h1

a1 a2 a3

a4

a2 b2 c2 d2 e2 f2 g2 h2

a1 a2 a3

a4

a5

a6

a3 b3 c3 d3 e3 f3 g3 h3

(14)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: Relaxed Planning Graph

a0 b0 c0 d0 e0 f0 g0 h0

a1

a1 b1 c1 d1 e1 f1 g1 h1

a1 a2 a3

a4

a2 b2 c2 d2 e2 f2 g2 h2

a1 a2 a3

a4

a5

a6

a3 b3 c3 d3 e3 f3 g3 h3 c3 d3 e3 f3 g3

(15)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: Relaxed Planning Graph

a0 b0 c0 d0 e0 f0 g0 h0

a1

a1 b1 c1 d1 e1 f1 g1 h1

a1 a2 a3

a4

a2 b2 c2 d2 e2 f2 g2 h2

a1 a2 a3

a4

a5

a6

a3 b3 c3 d3 e3 f3 g3 h3

G

(16)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Generic Relaxed Planning Graph Heuristic

Heuristic Values from Relaxed Planning Graph functiongeneric-rpg-heuristic(hV,I,G,Ai,s):

Π+:=hV,s,G,A+i for k ∈ {0,1,2, . . .}:

rpg:=RPGk+) [relaxed planning graph to layer k]

if rpg contains a goal node:

Annotate nodes ofrpg.

if termination criterion is true:

returnheuristic value from annotations else if graph has stabilized:

return∞

general templatefor RPG heuristics

to obtain concrete heuristic: instantiate highlighted elements

(17)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Concrete Examples for Generic RPG Heuristic

Many planning heuristics fit this general template.

In this course:

maximum heuristic hmax (Bonet & Geffner, 1999) additive heuristic hadd (Bonet, Loerincs & Geffner, 1997) Keyder & Geffner’s (2008) variant of the FF heuristic hFF (Hoffmann & Nebel, 2001)

German: Maximum-Heuristik, additive Heuristik, FF-Heuristik remark:

The most efficient implementations of these heuristics do not use explicit planning graphs,

but rather alternative (equivalent) definitions.

(18)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Maximum and Additive Heuristics

(19)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Maximum and Additive Heuristics

hmax andhadd are the simplest RPG heuristics.

Vertex annotations arenumerical values.

The vertex values estimate the costs to make a given variable true to reach and apply a given action to reach the goal

(20)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Maximum and Additive Heuristics: Filled-in Template

hmax andhadd

computation of annotations:

costs of variable vertices:

0 in layer 0;

otherwise minimumof the costs of predecessor vertices costs of action and goal vertices:

maximum(hmax) or sum(hadd) of predecessor vertex costs;

for action vertices ai, also addcost(a) termination criterion:

stability: terminate ifVi =Vi−1 and costs of all vertices in Vi equal corresponding vertex costs in Vi−1

heuristic value:

value of goal vertex in the last layer

(21)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Maximum and Additive Heuristics: Intuition

intuition:

variable vertices:

choosecheapestway of reaching the variable action/goal vertices:

hmax isoptimistic: assumption:

when reaching themost expensiveprecondition variable, we can reach the other precondition variables in parallel (hence maximization of costs)

hadd ispessimistic: assumption:

all precondition variables must be reached completely independently of each other (hence summation of costs)

(22)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

max

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G

hmax({a}) = 5

(23)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

max

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

hmax({a}) = 5

(24)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

max

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

hmax({a}) = 5

(25)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

max

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

hmax({a}) = 5

(26)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

max

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

3

hmax({a}) = 5

(27)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

max

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

3 4

hmax({a}) = 5

(28)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

max

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

3 4 4 4

hmax({a}) = 5

(29)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

max

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

3 4 4 4

0 3 3 4 4 4

hmax({a}) = 5

(30)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

max

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

3 4 4 4

0 3 3 4 4 4

3 4 4 4 5 5

hmax({a}) = 5

(31)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

max

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

3 4 4 4

0 3 3 4 4 4

3 4 4 4 5 5

0 3 3 4 4 4 5

hmax({a}) = 5

(32)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

max

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

3 4 4 4

0 3 3 4 4 4

3 4 4 4 5 5

0 3 3 4 4 4 5

5

hmax({a}) = 5

(33)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

add

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G

hadd({a}) = 21

(34)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

add

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

hadd({a}) = 21

(35)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

add

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

hadd({a}) = 21

(36)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

add

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

hadd({a}) = 21

(37)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

add

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

3

hadd({a}) = 21

(38)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

add

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

3 4

hadd({a}) = 21

(39)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

add

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

3 4 7 4

hadd({a}) = 21

(40)

Relaxed Planning Graphs Maximum and Additive Heuristics FF Heuristic Summary

Illustrative Example: h

add

a0 b0 c0 d0 e0 f0 g0 h0

a1 +3 a1 b1 c1 d1 e1 f1 g1 h1

a1 +3 a2 +1 a3 +1 a4 +1

a2 b2 c2 d2 e2 f2 g2 h2

a1 +3 a2 +1 a3 +1 a4 +1 a5 +1 a6 +1

a3 b3 c3 d3 e3 f3 g3 h3

G 0

3

0 3 3

3 4 7 4

0 3 3 4 7 4

hadd({a}) = 21

Referenzen

ÄHNLICHE DOKUMENTE

compact description of state space as input to algorithms state spaces exponentially larger than the input algorithms directly operate on compact description allows automatic

33.2 Repetition: State Spaces 33.3 Compact Descriptions 33.4 Summary.. Helmert (University of Basel) Foundations of Artificial Intelligence April 28, 2021 2

very similar to STRIPS: state variables not necessarily binary, but with given finite domain (cf. CSPs). states are assignments to these

Estimate solution costs by considering a simplified planning task, where all negative action effects are ignored....

I ignore negative effects (delete effects) of actions I use solution costs of relaxed planning task. as heuristic for solution costs of the original planning task I computation

Automated Planning: Delete Relaxation Heuristics Relaxed Planning Graphs.. 36.1 Relaxed

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 The objective value of an integer program that minimizes this cost subject to the flow constraints is a lower bound on the plan cost (i.e., an admissible heuristic estimate).. I