example of partial order planning. action recipes: action: stack(x,y) prec: clear(x) ^ clear(y) ^...

26
EXAMPLE OF PARTIAL ORDER PLANNING

Post on 19-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

EXAMPLE OF PARTIAL ORDER PLANNING

Action Recipes:

Action: Stack(x,y)Prec: Clear(x) ^ Clear(y) ^ OnTable(x) Effect: ~Clear(y) ^ ~OnTable(x) ^ On(x,y)

Action: Unstack(x,y)Prec: Clear(x) ^ On(x,y) Effect: Clear(y) ^ ~On(x,y) ^ OnTable(x)

Initial State:Clear(A) ^ Clear(C) ^ OnTable(B) ^ OnTable(C) ^ On(A,B)

Goal:OnTable(A) ^ On(C,A)

BB

AA

AA

CC

C C

Initial State:Clear(A) ^ Clear(C) ^ OnTable(B) ^ OnTable(C) ^ On(A,B)

Goal:OnTable(A) ^ On(C,A)

FinishStart

OnTable(C)Clear(A)Clear(C) *On(C,A)

New-order-constraints:Start < Finish

STEP-1-

OnTable(B)On(A,B)Clear(A)

*OnTable(A)

Order constraints: dashed linesCausal links: solid linesProtected preconditions: black, on causal linkOpen preconditions: redEffects: blue

FinishStart

OnTable(C)Clear(A)Clear(C)

*OnTable(A)

New-order-constraints:Start < Stack(C,A)Stack(C,A) < Finish

STEP-2

Stack(C,A)

On(C,A)

*Clear(C)*Clear(A)*OnTable(C)

OnTable(B)On(A,B)Clear(A)

~Clear(A) others

Order constraints: dashed linesCausal links: solid linesProtected preconditions: black, on causal linkOpen preconditions: redEffects: blue

FinishStart

OnTable(C)Clear(A)Clear(C)

*OnTable(A)

STEP-3

Stack(C,A)

On(C,A)

OnTable(B)On(A,B)Clear(A)

~Clear(A) others

Order constraints: dashed linesCausal links: solid linesProtected preconditions: black, on causal linkOpen preconditions: redEffects: blue

FinishStart

OnTable(C)Clear(A)Clear(C)

OnTable(A)

STEP-4

Stack(C,A)

On(C,A)

OnTable(B)On(A,B)Clear(A)

Unstack(A,B)

*On(A,B)*Clear(A)

New-order-constraints:Start < Unstack(A,B)Unstack(A,B) < Finish

~Clear(A) others

FinishStart

OnTable(C)Clear(A)Clear(C)

OnTable(A)

STEP-5

Stack(C,A)

On(C,A)

OnTable(B)

Unstack(A,B)

On(A,B)Clear(A)

~Clear(A) others

FinishStart

OnTable(C)Clear(A)Clear(C)

OnTable(A)

STEP-6

Stack(C,A)

On(C,A)

OnTable(B)

Unstack(A,B)

On(A,B)Clear(A)

~Clear(A) others

CONFLICT between Stack(C,A) and causal link between Start and Unstack(A,B)

FinishStart

OnTable(C)Clear(A)Clear(C)

OnTable(A)

STEP-7

Stack(C,A)

On(C,A)

OnTable(B)

Unstack(A,B)

On(A,B)Clear(A)

~Clear(A) others

New-order-constraint:Unstack(A,B) < Stack(C,A)

ANOTHER EXAMPLE OF PARTIAL ORDER PLANNING

Action Recipes

Action: Remove(Spare, Trunk)Prec: At(Spare, Trunk)Effect: ~At(Spare, Trunk) ^ At(Spare, Ground)

Action: Remove(Flat, Axle)Prec: At(Flat, Axle)Effect: ~At(Flat, Axle) ^ At(Flat, Ground)

Action: PutOn(Spare, Axle)Prec: At(Spare, Ground) ^ ~At(Flat, Axle)Effect: ~At(Spare, Ground) ^ At(Spare, Axle)

Action: LeaveOvernightPrec: Effect: ~At(Spare, Ground) ^ ~At(Spare, Axle) ^ ~At(Spare, Trunk) ^ ~At(Flat, Ground) ^ ~At(Flat, Axle)

Initial State:At(Spare, Trunk) ^ At(Flat, Axle)

Goal: At(Spare, Axle)

Initial State:At(Spare, Trunk) ^ At(Flat, Axle)

Goal: At(Spare, Axle)

FinishStart

At(Spare,Trunk) At(Flat,Axle) *At(Spare,Axle)

New-order-constraints:Start < Finish

STEP-1-

Order constraints: dashed linesCausal links: solid linesProtected preconditions: black, on causal linkOpen preconditions: redEffects: blue

PutOn(Spare,Axle)

FinishStart

At(Spare,Trunk) At(Flat,Axle)

*At(Spare,Ground)

At(Spare,Axle)*~At(Flat,Axle)

New-order-constraints:Start < PutOn(Spare,Axle)PutOn(Spare,Axle) < Finish

STEP-2

Order constraints: dashed linesCausal links: solid linesProtected preconditions: black, on causal linkOpen preconditions: redEffects: blue

Remove(Spare,Trunk) PutOn(Spare,Axle)

FinishStart

At(Spare,Ground)

At(Spare,Axle)

