• Keine Ergebnisse gefunden

Planning and Optimization D1. Abstractions: Formal Definition and Heuristics Gabriele R¨oger and Thomas Keller

N/A
N/A
Protected

Academic year: 2022

Aktie "Planning and Optimization D1. Abstractions: Formal Definition and Heuristics Gabriele R¨oger and Thomas Keller"

Copied!
38
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

D1. Abstractions: Formal Definition and Heuristics

Gabriele R¨oger and Thomas Keller

Universit¨at Basel

October 29, 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

Abstraction

Abstractions in General

Pattern Databases

Merge &

Shrink Landmarks

Potential Heuristics Cost Partitioning

(4)

Abstractions

(5)

Abstracting a Transition System

Abstracting a transition system meansdropping some distinctions between states, whilepreserving the transition behaviouras much as possible.

An abstraction of a transition system T is defined by an abstraction mapping α that defines which states of T should be distinguished and which ones should not.

FromT andα, we compute anabstract transition systemTα which is similar to T, but smaller.

The abstract goal distances(goal distances in Tα) are used as heuristic estimates for goal distances inT.

(6)

Computing the Abstract Transition System

GivenT andα, how do we compute Tα? Requirement

We want to obtain anadmissible heuristic.

Hence,h(α(s)) (in the abstract state spaceTα) should never overestimateh(s) (in the concrete state spaceT).

An easy way to achieve this is to ensure thatall solutions in T are also present inTα:

Ifs is a goal state inT, then α(s) is a goal state in Tα. IfT has a transition froms to t, thenTα

has a transition from α(s) to α(t).

(7)

Example Task: One Package, Two Trucks

Example (One Package, Two Trucks)

Consider the following FDR planning taskhV,I,O, γi:

V ={p,tA,tB}with dom(p) ={L,R,A,B}

dom(tA) = dom(tB) ={L,R}

I ={p 7→L,tA7→R,tB 7→R}

O ={pickupi,j |i ∈ {A,B},j ∈ {L,R}}

∪ {dropi,j |i ∈ {A,B},j ∈ {L,R}}

∪ {movei,j,j0 |i ∈ {A,B},j,j0 ∈ {L,R},j 6=j0}, where pickupi,j =hti=jp=j,p:=i,1i

dropi,j =hti =jp=i,p:=j,1i

movei,j,j0 =hti =j,ti :=j0,1i

γ = (p= R)

(8)

Concrete Transition System of Example Task

LRR LLL LLR

LRL

ALR

ALL

BLL

BRL

ARL

ARR

BRR

BLR

RRR RRL

RLR

RLL

State {p 7→i,tA 7→j,tB 7→k} is depicted asijk. Transition labels are again not shown. For example, the transition from LLL to ALL has the label pickupA,L.

(9)

Abstract Transition System of Example Task

LRR

LLR

LLL

LRL LLR

LRL LLL

ALR ARL

ALL ARR

BLL

BRL

BRR

BLR ALR ARL

ARR ALL

BLL BRR

BLR BRL

RRR RRL

RLR

RLLRLL RRL

RLR RRR

State {p 7→i,tA 7→j,tB 7→k} is depicted asijk. Transition labels are again not shown. For example, the transition from LLL to ALL has the label pickupA,L.

(10)

Abstractions

Definition (Abstraction)

LetT =hS,L,c,T,s0,S?ibe a transition system.

Anabstraction(also: abstractionfunction, abstraction mapping) ofT is a functionα:S →Sα defined on the states of T, whereSα is an arbitrary set.

Without loss of generality, we require thatα is surjective.

Intuition: α maps the states of T to another (usually smaller) abstractstate space.

(11)

Abstract Transition System

Definition (Abstract Transition System)

LetT =hS,L,c,T,s0,S?ibe a transition system, and letα:S →Sα be an abstraction of T.

Theabstract transition system induced byα, in symbols Tα, is the transition systemTα=hSα,L,c,Tα,s0α,S?αidefined by:

Tα={hα(s), `, α(t)i | hs, `,ti ∈T} s0α=α(s0)

S?α={α(s)|s ∈S?}

