220 likes | 235 Views
Graphplan: Fast Planning through Planning Graph Analysis. Avrim Blum Merrick Furst Carnegie Mellon University. The setting: STRIPS planning. Initial Conditions : Block A on Block B, Light is on, Door is closed, … Legal Actions : Pick up object, Move from X to Y, Toggle light,… Goals:
E N D
Graphplan: Fast Planning through Planning Graph Analysis Avrim Blum Merrick Furst Carnegie Mellon University
The setting: STRIPS planning • Initial Conditions: • Block A on Block B, Light is on, Door is closed, … • Legal Actions: • Pick up object, Move from X to Y, Toggle light,… • Goals: • Block B on Block A, Door is open,…
Representation Standard representation: State Graph • Each state of world is a node. Actions move you from node to node. • Goal: find a path from the start to a goal node. • Graph size may be exponential in problem description S4 S2 S1 S5 S3
Representation Graphplan idea: Encode problem in much more compact (poly size) graph • Node represents single literal in a time step • State is a set of nodes • Goal: find a “flow” of truth values.
“Truth” flowing through time At x At y A on B A has cleartop C has cleartop A on C B has cleartop Move X->Y Unstack A from B & put on C • Allow multiple “independent” actions in the same time step
Graphplan high level • Build graph in fast forward pass • Annotate graph with important info as you go • Actually, don’t use flow algorithms. Instead: • Perform backward-chaining search, guided by graph and stored constraints
Example: Rocket/Airplane Problem • 2 Vehicles at Montreal, have fuel • people at start. Half want to go to SF, half to Paris. • Load/Unload operators: (load <person> <vehicle> <location>) • Move operator deletes fuel: (move <from> <to>) V1, V2 N
Example, contd. • Example is hard for planners like prodigy because: • Can’t just solve goals one at a time • Also issue of resource allocation
Graph Creation A at M V1 at M V1 has fuel A at M A in V1 V1 at M V1 at SF V1 has fuel Load A into V1 Move V1 to SF
Mutual exclusions A at M V1 at M V1 has fuel A at M A in V1 V1 at M V1 at SF V1 has fuel Load A into V1 Move V1 to SF
Next level A at M A in V1 V1 at M V1 at SF V1 has fuel A at M A in V1 V1 at M V1 at SF V1 has fuel Unload A from V1 in SF Move V1 from M to SF
Propagating mutexs V1 at X V1 at Y V1 at Z V1 at W V1 at X V1 at Y V1 at Z V1 at W Move X->Y Move Z->W ...
Growing the graph • Grow forward until all goals appear, not marked as exclusive. • Rules for marking as exclusive: • Facts P,Q exclusive if all ways of making P true are exclusive of all ways of making Q true. • Actions A,B marked exclusive if either: • [Interference] One deletes a precond or add-effect of the other, or • [Competing Needs] some precond P of A is exclusive of some precond Q of B
Basic loop • Grow until all goals appear, not exclusive. • Perform backward search. If fail, grow one more level and repeat. • Termination step
Backward Search • Level by level. • Given goal set at time t, • For each goal, choose some action not exclusive of previous choices, and doesn’t cut off anyone. • This creates goal set at time t-1. Recurse on it. • If fail, backtrack
Example A at SF B at SF C at Paris D at Paris Unload A V1 at SF Unload B V2 at SF Unload B V1 at SF Unload C V1 Paris Unload C V2 Paris
Graph creation is poly time • IF operators have a constant number of parameters. • (move <x> from <y> to <z>), (open <x>) • IF operators don’t create new objects. • THEN polynomial number of ways to instantiate each operator. So, time is poly in #operators, #objects, and length of plan. Can speed up using goals to throw out irrelevants