• Keine Ergebnisse gefunden

Planning and Optimization D6. Merge-and-Shrink Abstractions: Synchronized Product Gabriele R¨oger and Thomas Keller

N/A
N/A
Protected

Academic year: 2022

Aktie "Planning and Optimization D6. Merge-and-Shrink Abstractions: Synchronized Product Gabriele R¨oger and Thomas Keller"

Copied!
46
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

D6. Merge-and-Shrink Abstractions: Synchronized Product

Gabriele R¨oger and Thomas Keller

Universit¨at Basel

November 5, 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)

Motivation

(5)

Beyond Pattern Databases

Despite their popularity, pattern databases have some fundamental limitations ( example on next slides).

For the rest of this week, we study a class of abstractions calledmerge-and-shrink abstractions.

Merge-and-shrink abstractions can be seen as a proper generalization of pattern databases.

They can do everything that pattern databases can do (modulo polynomial extra effort).

They can do some things that pattern databases cannot.

(6)

Back to the Running Example

LRR LLL

LLR

LRL

ALR

ALL

BLL

BRL

ARL

ARR

BRR

BLR

RRR RRL

RLR

RLL

Logistics problem with one package, two trucks, two locations:

state variablepackage: {L,R,A,B} state variabletruck A:{L,R}

state variabletruck B:{L,R}

(7)

Example: Projection

Tπ{package}:

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

(8)

Example: Projection (2)

Tπ{package,truck A}:

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

(9)

Example: Projection (2)

Tπ{package,truck A}:

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

(10)

Limitations of Projections

How accurate is the PDB heuristic?

consider generalization of the example:

N trucks,M locations (fully connected), still one package consider anypattern that is a proper subset of variable set V. h(s0)≤2 no better than atomic projection to package These values cannot be improved by maximizing over several patterns or using additive patterns.

Merge-and-shrink abstractionscan represent heuristics with h(s0)≥3 for tasks of this kind of any size.

Time and space requirements arepolynomial inN andM.

(11)

Merge-and-Shrink Abstractions: Main Idea

Main Idea of Merge-and-shrink Abstractions (due to Dr¨ager, Finkbeiner & Podelski, 2006):

Instead ofperfectly reflectinga fewstate variables, reflectallstate variables, but in a potentially lossyway.

(12)

Merge-and-Shrink Abstractions: Idea

Start from projections to single state variables

(13)

Merge-and-Shrink Abstractions: Idea

Successively replace two transition systems with their product.

T

M

B

L R

TL TR

ML MR

BL BR

(14)

Merge-and-Shrink Abstractions: Idea

If too large, replace a transition system with an abstract system.

(15)

Merge-and-Shrink Abstractions: Idea

Given two abstract transition systems, we can merge them into a new abstractproduct transition system.

The product transition system captures all informationof both transition systems and can be better informed than either.

It can even be better informed than their sum.

If merging with another abstract transition system exceeded memory limitations, we can shrinkan intermediate result using any abstractionand then continue the merging process.

(16)

Synchronized Product

(17)

Content of this Course: Merge & Shrink

Merge & Shrink

Synchronized Product Merge & Shrink Algorithm

Heuristic Properties Strategies Label Reduction

(18)

Running Example: Explanations

Atomic projections– projections to a single state variable – play an important role for merge-and-shrink abstractions.

Unlike previous chapters, transition labelsare critically important for this topic.

Hence we now look at the transition systems for atomic projections of our example task, including transition labels.

We abbreviate operator names as in these examples:

MALR:move truckAfromleft to right

DAR:drop package from truckAatright location PBL:pick up package with truckBatleft location

We abbreviate parallel arcs with commasandwildcards (?)in the labels as in these examples:

PAL, DAL:two parallel arcs labeledPALandDAL MA??: two parallel arcs labeledMALRandMARL

(19)

Running Example: Atomic Projection for Package

Tπ{package}:

L

A

B

R

M???

PAL DAL

M???

DAR PAR

M???

PBR DBR

M???

DBL PBL

(20)

Running Example: Atomic Projection for Truck A

Tπ{truck A}:

L R

PAL,DAL,MB??, PB?,DB?

MALR

MARL

PAR,DAR,MB??, PB?,DB?

(21)

Running Example: Atomic Projection for Truck B

Tπ{truck B}:

L R

PBL,DBL,MA??, PA?,DA?

MBLR

MBRL

PBR,DBR,MA??, PA?,DA?

(22)

Synchronized Product of Transition Systems

Definition (Synchronized Product of Transition Systems)

Fori ∈ {1,2}, letTi =hSi,L,c,Ti,s0i,S?ii be transition systems with identical label set and identical label cost function.

Thesynchronized productof T1 andT2, in symbols T1⊗ T2, is the transition systemT=hS,L,c,T,s0⊗,S?⊗i with