(12)

Terminology

LetT be a transition system andα be an abstraction of T. T is called the concrete transition system.

Tα is called the abstract transition system.

Similarly: concrete/abstract state space, concrete/abstract transition, etc.

(13)

Practical Requirements for Abstractions

To be useful in practice, an abstraction heuristic must be efficiently computable. This gives us two requirements forα:

For a given state s, theabstract state α(s) must be efficiently computable.

For a given abstract stateα(s), theabstract goal distance h(α(s)) must be efficiently computable.

There are a number of ways of achieving these requirements:

pattern database heuristics(Culberson & Schaeffer, 1996) merge-and-shrink abstractions (Dr¨ager, Finkbeiner &

Podelski, 2006)

Cartesian abstractions (Ball, Podelski & Rajamani, 2001) structural patterns (Katz & Domshlak, 2008b)

(14)

Homomorphisms and Isomorphisms

(15)

Homomorphisms and Isomorphisms

The abstraction mappingα that transforms T toTα is also called a strict homomorphismfromT toTα. Roughly speaking, in mathematics a homomorphism is a property-preserving mapping between structures.

A stricthomomorphism is one where no additional features are introduced. A non-strict homomorphism in planning would mean that the abstract transition system may include additional transitions and goal states not induced byα.

We only consider strict homomorphisms in this course.

Ifα is bijective, it is called an isomorphismbetween T and Tα, and the two transition systems are called isomorphic.

(16)

Isomorphic Transition Systems

The notion of isomorphic transition systems is important enough to warrant a formal definition:

Definition (Isomorphic Transition Systems)

LetT =hS,L,c,T,s0,S?iand T0=hS0,L0,c0,T0,s00,S?0i be transition systems.

We say thatT is isomorphic toT0, in symbolsT ∼ T0, if there exist bijective functionsϕ:S →S0 andλ:L→L0 such that:

