cs325artificialintelligence ch.11,advancedplanninggünay ch. 11, advanced planning spring 2013 5 /...

34
CS325 Artificial Intelligence Ch. 11, Advanced Planning Cengiz Günay, Emory Univ. Spring 2013 Günay Ch. 11, Advanced Planning Spring 2013 1 / 12

Upload: others

Post on 09-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

CS325 Artificial IntelligenceCh. 11, Advanced Planning

Cengiz Günay, Emory Univ.

Spring 2013

Günay Ch. 11, Advanced Planning Spring 2013 1 / 12

Page 2: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Advanced Planning Concepts

This lecture:Time: Scheduling

Resources: ConsumablesActive perception: Look and feel?Hierarchical plans: Abstracting

Günay Ch. 11, Advanced Planning Spring 2013 2 / 12

Page 3: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Advanced Planning Concepts

This lecture:Time: Scheduling

Resources: Consumables

Active perception: Look and feel?Hierarchical plans: Abstracting

Günay Ch. 11, Advanced Planning Spring 2013 2 / 12

Page 4: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Advanced Planning Concepts

This lecture:Time: Scheduling

Resources: ConsumablesActive perception: Look and feel?

Hierarchical plans: Abstracting

Günay Ch. 11, Advanced Planning Spring 2013 2 / 12

Page 5: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Advanced Planning Concepts

This lecture:Time: Scheduling

Resources: ConsumablesActive perception: Look and feel?Hierarchical plans: Abstracting

Günay Ch. 11, Advanced Planning Spring 2013 2 / 12

Page 6: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Entry/Exit Surveys

Exit survey: Game TheoryWhy don’t we take the mixed strategy if there is a dominant strategy?What advantage is gained by a player by looking irrational?

Entry survey: Advanced Planning (0.25 points of final grade)Do you think a classical planning planning approach can be used forsolving scheduling problems?What would be the advantage of making hierarchical plans?

Günay Ch. 11, Advanced Planning Spring 2013 3 / 12

Page 7: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

I’m Late Again!

Fixed times for day start and classDurations

Wake up:10 minutesEat: 30 minutes

Start (8am) Wake up Eat Class (10am)

Earliest and latest start times of each event?

Earliest(Wake up)=8amLatest(Wake up)=?Earliest(Eat)=?Latest(Eat)=10:00−00:30=9:30am

Günay Ch. 11, Advanced Planning Spring 2013 4 / 12

Page 8: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

I’m Late Again!

Fixed times for day start and classDurations

Wake up:10 minutesEat: 30 minutes

Start (8am) Wake up Eat Class (10am)

Earliest and latest start times of each event?

Earliest(Wake up)=8amLatest(Wake up)=?Earliest(Eat)=?Latest(Eat)=10:00−00:30=9:30am

Günay Ch. 11, Advanced Planning Spring 2013 4 / 12

Page 9: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

I’m Late Again!

Fixed times for day start and classDurations

Wake up:10 minutesEat: 30 minutes

Start (8am) Wake up Eat Class (10am)

Earliest and latest start times of each event?

Earliest(Wake up)=8amLatest(Wake up)=?Earliest(Eat)=?Latest(Eat)=10:00−00:30=9:30am

Günay Ch. 11, Advanced Planning Spring 2013 4 / 12

Page 10: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Multiple Paths to Finish: Car with 2 Engines

Critical path?

AddEngine1

AddWheels1

Inspect1

AddWheels2

Inspect2AddEngine2

0 10 20 30 40 50 60 70 80 90

Start

[0,0]

AddEngine130

[ 0, 15]

AddWheels130

[ 30, 45]

10Inspect1

[60,75]

Finish

[85,85]

10Inspect2

[75,75]

15AddWheels2

[60,60]

60AddEngine2

[0,0]

Earliest(Start)=0Earliest(B)=maxA→B Earliest(A) + Duration(A)Latest(A)=maxA←B Latest(B)− Duration(A)Latest(Finish)=Earliest(Finish)