S :=S1×S2

T :={hhs1,s2i,l,ht1,t2ii | hs1,l,t1i ∈T1 and hs2,l,t2i ∈T2} s0⊗:=hs01,s02i

S?⊗ :=S?1×S?2

(23)

Example: Synchronized Product

Tπ{package}⊗ Tπ{truck A}:

LL LR

AL AR

BL BR

RL RR

MALR MARL

MALR MARL

MALR MARL

MALR MARL PAL

DAL

PARDAR

PBR DBL DBR

PBL

PBL DBL

DBR PBR

MB?? MB??

MB?? MB??

MB?? MB??

MB?? MB??

(24)

Example: Computation of Synchronized Product

Tπ{package}⊗ Tπ{truck A}:

L

A

B

R M???

PAL DAL

M???

DAR PAR

M???

PBR DBR

M???

DBL

PBL

L R

PAL,DAL,MB??, PB?,DB?

MALR MARL

PAR,DAR,MB??, PB?,DB?

=

LL LR

AL AR

BL BR

RL RR

MALR MARL

MALR MARL

MALR MARL

MALR MARL PAL

DAL

PARDAR

PBR DBR DBL

PBL PBL DBL

DBR PBR

MB?? MB??

MB?? MB??

MB?? MB??

MB?? MB??

(25)

Example: Computation of Synchronized Product

Tπ{package}⊗ Tπ{truck A}: S=S1×S2

L

A

B

R M???

PAL DAL

M???

DAR PAR

M???

PBR DBR

M???

DBL PBL

A

L R

PAL,DAL,MB??, PB?,DB?

MALR MARL

PAR,DAR,MB??, PB?,DB?

L

=

LL LR

AL AR

BL BR

RL RR

MALR MARL

MALR MARL

MALR MARL

MALR MARL PAL

DAL

PARDAR

PBR DBR DBL

PBL PBL DBL

DBR PBR

MB?? MB??

MB?? MB??

MB?? MB??

MB?? MB??

AL

(26)

Example: Computation of Synchronized Product

Tπ{package}⊗ Tπ{truck A}: s0⊗=hs01,s02i

L

A

B

R M???

PAL DAL

M???

DAR PAR

M???

PBR DBR

M???

DBL PBL

L

L R

PAL,DAL,MB??, PB?,DB?

MALR MARL

PAR,DAR,MB??, PB?,DB?

R

=

LL LR

AL AR

BL BR

RL RR

MALR MARL

MALR MARL

MALR MARL

MALR MARL PAL

DAL

PARDAR

PBR DBR DBL

PBL PBL DBL

DBR PBR

MB?? MB??

MB?? MB??

MB?? MB??

MB?? MB??

LR

(27)

Example: Computation of Synchronized Product

Tπ{package}⊗ Tπ{truck A}: S?⊗=S?1×S?2

L

A

B

R M???

PAL DAL

M???

DAR PAR

M???

PBR DBR

M???

DBL PBL

R

L R

PAL,DAL,MB??, PB?,DB?

MALR MARL

PAR,DAR,MB??, PB?,DB?

L R

=

LL LR

AL AR

BL BR

RL RR

MALR MARL

MALR MARL

MALR MARL

MALR MARL PAL

DAL

PARDAR

PBR DBR DBL

PBL PBL DBL

DBR PBR

MB?? MB??

MB?? MB??

MB?? MB??

MB?? MB??

RL RR

(28)

Example: Computation of Synchronized Product

Tπ{package}⊗ Tπ{truck A}: T:={hhs1,s2i,l,ht1,t2ii |. . .}

L

A

B

R M???

PAL DAL

M???

DAR PAR

M???

PBR DBR

M???

DBL PBL PAL

L R

PAL,DAL,MB??, PB?,DB?

MALR MARL

PAR,DAR,MB??, PB?,DB?

PAL,DAL,MB??, PB?,DB?

=

LL LR

AL AR

BL BR

RL RR

MALR MARL

MALR MARL

MALR MARL

MALR MARL PAL

DAL

PARDAR

PBR DBR DBL

PBL PBL DBL

DBR PBR

MB?? MB??

MB?? MB??

MB?? MB??

MB?? MB??

PAL

(29)

Example: Computation of Synchronized Product

Tπ{package}⊗ Tπ{truck A}: T:={hhs1,s2i,l,ht1,t2ii |. . .}

L

A

B

R M???

PAL DAL

M???

DAR PAR

M???

PBR DBR

M???

DBL PBL M???

L R

PAL,DAL,MB??, PB?,DB?

MALR MARL

PAR,DAR,MB??, PB?,DB?

MALR

=

LL LR

AL AR

BL BR

RL RR

MALR MARL

MALR MARL

MALR MARL

MALR MARL PAL

