chap.12 practical planning cs570 artificial intelligence kwang-hyung lee

16
Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

Upload: amberly-mitchell

Post on 18-Dec-2015

225 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

Chap.12 Practical Planning

CS570 Artificial Intelligence

Kwang-hyung Lee

Page 2: 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

Page 3: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

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

Page 4: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

• 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

Page 5: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

*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

Page 6: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

• 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

Page 7: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

*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

Page 8: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

• 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

Page 9: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

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

Page 10: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

• 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

Page 11: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

• 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

Page 12: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

*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

Page 13: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

*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

Page 14: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

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

Page 15: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

– 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

Page 16: Chap.12 Practical Planning CS570 Artificial Intelligence Kwang-hyung Lee

*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