Günay Ch. 11, Advanced Planning Spring 2013 5 / 12

Page 11: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Multiple Paths to Finish: Car with 2 Engines

AddEngine1

AddWheels1

Inspect1

AddWheels2

Inspect2AddEngine2

0 10 20 30 40 50 60 70 80 90

Start

[0,0]

AddEngine130

[ 0, 15]

AddWheels130

[ 30, 45]

10Inspect1

[60,75]

Finish

[85,85]

10Inspect2

[75,75]

15AddWheels2

[60,60]

60AddEngine2

[0,0]

Earliest(Start)=0Earliest(B)=maxA→B Earliest(A) + Duration(A)Latest(A)=maxA←B Latest(B)− Duration(A)Latest(Finish)=Earliest(Finish)

Günay Ch. 11, Advanced Planning Spring 2013 5 / 12

Page 12: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Multiple Paths to Finish: Car with 2 Engines

Start

[0,0]

AddEngine130

[ 0, 15]

AddWheels130

[ 30, 45]

10Inspect1

[60,75]

Finish

[85,85]

10Inspect2

[75,75]

15AddWheels2

[60,60]

60AddEngine2

[0,0]

Earliest(Start)=0Earliest(B)=maxA→B Earliest(A) + Duration(A)Latest(A)=maxA←B Latest(B)− Duration(A)Latest(Finish)=Earliest(Finish)

Günay Ch. 11, Advanced Planning Spring 2013 5 / 12

Page 13: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Resources: Can We Use Action Schemas?

Will it reach the goal? No, one nut is missing.Depth first tree search: how many paths to eval?

Small: 1, 4, 5 ?Medium: 4+ 5 or 4× 5 ?

Large: 4!, 5!, or 4!× 5! ?

Günay Ch. 11, Advanced Planning Spring 2013 6 / 12

Page 14: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Resources: Can We Use Action Schemas?

Will it reach the goal?

No, one nut is missing.Depth first tree search: how many paths to eval?

Small: 1, 4, 5 ?Medium: 4+ 5 or 4× 5 ?

Large: 4!, 5!, or 4!× 5! ?

Günay Ch. 11, Advanced Planning Spring 2013 6 / 12

Page 15: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Resources: Can We Use Action Schemas?

Will it reach the goal? No, one nut is missing.

Depth first tree search: how many paths to eval?Small: 1, 4, 5 ?

Medium: 4+ 5 or 4× 5 ?Large: 4!, 5!, or 4!× 5! ?

Günay Ch. 11, Advanced Planning Spring 2013 6 / 12

Page 16: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Resources: Can We Use Action Schemas?

Will it reach the goal? No, one nut is missing.Depth first tree search: how many paths to eval?

Small: 1, 4, 5 ?Medium: 4+ 5 or 4× 5 ?

Large: 4!, 5!, or 4!× 5! ?Günay Ch. 11, Advanced Planning Spring 2013 6 / 12

Page 17: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Resources: Can We Use Action Schemas?

Will it reach the goal? No, one nut is missing.Depth first tree search: how many paths to eval?

Small: 1, 4, 5 ?Medium: 4+ 5 or 4× 5 ?

Large: 4!, 5!, or 4!× 5! . Really inefficient!Günay Ch. 11, Advanced Planning Spring 2013 6 / 12

Page 18: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Modify Action Schemas to Optimize Resource Problems

No need to try combinations of same resources.

Define:Resources: Specify quantity.

Use: Specifyrequirement.

Consume: Removes resource.

No exponential explotion anymore!

Günay Ch. 11, Advanced Planning Spring 2013 7 / 12

Page 19: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Modify Action Schemas to Optimize Resource Problems

No need to try combinations of same resources.

Define:Resources: Specify quantity.

Use: Specifyrequirement.

Consume: Removes resource.

No exponential explotion anymore!

Günay Ch. 11, Advanced Planning Spring 2013 7 / 12

Page 20: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Modify Action Schemas to Optimize Resource Problems

No need to try combinations of same resources.

Define:Resources: Specify quantity.