DAL

PARDAR

PBR DBR DBL

PBL PBL DBL

DBR PBR

MB?? MB??

MB?? MB??

MB?? MB??

MB?? MB??

MALR

(30)

Example: Computation of Synchronized Product

Tπ{package}⊗ Tπ{truck A}: T:={hhs1,s2i,l,ht1,t2ii |. . .}

L

A

B

R M???

PAL DAL

M???

DAR PAR

M???

PBR DBR

M???

DBL PBL

PBL

L R

PAL,DAL,MB??, PB?,DB?

MALR MARL

PAR,DAR,MB??, PB?,DB?

PAR,DAR,MB??, PB?,DB?

=

LL LR

AL AR

BL BR

RL RR

MALR MARL

MALR MARL

MALR MARL

MALR MARL PAL

DAL

PARDAR

PBR DBR DBL

PBL PBL DBL

DBR PBR

MB?? MB??

MB?? MB??

MB?? MB??

MB?? MB??

PBL

(31)

Example: Computation of Synchronized Product

Tπ{package}⊗ Tπ{truck A}: T:={hhs1,s2i,l,ht1,t2ii |. . .}

L

A

B

R M???

PAL DAL

M???

DAR PAR

M???

PBR DBR

M???

DBL PBL

M???

L R

PAL,DAL,MB??, PB?,DB?

MALR MARL

PAR,DAR,MB??, PB?,DB?

PAL,DAL,MB??, PB?,DB?

=

LL LR

AL AR

BL BR

RL RR

MALR MARL

MALR MARL

MALR MARL

MALR MARL PAL

DAL

PARDAR

PBR DBR DBL

PBL PBL DBL

DBR PBR

MB?? MB??

MB?? MB??

MB?? MB??

MB?? MB??

MB??

(32)

Synchronized Products and

Abstractions

(33)

Synchronized Product of Functions

Definition (Synchronized Product of Functions)

Letα1 :S →S1 andα2:S →S2 be functions with identical domain.

Thesynchronized productofα1 andα2, in symbolsα1⊗α2, is the functionα:S →S1×S2 defined as α(s) =hα1(s), α2(s)i.

(34)

Synchronized Product of Abstractions

Theorem

Letα1 andα2 be abstractions of transition system T such that α:=α1⊗α2 is surjective.

Thenα is an abstraction ofT and a refinement ofα1 andα2.

Proof.

Abstraction: suitable domain asα1, α2 are abstractions of T, Abstraction: surjective by premise

Refinement: Fori ∈ {1,2},αii◦αwith βi(hx1,x2i) =xi.

(35)

Preserving Abstractions

It would be very nice if we could prove that ifα1 and α2 are abstractions ofT then there is an abstraction of T inducing Tα1⊗ Tα2.

However, this is not truein general.

It is not eventrue for SAS+ tasks.

But there is an important sufficient condition for preserving the abstraction property.

(36)

Synchronized Products and Abstractions

Theorem (Synchronized Products and Abstractions) LetΠbe a SAS+ planning task with variable set V , and letV1 and V2 be disjoint subsets of V .

For i∈ {1,2}, letαi be an abstraction ofT(Π) such that αi is a coarsening ofπVi.

Thenα:=α1⊗α2 is surjective and Tα1⊗α2 =Tα1⊗ Tα2.

(37)

Synchronized Products and Abstractions

Proof.

LetT =hS,L,c,T,s0,S?iand

fori ∈ {1,2}let Tαi =hSi,L,c,Ti,s0i,S?ii (withαi :S →Si).

α1⊗α2 is surjective:

Sinceαi is a coarsening ofπVi there is aβi such thatαii ◦πVi withβi :S|Vi →Si.

Consider an arbitraryhs1,s2i ∈S1×S2.

Asα1, α2 are surjective (because they are abstractions), there are s10,s20 ∈S such thatαi(si0) =si.

AsS consists of all valuations ofV, also states with s|V1 =s10|V1 ands|V\V1 =s20|V\V1 is inS.

Thenαi(s) =βi ◦πVi(s) =βi ◦πVi(si0) =αi(si0) =si and hence α1⊗α2(s) =hα1(s), α2(s)i=hs1,s2i. . . .

(38)

Synchronized Products and Abstractions

Proof (continued).

Tα1⊗α2 =Tα1⊗ Tα2: Sα1⊗α2 =S1×S2=S

s1⊗α21⊗α2(s0) =hα1(s0), α2(s0)i=hs01,s02i=s0⊗

S1⊗α2 ={α1⊗α2(s)|s ∈S?}

={hα1(s), α2(s)i |s ∈S?}

⊆ {hα1(s), α2(s0)i |s,s0 ∈S?}

={hs1,s2i |s1 ∈S?1,s2 ∈S?2}

