+ All Categories
Home > Documents > An Introduction to Planning Graph

An Introduction to Planning Graph

Date post: 20-Jan-2016
Category:
Upload: leoma
View: 45 times
Download: 0 times
Share this document with a friend
Description:
An Introduction to Planning Graph. Chang, Han-Wen. A. Blum and M. Furst, " Fast Planning Through Planning Graph Analysis ", Artificial Intelligence , 90:281--300 (1997) AIMA textbook, Chap. 11, Section 11.4. March 29, 2007. Planning Problem. - PowerPoint PPT Presentation
Popular Tags:
41
An Introduction to Planning An Introduction to Planning Graph Graph Chang, Han-Wen Chang, Han-Wen March 29, 2007 A. Blum and M. Furst, " A. Blum and M. Furst, " Fast Planning Through Planning Graph Analysis ", ", Artificial Intelligence Artificial Intelligence , 90:281--300 (1997) , 90:281--300 (1997) AIMA textbook, Chap. 11, Section 11.4 AIMA textbook, Chap. 11, Section 11.4
Transcript
Page 1: An Introduction to Planning Graph

An Introduction to Planning An Introduction to Planning GraphGraph

Chang, Han-WenChang, Han-Wen

March 29, 2007

A. Blum and M. Furst, "A. Blum and M. Furst, "Fast Planning Through Planning Graph Analysis", ", Artificial IntelligenceArtificial Intelligence, 90:281--300 (1997), 90:281--300 (1997) AIMA textbook, Chap. 11, Section 11.4AIMA textbook, Chap. 11, Section 11.4

Page 2: An Introduction to Planning Graph

Planning ProblemPlanning Problem

PlanningPlanning is to come up with is to come up with a sequence of a sequence of actionsactions that will achieve that will achieve a goala goal from the from the initial initial statestate..

Page 3: An Introduction to Planning Graph

RepresentationRepresentation

states: conjunction of positive literalsstates: conjunction of positive literals ground and function-free first-order literals closed-world assumption

actions:actions: action name and parameter list precondition add-effect delete-effect no new object created

Page 4: An Introduction to Planning Graph

AB

move (Rocket ?r, Place ?from, Place ?to)Precond: At (?r, ?from) & HasFuel (?r)Add: At (?r, ?to)Delete: At (?r, ?from) & HasFuel (?r)

load (Rocket ?r, Place ?p, Cargo ?c)Precond: At (?r, ?p) & At (?c, ?p)Add: In (?c, ?r)Delete: At (?c, ?p)

unload (Rocket ?r, Place ?p, Cargo ?c)Precond: At (?r, ?p) & In (?c, ?r)Add: At (?c, ?p)Delete: In (?c, ?r)

Rocket ExampleRocket Example Cargo (A); Cargo (B); Rocket (R); Place (L); Place (P);

A B

Place L

Init:At (A, L) & At (B, L) & At (R, L) & HasFuel (R)

R

Goal:At (A, P) & At (B, P) Place P

Page 5: An Introduction to Planning Graph

MotivationMotivation

Search performance depends on Search performance depends on branching branching factorfactor, and constraints reduce the search , and constraints reduce the search space.space.

Independent actions can be done in any order. Independent actions can be done in any order.

Page 6: An Introduction to Planning Graph

Basic IdeaBasic Idea

Construct a graph that encodes constraints on Construct a graph that encodes constraints on possible planspossible plans

Use this “planning graph” to constrain search Use this “planning graph” to constrain search for a valid plan:for a valid plan: If valid plan exists, it is a subgraph of the planning

graph

Page 7: An Introduction to Planning Graph

Planning GraphPlanning Graph

Directed and LeveledDirected and Leveled NodesNodes

Proposition nodes Action nodes

EdgesEdges Precondition edges: from propositions to actions Add edges: from actions to propositions Del edges: from actions to propositions No-op edges: from propositions to propositions

Page 8: An Introduction to Planning Graph

Graph LevelsGraph Levels

Alternate LevelsAlternate Levels Proposition level: all propositions that could be

true at time step t Action level: all actions that could have their

preconditions satisfied at time step t

Page 9: An Introduction to Planning Graph

At B, L

At A, L

At R, L

Fuel R

