chap.12 practical planning cs570 artificial intelligence kwang-hyung lee
TRANSCRIPT
Chap.12 Practical Planning
CS570 Artificial Intelligence
Kwang-hyung Lee
12.1 Practical Planners
• Spacecraft assembly, integration, and verification1. Hierarchical plans
2. Complex conditions
3. Time
4. Resources
• Job Shop Scheduling• Scheduling for space missions• Buildings, aircraft carriers and beer factories
12.1 Practical Planners
12.2 Hierarchical Decomposition
• Solution at a high level abstraction[Go(Supermarket),Buy(Milk),Buy(Bananas),Go(Home)]
It is a long way from instruction fed to the agent’s effectors
• A low level plan[Forward(1 cm),Turn(1 deg),Forward(1 cm), ……]
• Hierarchical decomposition : an abstract operator can be decomposed into a group of stepsex) Abstract operator: Build(House)
decomposed operators : obtain Permit,Hire Builder,Construction, Pay Builder
• Primitive operator:executed by the agent
12.2 Hierarchical Decomposition
• Hierarchical planning work(1) provide an extension to the STRIPS for nonprimitive operator
(2) modify the planning algorithm to allow the replacement of a nonprimitive operator with its decomposition
12.2 Hierarchical Decomposition
*Extending STRIPS
(1) partition operators into primitive and nonprimitive operatorsnonprimitive : Install(FloorBoards)
primitive : Hammer(Nail)
(2) decomposition methodDecompose(o,p) : An operator o is decomposed into a plan p
12.2 Hierarchical Decomposition
• Decomposition of o into pThe decomposed plan p correctly implements an operator if it is
complete and consistent :
1. p must be consistent (no contradiction)
2. Every effect of o must be asserted by at least one step of p
3. Every precondition of the steps in p must be achieved by a step in p or be one of the preconditions of o
12.2 Hierarchical Decomposition
*Modifying the planner
• Modification of planner POP into HD-POP(1) a way to decompose nonprimitive operators
(2) the algorithm takes a plan as input, rather than just a goal
12.2 Hierarchical Decomposition
• SELECT-NONPRIMITIVE:selects a nonprimitive• CHOOSE-DECOMPOSITION:picks a decomposi
tion method• The fields of the plan are altered :
– STEPS :Add steps, remove Snonprimitive
– BINDINGS :Add variable binding constants
– Ordering:Call RESOLVE-THREATS
– Links: Si c Snonprim
Si c Sm : a step of method
12.2 Hierarchical Decomposition
12.3 Analysis of Hierarchical Decomposition
• Abstract solution : a plan containing abstract operators, but consistent and complete– downward solution:if p is an abstract solution and there is a primitive sol
ution
– upward solution:if an abstract plan is inconsistent then no primitive sol.
12.3 Analysis of Hierarchical Decomposition
• if a planner(nonhierarchical) has to generate n-step plan(where b is branching factor), it takes time O(bn)
• Hierarchical planning,sb steps at d=1
bs2 at d=2
ibs2 = O(bsd) (from i=1 to d)
12.3 Analysis of Hierarchical Decomposition
• The Gift of the Magic– A poor couple:he has a gold watch, she has long hair.
• Plan b is inconsistent , but it can be into a consistent plan
• The upward solution property does not hold
12.3 Analysis of Hierarchical Decomposition
*Decomposition and Sharing
• Merge each step of the decomposition into existing plan
• Divide-and-conquer approach:solve each subproblem and then combine it into the rest
• Sharing steps while merging• Ex) enjoy a honeymoon and raise a baby
(1) decomposition• get married and go on honeymoon
• get married and have a baby
(2) merge• share the step “get married”
12.3 Analysis of Hierarchical Decomposition
*Decomposition and approximation
• Hierarchical decompositionnonprimitive operator => primitives
• Hierarchical planning(approximation hierarchy, abstraction hierarchy)– It takes an operator and partitions its precondition according to the
ir criticality levelOp(ACTION:Buy(x), EFFECT : Have(x) Have(Money), PRECOND:1:Sells(store,x) 2:At(store) 3:Have(Money))
12.3 Analysis of Hierarchical Decomposition
12.4 More Expressive Operator Description
*Conditional effects• ex) block world in section 11.8
Two operators were needed
Op(ACTION:Move(b,x,y), PRECOND : On(b,x) Clear(b) Clear(y), EFFECT:On(b,y) Clear(x) On(b,x) Clear(y))
Op(ACTION:MoveToTable(b,x), PRECOND : On(b,x) Clear(b), EFFECT:On(b,Table) Clear(x) On(b,x))
– initial situation:On(A,B)goal :clear(B)
12.4 More Expressive Operator Description
– Move A to the table or to somewhere else? : premature commitment in Move(b,x,y)
– To eliminate it, we include conditional effect“effect when condition” : Q when P
Op(ACTION:Move(b,x,y), PRECOND : On(b,x) Clear(b) Clear(y),
EFFECT:On(b,y) Clear(x) On(b,x) Clear(y) when yTable)
12.4 More Expressive Operator Description
*Universal quantification
• ex) block worldclear(b)x Block(x) On(x,b)
• ex) shopping problemCarry(bag, x, y) : (effect) all objects that are in the bag are at y and are no longer at x.
Op(ACTION:Carry(bag,x,y), PRECOND:Bag(bag) At(bag,x),
EFFECT:At(bag,y) At(bag,x) I Item(i) (At(i,y) At(y) when In(I,bag))
12.4 More Expressive Operator Description