s −→` t ∈T iff ϕ(s)−−→λ(`) ϕ(t)∈T0, c0(λ(`)) =c(`) for all`∈L, ϕ(s0) =s00, and

s ∈S? iff ϕ(s)∈S?0.

(17)

Graph-Equivalent Transition Systems

Sometimes a weaker notion of equivalence is useful:

Definition (Graph-Equivalent Transition Systems)

LetT =hS,L,c,T,s0,S?iand T0=hS0,L0,c,T0,s00,S?0i be transition systems.

We say thatT is graph-equivalent to T0, in symbolsT ∼ TG 0, if there exists a bijective functionϕ:S →S0 such that:

There is a transitions −→` t ∈T with c(`) =k iff there is a transition ϕ(s) `

0

−→ϕ(t)∈T0 with c0(`0) =k, ϕ(s0) =s00, and

s ∈S? iff ϕ(s)∈S?0.

Note: The labels of T and T0 do not matter except that transitionsof the same costmust be preserved.

(18)

Isomorphism vs. Graph Equivalence

(∼) and (∼) are equivalence relations.G

Two isomorphic transition systems are interchangeable for all practical intents and purposes.

Two graph-equivalent transition systems are interchangeable for most intents and purposes.

In particular, their goal distances are identical.

Isomorphism implies graph equivalence, but not vice versa.

(19)

Abstraction Heuristics

(20)

Abstraction Heuristics

Definition (Abstraction Heuristic)

Letα:S →Sα be an abstraction of a transition systemT. Theabstraction heuristic induced byα, writtenhα,

is the heuristic functionhα:S →R+0 ∪ {∞} defined as hα(s) =hTα(α(s)) for all s ∈S, wherehTα denotes the goal distance function in Tα. Notes:

hα(s) =∞ if no goal state ofTα is reachable fromα(s) We also apply abstraction terminology to planning tasks Π, which stand for their induced transition systems.

For example, an abstraction of Π is an abstraction ofT(Π).

(21)

Abstraction Heuristics: Example

LRR

LLR

LLL

LRL LLR

LRL LLL

ALR ARL

ALL ARR

BLL

BRL

BRR

BLR ALR ARL

ARR ALL

BLL BRR

BLR BRL

RRR RRL

RLR

RLLRLL RRL

RLR RRR

hα({p7→L,tA 7→R,tB 7→R}) = 3

(22)

Consistency of Abstraction Heuristics (1)

Theorem (Consistency and Admissibility ofhα) Letα be an abstraction of a transition systemT. Then hα is safe, goal-aware, admissible and consistent.

Proof.

We prove goal-awareness and consistency;

the other properties follow from these two.

LetT =hS,L,c,T,s0,S?i.

LetTα =hSα,L,c,Tα,s0α,S?αi.

Goal-awareness: We need to show thathα(s) = 0 for alls ∈S?, so lets ∈S?. Thenα(s)∈S?α by the definition of abstract

transition systems, and hencehα(s) =hTα(α(s)) = 0. . . .

(23)

Consistency of Abstraction Heuristics (1)

Theorem (Consistency and Admissibility ofhα) Letα be an abstraction of a transition systemT. Then hα is safe, goal-aware, admissible and consistent.

Proof.

We prove goal-awareness and consistency;

the other properties follow from these two.

LetT =hS,L,c,T,s0,S?i.

LetTα =hSα,L,c,Tα,s0α,S?αi.

Goal-awareness: We need to show that hα(s) = 0 for alls ∈S?, so lets ∈S?. Thenα(s)∈S?α by the definition of abstract

transition systems, and hencehα(s) =hTα(α(s)) = 0. . . .

(24)

Consistency of Abstraction Heuristics (2)

Proof (continued).

Consistency: Consider any state transition s −→` t ofT. We need to showhα(s)≤c(`) +hα(t).

By the definition ofTα, we getα(s)−→` α(t)∈Tα. Hence,α(t) is a successor of α(s) in Tα via the label`.

We get:

hα(s) =hTα(α(s))

≤c(`) +hTα(α(t))

=c(`) +hα(t),

where the inequality holds because perfect goal distanceshTα

are consistent inTα.

(The shortest path fromα(s) to the goal in Tα cannot be longer than the shortest path fromα(s) to the goal via α(t).)

(25)

Consistency of Abstraction Heuristics (2)

Proof (continued).

Consistency: Consider any state transition s −→` t ofT. We need to showhα(s)≤c(`) +hα(t).

By the definition ofTα, we getα(s)−→` α(t)∈Tα. Hence,α(t) is a successor of α(s) in Tα via the label`.

We get:

hα(s) =hTα(α(s))

≤c(`) +hTα(α(t))

=c(`) +hα(t),

where the inequality holds because perfect goal distanceshTα

are consistent inTα.

(The shortest path fromα(s) to the goal in Tα cannot be longer than the shortest path fromα(s) to the goal via α(t).)

(26)

Consistency of Abstraction Heuristics (2)

Proof (continued).

Consistency: Consider any state transition s −→` t ofT. We need to showhα(s)≤c(`) +hα(t).

By the definition ofTα, we getα(s)−→` α(t)∈Tα. Hence,α(t) is a successor of α(s) in Tα via the label`.

We get:

hα(s) =hTα(α(s))

≤c(`) +hTα(α(t))

=c(`) +hα(t),

where the inequality holds because perfect goal distanceshTα

are consistent inTα.

(The shortest path fromα(s) to the goal in Tα cannot be longer than the shortest path fromα(s) to the goal via α(t).)

(27)

Coarsenings and Refinements

(28)

Abstractions of Abstractions

Since abstractions map transition systems to transition systems, they arecomposable:

Using a first abstractionα:S →S0, map T toTα.

Using a second abstraction β:S0 →S00, map Tα to (Tα)β. The result isthe same as directly using the abstraction (β◦α):

Let γ :S →S00 be defined asγ(s) = (β◦α)(s) =β(α(s)).

Then Tγ = (Tα)β.

(29)

Abstractions of Abstractions: Example (1)

LRR LLL LLR

LRL

ALR

ALL

BLL

BRL

ARL

ARR

BRR

BLR

RRR RRL

RLR

RLL

transition systemT

(30)

Abstractions of Abstractions: Example (2)

LRR

LRL LRR

LRL LLL LLRLLR

LLL

ALR

ALL ALR

ALL

ARL

ARR ARL

ARR

BLR BLL BRR

BRL BLL

BLR BRR

BRL

RRR RRLRRL

RRR

RLR

RLLRLL

RLR

Transition systemT0 as an abstraction ofT (ignore tB)

(31)

Abstractions of Abstractions: Example (2)

LRR

LRL LRR

LRL LLL LLRLLR

LLL

ALR

ALL ALR

ALL

ARL

ARR ARL

ARR

BRR BLL BLR

BRL

BLL BLR

BRL BRR

RRR RRLRRL

RRR

RLR

RLLRLL

RLR

Transition systemT0 as an abstraction ofT (ignore tB)

(32)

Abstractions of Abstractions: Example (3)

LRR LLL LLR

LRL LRR

LLR

LRL LLL

ALR ARL

ALL ARR ALR ARL

ARR ALL

BLL

BRL

BLR

BRR BLL BLR

BRR BRL

RRR RRL

RLR

RLLRLL RRL

RLR RRR

Transition system T00 as an abstraction ofT0 (ignore tA)

(33)

Abstractions of Abstractions: Example (3)

LRR LLL LLR

LRL LRR

LLR

LRL LLL

ALR ARL

ALL ARR ALR ARL

ARR ALL

BLL

BRL

BRR

BLR BLL BRR

BLR BRL

RRR RRL

RLR

RLLRLL RRL

RLR RRR

Transition system T00 as an abstraction ofT (ignoretA andtB)

(34)

Coarsenings and Refinements

Definition (Coarsening and Refinement)

Letα andγ be abstractions of the same transition system such thatγ =β◦α for some functionβ.

Thenγ is called acoarsening ofα andα is called arefinementof γ.

(35)

Heuristic Quality of Refinements

Theorem (Heuristic Quality of Refinements)

Letα andγ be abstractions of the same transition system such thatα is a refinement ofγ.

Then hα dominates hγ.

In other words,hγ(s)≤hα(s)≤h(s) for all states s.

(36)

Heuristic Quality of Refinements: Proof

Proof.

Sinceα is a refinement ofγ,

there exists a functionβ with γ =β◦α.

For all statess of Π, we get:

hγ(s) =hTγ(γ(s))

=hTγ(β(α(s)))

=hβTα(α(s))

≤hTα(α(s))

=hα(s),

where the inequality holds becausehTβα is an admissible heuristic in the transition systemTα.

(37)

Summary

(38)

Summary

Abstractionis one of the principled ways of deriving heuristics.

An abstractionis a functionα that maps the states S of a transition system to another (usually smaller) setSα. Thisinduces an abstract transition systemTα, which behaves like the original transition system T except that states

mapped to the same abstract state cannot be distinguished.

Abstractions α induceabstraction heuristics hα: hα(s) is the goal distance of α(s) in the abstract transition system.

Abstraction heuristics are safe,goal-aware,admissible andconsistent.

Abstractions can be composed, leading to coarservs. finer abstractions. Heuristics for finer abstractions dominate those for coarser ones.

Referenzen

ÄHNLICHE DOKUMENTE

For this purpose, we will use propositional logic, which allows expressing information about 2 n states as logical formulas over n state variables... Reminder:

progression: forward from initial state to goal regression: backward from goal states to initial state bidirectional search.. Planning

The last missing piece is a definition of regression through operators, describing exactly in which states s applying a given operator o leads to a state satisfying a given formula

Abstractions: Formal Definition and Heuristics Homomorphisms and Isomorphisms. D1.2 Homomorphisms

Coming up with good abstractions automatically is the main research challenge when applying abstraction heuristics

Hence we now look at the transition systems for atomic projections of our example task, including transition labels. We abbreviate operator names as in

The merge steps combine two abstract transition systems by replacing them with their synchronized product. The shrink steps make an abstract system smaller by abstracting

Each merge-and-shrink heuristic computed with a non-linear merging strategy can also be computed with a linear merging strategy.. However, linear merging can require a