Load R, L, B

Load R, L, A

Move R, L, P

At B, L

At A, L

At R, L

Fuel R

At R, P

In B, R

In A, R

Extending Planning Extending Planning GraphGraph

Page 10: An Introduction to Planning Graph

Load R, L, B

Load R, L, A

Move R, L, P

Unload R, L, A

Unload R, L, B

ActionsTime 1

At B, L

At A, L

At R, L

Fuel R

Propositions Time 0

Load R, L, B

Load R, L, A

Move R, L, P

ActionsTime 0

At B, L

At A, L

At R, L

Fuel R

At R, P

In B, R

In A, R

Propositions Time 1

Precondition edges

Add-effect edges

Delete-effect edges

No-op edges

Load R, L, B

Load R, L, A

Move R, L, P

Unload R, L, A

Unload R, L, B

Unload R, P, A

Unload R, P, B

ActionsTime 2

At B, L

At A, L

At R, L

Fuel R

At R, P

In B, R

In A, R

Propositions Time 2

At B, L

At A, L

At R, L

Fuel R

At R, P

In B, R

In A, R

At B, P

At A, P

Propositions Time 3

Rocket ExampleRocket Example

Page 11: An Introduction to Planning Graph

Mutual Exclusions (mutex)Mutual Exclusions (mutex)

Inconsistent EffectsInconsistent Effects InterferenceInterference Competing NeedsCompeting Needs Inconsistent SupportInconsistent Support

Page 12: An Introduction to Planning Graph

Inconsistent Effects (mutex)Inconsistent Effects (mutex)

The action deletes an add-effect of the other.The action deletes an add-effect of the other. Load(R, L, A) deletes At(L, A) which is an add-

effect of Unload(R, L, A), so the two actions are mutex.

Page 13: An Introduction to Planning Graph

Interference (mutex)Interference (mutex)

The action deletes a precondition of the other.The action deletes a precondition of the other. Move(R, L, P) deletes At(R, L) which is an

precondition of Load(R, L, A), so the two actions are mutex.

Page 14: An Introduction to Planning Graph

Competing Needs (mutex)Competing Needs (mutex)

If there is a precondition If there is a precondition pp of action of action aa and a and a precondition precondition qq of action of action bb that are mutex in that are mutex in the previous proposition level, the two actions the previous proposition level, the two actions are mutex.are mutex. The precondition At(A, L) of action Load(R, A, L)

and the precondition At(A, P) of action Load(R, A, P) are mutex, so the two actions are mutex.

Page 15: An Introduction to Planning Graph

Inconsistent Support (mutex)Inconsistent Support (mutex)

If each action If each action aa having an add-effect of having an add-effect of proposition proposition pp is marked as exclusive of each is marked as exclusive of each action action bb having an add-effect of proposition having an add-effect of proposition qq, , the two propositions are mutex.the two propositions are mutex. The proposition At(A, L) and the proposition In(A,

R) are mutex at time step t if the are mutex at time step t-1, and any action creates At(A, L) are mutex with any action creates In(A, R).

Page 16: An Introduction to Planning Graph

Spare Tire Example (AIMA)Spare Tire Example (AIMA)

Page 17: An Introduction to Planning Graph

GraphPlan AlgorithmGraphPlan Algorithm

function GRAPHPLAN(problem) return solution or failuregraph INITIAL-PLANNING-GRAPH(problem)goals GOALS[problem]loop do if goals all non-mutex in last level of graph then do

solution EXTRACT-SOLUTION(graph, goals, LENGTH(graph))

if solution failure then return solution else if NO-SOLUTION-POSSIBLE(graph) then return

failure graph EXPAND-GRAPH(graph, problem)

Page 18: An Introduction to Planning Graph

Plan ExtractionPlan Extraction

Valid planValid plan goals are satisfied Non-mutex actions

Backward chainingBackward chaining Achieve goals level by levelAchieve goals level by level

Non-mutex actions at level k Preconditions as the goals for level k-1 No Non-mutex action found backtrack

Page 19: An Introduction to Planning Graph

FeaturesFeatures

Literals increase monotonicallyLiterals increase monotonically Actions increase monotonicallyActions increase monotonically Mutexes decrease monotonicallyMutexes decrease monotonically