*~At(Flat,Axle)

New-order-constraints:Start < Remove(Spare,Trunk)Remove(Spare,Trunk) < FinishRemove(Spare,Trunk) < PutOn(Spare,Axle)

STEP-3

Order constraints: dashed linesCausal links: solid linesProtected preconditions: black, on causal linkOpen preconditions: redEffects: blue

*At(Spare,Trunk)

At(Spare,Trunk) At(Flat,Axle)

Remove(Spare,Trunk) PutOn(Spare,Axle)

FinishStart

At(Flat,Axle)

At(Spare,Ground)

At(Spare,Axle)

*~At(Flat,Axle)

New-order-constraints:Start < Remove(Spare,Trunk)Remove(Spare,Trunk) < FinishRemove(Spare,Trunk) < PutOn(Spare,Axle)

STEP-4

Order constraints: dashed linesCausal links: solid linesProtected preconditions: black, on causal linkOpen preconditions: redEffects: blue

At(Spare,Trunk)

LeaveOvernight

Remove(Spare,Trunk) PutOn(Spare,Axle)

FinishStart

At(Flat,Axle)

At(Spare,Trunk)

At(Spare,Ground)

At(Spare,Axle)~At(Flat,Axle)

~At(Spare,Axle)~At(Spare,Ground)~At(Spare,Trunk) and others

OPTION-1

STEP-5

New-order-constraints:Start < LeaveOvernightLeaveOvernight < PutOn(Spare,Axle)LeaveOvernight < Finish

Remove(Spare,Trunk) PutOn(Spare,Axle)

FinishStart

At(Flat,Axle)

At(Spare,Trunk)

At(Spare,Ground)

At(Spare,Axle)

~At(Flat,Axle)

Remove(Flat,Axle)

*At(Flat,Axle) At(Flat,Ground)

OPTION-2

STEP-5

New-order-constraints:Start < Remove(Flat, Axle)Remove(Flat,Axle) < PutOn(Spare,Axle)Remove(Flat,Axle) < Finish

LeaveOvernight

Remove(Spare,Trunk) PutOn(Spare,Axle)

FinishStart

At(Flat,Axle)

At(Spare,Trunk)

At(Spare,Ground)

At(Spare,Axle)~At(Flat,Axle)

~At(Spare, Axle)~At(Spare,Ground)~At(Spare,Trunk) and others

OPTION-1

STEP-5

New-order-constraints:Start < LeaveOvernightLeaveOvernight < PutOn(Spare,Axle)LeaveOvernight < Finish

LeaveOvernight

Remove(Spare,Trunk) PutOn(Spare,Axle)

FinishStart

At(Flat,Axle)

At(Spare,Trunk)

At(Spare,Ground)

At(Spare,Axle)~At(Flat,Axle)

~At(Spare, Axle)~At(Spare,Ground)~At(Spare,Trunk) and others

OPTION-1

STEP-5

Am An

Ak

CONFLICT between Ak and causal link between Am and An

LeaveOvernight

Remove(Spare,Trunk) PutOn(Spare,Axle)

FinishStart

At(Spare,Trunk) At(Flat,Axle)

At(Spare,Trunk)

At(Spare,Ground)

At(Spare,Axle)~At(Flat,Axle)

~At(Spare, Axle)~At(Spare,Ground)~At(Spare,Trunk) and others

OPTION-1

STEP-5

Am An

Ak

CONFLICT between Ak and causal link between Am and An

Cannot put Ak after An since then we have a cycleSo try putting Ak before Am

LeaveOvernight

Remove(Spare,Trunk) PutOn(Spare,Axle)

FinishStart

At(Spare,Trunk) At(Flat,Axle)

At(Spare,Trunk)

At(Spare,Ground)

At(Spare,Axle)~At(Flat,Axle)

~At(Spare,Axle)~At(Spare,Ground)~At(Spare,Trunk) and others

New-order-constraint:LeaveOvernight < Remove(Spare,Trunk)

STEP-5a

LeaveOvernight

Remove(Spare,Trunk) PutOn(Spare,Axle)

FinishStart

At(Spare,Trunk) At(Flat,Axle)

At(Spare,Trunk)#####

At(Spare,Ground)

At(Spare,Axle)~At(Flat,Axle)

~At(Spare,Axle)~At(Spare,Ground)~At(Spare,Trunk) and others

STUCK --- LeaveOvernight threatens the causal link at ##### Cannot put LeaveOvernight before StartGo back to alternative plan at STEP-5

STEP-5b

Remove(Spare,Trunk) PutOn(Spare,Axle)

FinishStart

At(Flat,Axle)

At(Spare,Trunk)

At(Spare,Ground)

At(Spare,Axle)

~At(Flat,Axle)

Remove(Flat,Axle)

*At(Flat,Axle) At(Flat,Ground)

OPTION-2

STEP-5

New-order-constraints:Start < Remove(Flat, Axle)Remove(Flat,Axle) < PutOn(Spare,Axle)Remove(Flat,Axle) < Finish

Remove(Spare,Trunk) PutOn(Spare,Axle)

FinishStart

At(Spare,Trunk)

At(Spare,Ground)

At(Spare,Axle)

~At(Flat,Axle)

Remove(Flat,Axle)

At(Flat,Axle)

At(Flat,Ground)

STEP-6