Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

13
Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee

Transcript of Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

Page 1: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

Chap.13 Planning and Acting

CS570 Artificial Intelligence

Kwang-hyung Lee

Page 2: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

13.1 Conditional Planning

• Contingency planning : incomplete planning by constructing a conditional plan that accounts for each possible situation

• Sensing action:The agent includes sensing actions to find which part of the plan to be execute

13.1 Conditional Planning

Page 3: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

• Ex) “Fixing a flat tire”(1) Possible operators

• Op(ACTION:Remove(x),PRECOND:On(x),EFFECT:Off(x) ClearHub(x) On(x))

• Op(ACTION:PutOn(x),PRECOND:Off(x) ClearHub(x),EFFECT:On(x) ClearHub(x) Off(x))

• Op(ACTION:Inflate(x),PRECOND:Intact(x) Flat(x),EFFECT:Inflated(x) Flat(x))

(2) goal• On(x) Inflated(x)

(3) Initial conditions• Inflated(Spare) Intact(Spare) Off(Spare) On(Tire1) Flat

(Tire1)

13.1 Conditional Planning

Page 4: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

(4) Initial plan• [Remove(Tire1), PutOn(Spare)]

• The initial plan is good if there is no Intact(Tire1). But, if Tire1 is intact, only the inflation is needed

• Conditional stepIf(<condition>,<ThenPart>,<ElsePart>,)

• If(Intact(Tire1),[Inflate(Tire1)],[Remove(Tire1),PutOn(Space)])

• Sensing Actionx,s Tire(x) KnowsWhether(“Intact(x)”,Result(CheckTire(x),

s))

In our action schema format• Op(ACTION:CheckTire(x),

PRECOND:Tire(x),EFFECT:KnowsWhether(“Intact(x)”))

13.1 Conditional Planning

Page 5: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

13.1 Conditional Planning

Page 6: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

• An algorithm for generating conditional plans– ex) Example:”Fixing a flat tire”

• Context :Contexts of steps are essential for keeping track of which steps can establish or violate the preconditions

13.1 Conditional Planning

Page 7: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

• Two open conditions to be resolved– On(x)

– Inflated(x)

• Introduce operator– Inflate(Tire1)

– preconditions Flat(Tire1) and Intact(Tire1)

13.1 Conditional Planning

Page 8: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

• Precondition Intact(Tire1) ?– There is no action that can make it satisfied

• But the action CheckTire(x) allows us to know the truth value of the preconditon conditional step : Sensing action

• We add the CheckTime step to the plan with a conditional link :dotted arrow

13.1 Conditional Planning

Page 9: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

• We add steps for the case where Tire1 is not intact: another Finish action

13.1 Conditional Planning

Page 10: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

• If we add Inflate(Tire1) to the new Finish step, the precondition Intact(Tire1) is inconsistent with Intact(Tire1). Therefore, we link the start step to Inflated step Context is useful, here.

13.1 Conditional Planning

Page 11: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

• We add Remove(Tire1), PutOn(Spare) to satisfy the condition On(Spare)

• But, the Remove(Tire1) can threaten the causal link protecting On(Tire1)

• We resolve the threat by conditioning the step so that its context becomes incompatible with the context of precondition it is threatening.In the example, CheckTire can give Intact(Tire1)

• If we link from CheckTire to Remove(Tire1), then the Remove is no longer a threat

13.1 Conditional Planning

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

13.1 Conditional Planning

Page 13: Chap.13 Planning and Acting CS570 Artificial Intelligence Kwang-hyung Lee.

13.1 Conditional Planning