Eventually level offEventually level off two consecutive levels are identical

Page 20: An Introduction to Planning Graph

TerminationTermination

planning graph eventually leveled-offplanning graph eventually leveled-off

If the graph is leveled-off and some literals of If the graph is leveled-off and some literals of the goal do not appear or are marked as the goal do not appear or are marked as mutex in the latest proposition level, the mutex in the latest proposition level, the problem is unsolvable.problem is unsolvable.

Page 21: An Introduction to Planning Graph

Advanced TestAdvanced Test

Let Let SStt

ii be the collection of unachievable be the collection of unachievable

(sub)goal-sets stored for level i after trial at (sub)goal-sets stored for level i after trial at stage tstage t

If graph leveled off at level n and If graph leveled off at level n and SSt-1t-1

nn = = SStt

nn at a at a

stage t > n, then output “No Plan Exists”stage t > n, then output “No Plan Exists”

Page 22: An Introduction to Planning Graph

Remarks on Planning GraphRemarks on Planning Graph Polynomial space / graph creation timePolynomial space / graph creation time

p: |initial state| n: #object m: #operator t: #level l: max( #add-list ) k: max( #operator parameter ) #Max nodes action level: O(mnk) #Max nodes proposition level: O(p+mlnk)

Page 23: An Introduction to Planning Graph

More RemarksMore Remarks

Sound & completeSound & complete

Partially-ordered planning Partially-ordered planning Independent actions in the same level can be

executed in any order

Page 24: An Introduction to Planning Graph

Pro and ConPro and Con

Cases with better performanceCases with better performance pairwise mutex relations capture important

constraints parallel actions reduce the depth of the graph

Page 25: An Introduction to Planning Graph

ThanksThanks

Page 26: An Introduction to Planning Graph

Eat Cake Example (AIMA)Eat Cake Example (AIMA)similar to drink water example

Page 27: An Introduction to Planning Graph

Spare Tire Example (AIMA)Spare Tire Example (AIMA)

Page 28: An Introduction to Planning Graph

AB

move (Rocket ?r, Place ?from, Place ?to)Precond: At (?r, ?from) & HasFuel (?r)Add: At (?r, ?to)Delete: At (?r, ?from) & HasFuel (?r)

load (Rocket ?r, Place ?p, Cargo ?c)Precond: At (?r, ?p) & At (?c, ?p)Add: In (?c, ?r)Delete: At (?c, ?p)

unload (Rocket ?r, Place ?p, Cargo ?c)Precond: At (?r, ?p) & In (?c, ?r)Add: At (?c, ?p)Delete: In (?c, ?r)

Rocket ExampleRocket Example Cargo (A); Cargo (B); Rocket (R); Place (L); Place (P);

A B

Place L

Init:At (A, L) & At (B, L) & At (R, L) & HasFuel (R)

R

Goal:At (A, P) & At (B, P) Place P

Page 29: An Introduction to Planning Graph

Load R, L, B

Load R, L, A

Move R, L, P

Unload R, L, A

Unload R, L, B

ActionsTime 1

At B, L

At A, L

At R, L

Fuel R

Propositions Time 0

Load R, L, B

Load R, L, A

Move R, L, P

ActionsTime 0

At B, L

At A, L

At R, L

Fuel R

At R, P

In B, R

In A, R

Propositions Time 1

Precondition edges

Add-effect edges

Delete-effect edges

No-op edges

Load R, L, B

Load R, L, A

Move R, L, P

Unload R, L, A

Unload R, L, B

Unload R, P, A

Unload R, P, B

ActionsTime 2

At B, L

At A, L

At R, L

Fuel R

At R, P

In B, R

In A, R

Propositions Time 2

At B, L

At A, L

At R, L

Fuel R

At R, P

In B, R

In A, R

At B, P

At A, P

Propositions Time 3

Rocket ExampleRocket Example

Page 30: An Introduction to Planning Graph

At B, L

At A, L

At R, L

Fuel R

Load R, L, B

Load R, L, A

Move R, L, P

At B, L

At A, L

At R, L

Fuel R

At R, P

In B, R

In A, R

Extending Planning Extending Planning GraphGraph

Page 31: An Introduction to Planning Graph