Use: Specifyrequirement.

Consume: Removes resource.

No exponential explotion anymore!

Günay Ch. 11, Advanced Planning Spring 2013 7 / 12

Page 21: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Hierarchical Planning: Abstraction

Remember Stanley:

High-level goal:

Reach target at GPScoordinatesDrive on road

Low-level actions:

Adjust steering wheelPress/release gas/breakpedals

How to connect1 high-level (abstract) planning with2 low-level planning?

Solution: Refinement

Günay Ch. 11, Advanced Planning Spring 2013 8 / 12

Page 22: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Hierarchical Planning: Abstraction

Remember Stanley:

High-level goal:

Reach target at GPScoordinatesDrive on road

Low-level actions:

Adjust steering wheelPress/release gas/breakpedals

How to connect1 high-level (abstract) planning with2 low-level planning?

Solution: Refinement

Günay Ch. 11, Advanced Planning Spring 2013 8 / 12

Page 23: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Hierarchical Planning: Abstraction

Remember Stanley:

High-level goal:

Reach target at GPScoordinatesDrive on road

Low-level actions:

Adjust steering wheelPress/release gas/breakpedals

How to connect1 high-level (abstract) planning with2 low-level planning?

Solution: Refinement

Günay Ch. 11, Advanced Planning Spring 2013 8 / 12

Page 24: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Refining Abstractions

Multiple ways to refine abstractions:

Günay Ch. 11, Advanced Planning Spring 2013 9 / 12

Page 25: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Hierarchical Planning: Reachable States

Reachable?

No.

Found solution:

Now backtrack fromsolution.

Günay Ch. 11, Advanced Planning Spring 2013 10 / 12

Page 26: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Hierarchical Planning: Reachable States

Reachable?

No.

Found solution:

Now backtrack fromsolution.

Günay Ch. 11, Advanced Planning Spring 2013 10 / 12

Page 27: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Hierarchical Planning: Reachable States

Reachable?

No.

Found solution:

Now backtrack fromsolution.

Günay Ch. 11, Advanced Planning Spring 2013 10 / 12

Page 28: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Hierarchical Planning: Reachable States

Reachable?

No.

Found solution:

Now backtrack fromsolution.

Günay Ch. 11, Advanced Planning Spring 2013 10 / 12

Page 29: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Reachable States Question

Estimates of refinement:Underestimate: We reach it for sure.Overestimate: Possibly reachable.Below examples:

Reachable? Yes, No, Maybe?

No Yes. Maybe.

Günay Ch. 11, Advanced Planning Spring 2013 11 / 12

Page 30: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Reachable States Question

Estimates of refinement:Underestimate: We reach it for sure.Overestimate: Possibly reachable.Below examples:

Reachable? Yes, No, Maybe?

No Yes.

Maybe.

Günay Ch. 11, Advanced Planning Spring 2013 11 / 12

Page 31: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Reachable States Question

Estimates of refinement:Underestimate: We reach it for sure.Overestimate: Possibly reachable.Below examples:

Reachable? Yes, No, Maybe?

No Yes.

Maybe.

Günay Ch. 11, Advanced Planning Spring 2013 11 / 12

Page 32: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Reachable States Question

Estimates of refinement:Underestimate: We reach it for sure.Overestimate: Possibly reachable.Below examples:

Reachable? Yes, No, Maybe?

No Yes. Maybe.

Günay Ch. 11, Advanced Planning Spring 2013 11 / 12

Page 33: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Extending Planning with Observations

Sometimes the agent needs to look first.

Günay Ch. 11, Advanced Planning Spring 2013 12 / 12

Page 34: CS325ArtificialIntelligence Ch.11,AdvancedPlanningGünay Ch. 11, Advanced Planning Spring 2013 5 / 12 MultiplePathstoFinish: Carwith2Engines AddEngine1 AddWheels1 Inspect1 AddWheels2

Extending Planning with Observations

Sometimes the agent needs to look first.

Günay Ch. 11, Advanced Planning Spring 2013 12 / 12