=S?1×S?2

=S?

. . .

(39)

Synchronized Products and Abstractions

Proof (continued).

For equality, we also need to establish that

{hα1(s), α2(s0)i |s,s0∈S?} ⊆ {hα1(s), α2(s)i |s ∈S?}.

Consider arbitrarys,s0 ∈S?.

Defines00 as s00|V1 =s|V1 and s00|V\V1=s0|V\V1.

It holds thatα1(s00) =α1(s) andα2(s00) =α2(s0) because αi is a coarsening ofπVi.

Furthermore,s00∈S?: the goal formulaγ of a SAS+ task is a conjunction of atomsv =d. If v ∈V1, then s00(v) =d because s ∈S?, otherwise s00(v) =d because s0∈S?. Overall, s00 |=γ.

. . .

(40)

Synchronized Products and Abstractions

Proof (continued).

We still need to show the equality of the sets of transitions.

Tα1⊗α2 ={hα1⊗α2(s),o, α1⊗α2(t)i | hs,o,ti ∈T}

={hhα1(s), α2(s)i,o,hα1(t), α2(t)ii | hs,o,ti ∈T}

⊆ {hhα1(s), α2(s0)i,o,hα1(t), α2(t0)ii

| hs,o,ti,hs0,o,t0i ∈T}

={hhs1,s2i,o,ht1,t2ii | hs1,o,t1i ∈T1,hs2,o,t2i ∈T2}

=T

For equality, we need to show that forhs,o,ti,hs0,o,t0i ∈T there is a transitionhs00,o,t00i ∈T with

α1(s) =α1(s00), α1(t) =α1(t00),α2(s0) =α2(s00), α2(t0) =α2(t00).

. . .

(41)

Synchronized Products and Abstractions

Proof (continued).

Considers00∈S with s00|V1 =s|V1 ands00|V\V1 =s0|V\V1 andt00∈S witht00|V1 =t|V1 andt00|V\V1 =t0|V\V1.

Sincepre(o) is a conjunction of atoms and consist(eff(o))≡ >, o is applicable in s00 by an analogous argument as for the goal.

Ast =sJoK, we havet|V\vars(eff(o)) =s|V\vars(eff(o)), analogously fort0 ands0. Hencet00|V\vars(eff(o))=s00|V\vars(eff(o)).

Aseff(o) contains no conditional effect, it holds for all atomic effectsv:=d ineff(o) thatt(v) =t0(v) =d and hence t00(v) =d. Overall, t00=s00JoKandhs00, `,t00i ∈T.

The requirements on the abstractions are again satisfied by the construction ofs00 andt00 andαi being coarsenings ofπVi.

(42)

Example: Product for Disjoint Projections

Tπ{package}⊗ Tπ{truck A}∼ Tπ{package,truck A}:

LL LR

AL AR

BL BR

RL RR

MALR MARL

MALR MARL

MALR MARL

MALR MARL PAL

DAL

PARDAR

PBR DBL DBR

PBL

PBL DBL

DBR PBR

MB?? MB??

MB?? MB??

MB?? MB??

MB?? MB??

(43)

Synchronized Products of Projections

Corollary (Synchronized Products of Projections)

LetΠbe a SAS+ planning task with variable set V , and let V1 and V2 be disjoint subsets of V .

ThenTπV1 ⊗ TπV2 ∼ TπV1∪V2. (Proof omitted.)

By repeated application of the corollary, we can recoverall pattern database heuristicsof a SAS+ planning task from the abstract transition systems induced by atomic projections.

(44)

Recovering T (Π) from the Atomic Projections

Moreover, by computing the product ofallatomic projections, we can recover theidentity abstractionid =πV.

Corollary (RecoveringT(Π) from the Atomic Projections) LetΠbe a SAS+ planning task with variable set V . ThenT(Π)∼N

v∈V Tπ{v}.

This is an important result because it shows that the transition systems induced by atomic projectionscontain all informationof a SAS+ task.

(45)

Summary

(46)

Summary

The synchronized productof two transition systems captures

“what we can do” in both systems “in parallel”.

With suitable abstractions, the synchronized product of the induced transition systems is induced by the synchronized product of the abstractions.

We can recoverthe originaltransition system from the

abstract transition systems induced by the atomic projections.

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:

Relaxed Task Graphs Construction Reachability Analysis Remarks Summary.. Content of this

Abstractions α induce abstraction heuristics h α : h α (s ) is the goal distance of α(s ) in the abstract transition system. Abstraction heuristics are safe, goal-aware, admissible

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

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

D3.1 Projections and Pattern Database Heuristics D3.2 Implementing PDBs: Precomputation.. D3.3 Implementing PDBs: Lookup

Formally, pattern database heuristics are abstraction heuristics induced by a particular class of abstractions called projections.

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)..