Inconsistent Effects (mutex)Inconsistent Effects (mutex)

The action deletes an add-effect of the other.The action deletes an add-effect of the other. Load(R, L, A) deletes At(L, A) which is an add-

effect of Unload(R, L, A), so the two actions are mutex.

Page 32: An Introduction to Planning Graph

Interference (mutex)Interference (mutex)

The action deletes a precondition of the other.The action deletes a precondition of the other. Move(R, L, P) deletes At(R, L) which is an

precondition of Load(R, L, A), so the two actions are mutex.

Page 33: An Introduction to Planning Graph

Competing Needs (mutex)Competing Needs (mutex)

If there is a precondition If there is a precondition pp of action of action aa and a and a precondition precondition qq of action of action bb that are mutex in that are mutex in the previous proposition level, the two actions the previous proposition level, the two actions are mutex.are mutex. The precondition At(A, L) of action Load(R, A, L)

and the precondition At(A, P) of action Load(R, A, P) are mutex, so the two actions are mutex.

Page 34: An Introduction to Planning Graph

Inconsistent Support (mutex)Inconsistent Support (mutex)

If each action If each action aa having an add-effect of having an add-effect of proposition proposition pp is marked as exclusive of each is marked as exclusive of each action action bb having an add-effect of proposition having an add-effect of proposition qq, , the two propositions are mutex.the two propositions are mutex. The proposition At(A, L) and the proposition In(A,

R) are mutex at time step t if the are mutex at time step t-1, and any action creates At(A, L) are mutex with any action creates In(A, R).

Page 35: An Introduction to Planning Graph

Drink Water ExampleDrink Water Example

literals:literals: EmptyCup FullCup Thirsty NotThirsty

Initial Condition:Initial Condition: FullCup & Thirsty

Goal:Goal: NotThirsty & FullCup

Page 36: An Introduction to Planning Graph

Drink Water Example -- Drink Water Example -- ActionsActions

FillCupFillCup Preconds: EmptyCup Add-effs: FullCup Del-effs: EmptyCup

EmptyCupActionEmptyCupAction Preconds: FullCup Add-effs: EmptyCup Del-effs: FullCup

DrinkDrink Preconds:

FullCup & Thirsty Add-effs:

EmptyCup & NotThirsty Del-effs:

FullCup & Thirsty

Page 37: An Introduction to Planning Graph

EmptyCupEmptyCup

Drink Water Planning GraphDrink Water Planning Graph

FullCup

EmptyCupAction

Drink

Thirsty

FullCup

NotThirsty

Thirsty

FillCup

EmptyCupAction

Drink

FullCup

NotThirsty

Thirsty

propositiontime 1

propositiontime 2

propositiontime 3

actiontime 1

actiontime 2

Page 38: An Introduction to Planning Graph

Inconsistent Effects (mutex)Inconsistent Effects (mutex)

The action deletes an add-effect of the other.The action deletes an add-effect of the other. Drink deletes Full_Cup which is an add-effect of

Fill_Cup, so the two actions are mutex.

Page 39: An Introduction to Planning Graph

Interference (mutex)Interference (mutex)

The action deletes a precondition of the other.The action deletes a precondition of the other. EmptyCupAction deletes FullCup which is an

precondition of Drink, so the two actions are mutex.

Page 40: An Introduction to Planning Graph

Competing Needs (mutex)Competing Needs (mutex)

If there is a precondition If there is a precondition pp of action of action aa and a and a precondition precondition qq of action of action bb that are mutex in that are mutex in the previous proposition level, the two actions the previous proposition level, the two actions are mutex.are mutex. The precondition EmptyCup of action FillCup and

the precondition FullCup of action Drink are mutex, so the two actions are mutex.

Page 41: An Introduction to Planning Graph

Inconsistent Support (mutex)Inconsistent Support (mutex)

If each action If each action aa having an add-effect of having an add-effect of proposition proposition pp is marked as exclusive of each is marked as exclusive of each action action bb having an add-effect of proposition having an add-effect of proposition qq, , the two propositions are mutex.the two propositions are mutex. The proposition EmptyCup and the proposition

FullCup are mutex at time step t if the are mutex at time step t-1, and any action creates EmptyCup are mutex with any action creates FullCup.


Recommended