an introduction to artificial intelligence ce 40417
DESCRIPTION
An Introduction to Artificial Intelligence CE 40417. Chapter 12 – Planning and Acting in Real World Ramin Halavati ([email protected]). In which we see how more expressive representations and more interactive agent architectures lead to planners that are useful in real world. Outline. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/1.jpg)
An Introduction to Artificial Intelligence
CE 40417
Chapter 12 – Planning and Acting in Real World
Ramin Halavati ([email protected])
In which we see how more expressive representations and more interactive
agent architectures lead to planners that are useful in real world.
![Page 2: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/2.jpg)
Outline
• Time, Schedules, and Resources
• Hierarchical Task Network Planning
• Planning and Acting in Nondeterministic
Domains
• Multi Agent Planning
![Page 3: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/3.jpg)
Time, Schedules, & Resources
• Basic Planning:
– What to do and in which order?
• Real World:
– What an When to do? + Limited Resources.
– JOB SHOP SCHEDULING
![Page 4: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/4.jpg)
Job Shop Scheduling
![Page 5: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/5.jpg)
Job Shop Scheduling
• How to assign time to a partial order
plan?
![Page 6: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/6.jpg)
Critical Path Method (CPM)
• Forward March:
– Set Earliest Start (ES)
![Page 7: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/7.jpg)
Critical Path Method (CPM)
• Backward March:
– Set Latest Start (LS)
![Page 8: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/8.jpg)
Critical Path Method (CPM)
![Page 9: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/9.jpg)
Limited Resources
• Resources:
– Consumable vs. Reusable.
• Notation:
– Aggregation
– Immediate Effect
– Resource:R(k)
• Requirement / Temporary Effect
![Page 10: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/10.jpg)
Limited Resources
• No General Approach (NP-Hard)
• Just Order the task so that the
requirements are met.
• Heuristic:
– Minimum Slack Algorithm:
• Give more priority to the task with least remaining
slack.
![Page 11: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/11.jpg)
Job Shop Scheduling, One Last Word.
• Separated / Integrated Planning and
Scheduling.
• Semi Automatic
![Page 12: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/12.jpg)
Hierarchical Planning
• Hierarchical Task Network:
– At each “level,” only a small number of
individual planning actions, then descend to
lower levels to “solve these” for real.
– At higher levels, the planner ignores “internal
effects” of decompositions. But these have
to be resolved at some level…
![Page 13: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/13.jpg)
HTN Sample
• Construction Domain:
– Actions:
• Buy Land: Money Land
• Get Load: Good Credit Money
• Get Permit: Land Permit
• Hire Builder: Contract
• Construction: Permit Contract House Built
• Pay Builder: Money House Built House
• …
![Page 14: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/14.jpg)
HTN Sample (cont)
• Macro Action in Library:
– Build House:
![Page 15: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/15.jpg)
HTN Sample (cont)
![Page 16: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/16.jpg)
HTN Sample (cont)
![Page 17: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/17.jpg)
HTN Cons and Pros
• What’s Bad?
– Recursion?
– Sub Task Sharing:
• Enjoy honey moon in Hawaii and raise a family.
• Library: – Enjoy Honey moon in Hawaaii: Get Married , Go to
Hawaii.
– Raise Family: Get Married, Have two children.
![Page 18: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/18.jpg)
HTN Cons and Pros
• What’s Good:
– Almost all real applications are HTN + some
thing else.
– It’s a heuristic to decrease the branching
factor by a great level.
![Page 19: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/19.jpg)
NonDeterministic Domains
• What if we don’t know all about situations
and effects.
• E.g.
– Init: A table and a chair of unknown colors.
– Goal: A table and a chair of the same colors.
– Condition: Painting may have flaws.
![Page 20: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/20.jpg)
Sensorless Planning
• We don’t know all beforehand and we
can’t find it out, even when it is done.
– Plan so that to reach the goal state,
regardless of everything. (Coercion)
– Not always possible.
![Page 21: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/21.jpg)
Conditional Planning
• We can check the state ahead, then
perform the pre-planned program.
– Sense Actions
– Conditional Branches
![Page 22: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/22.jpg)
Conditional Planning in Fully Observable Domains
• Vacuum World:
– Left: AtRight AtLeft AtRight
– Left: AtRight
(AtLeft AtRight) (AtLeft AtRight)
– Suck: when AtLeftCleanLeft
when AtRightCleanRight
– Left: when AtLeft CleanLeft
when AtRightAtLeft AtRight
![Page 23: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/23.jpg)
Notation Expantion:
• Expanding Plan Notation:
– If (state) Then (…) else (…)
– If (AtLeftCleanLeft CleanRight) Then {}
else Suck.
![Page 24: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/24.jpg)
State Space:
![Page 25: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/25.jpg)
Conditional Planner:
![Page 26: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/26.jpg)
Unavoidable Loops in Conditional Planner
• New Notation:
– Instead of just Left : while (AtRight) Left
![Page 27: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/27.jpg)
Partially Observable Domains
![Page 28: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/28.jpg)
Partially Observable Domains
• Easiest Approach:
– Assume set of current states and the next
state sets are created, quite similar to non-
deterministic actions case.
![Page 29: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/29.jpg)
Execution Monitoring and Replanning
• Check if the plan is going on is pre-
decided? If not, replan based on current
situation.
![Page 30: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/30.jpg)
Execution Monitoring & Replanning
• Action Monitoring:• See if current state is as it was supposed, if not,
find a solution to return it to what it was (repair).
![Page 31: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/31.jpg)
• Plan Monitoring:
– See if the previous plan is still wise?
– Serendipity!
– A precondition of future actions has failed
and can not be recovered.
Execution Monitoring & Replanning
![Page 32: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/32.jpg)
Execution Monitoring in Partially Observable Domains
• Things may fail and we don’t know.
• Sensing actions may be required
– And they may need extra-planning.
• We may stuck in futile attempts:
– The electronic key is incorrect, but we think
it might be due to incorrect pushing in.
![Page 33: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/33.jpg)
Continues Planner
• Keep planning, sensing and executing…
– Which is not unlikely, such as maintenance
planning, auto-pilot, plant control, …
![Page 34: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/34.jpg)
Continues Planner
![Page 35: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/35.jpg)
Continues Planner
![Page 36: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/36.jpg)
Continues Planner
![Page 37: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/37.jpg)
Continuous Planner
• POP + …
– Missing Goal:
• A new goal has erupted. Just add it.
– Open precondition:
• An action has lost its support links. Add a new
causal link.
– Causal Conflicts:
• A causal link is suddenly threatened. Choose an
appropriate ordering.
![Page 38: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/38.jpg)
Continuous Planner
• POP + …
– Unsupported Link:
• A link from start to something has suddenly last
its true value. Remove it.
– Redundant Action:
• An action no more produces something needed.
Remove it.
![Page 39: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/39.jpg)
Uncertainty is Over.
![Page 40: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/40.jpg)
Multi Agent Planning
• When there is more than one agent in the
scene.
– Competitive
– Cooperative
• Coordination– Communication
![Page 41: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/41.jpg)
Cooperation
• Multi Body Planning
– One is in charge of all decisions…
• Having the agent as one of parameters:
– Go(R2D3, Right) ^ Go(C3PO,Left).
• Synchronization and Timing…
![Page 42: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/42.jpg)
Cooperation – Multi Body
• Joint Planning:
– Planning using action pairs:
• Exponentially Many Actions: Actions Agents
– Having Concurrent Actions List
• Which actions happen together and which not,
such as orders in POP.
![Page 43: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/43.jpg)
Cooperation - Coordination
• Accepting a prior Convention.
– Everyone drive on his/her right side of the
road.
– Domain Independent:
• Choosing the first feasible action.
• Producing all possible feasible actions and
choosing the one which stands first in alphabetic
order!
![Page 44: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/44.jpg)
Cooperation – Emergence
• Evolutionary Emergent Behavior
– Birds Flocking:
• Separation
• Cohesion
• Alignment
– Ants.
![Page 45: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/45.jpg)
Coop. - Communication
• A short message expressing
– the plan / next step.
• A message expressing the next step.
• Plan Recognition!
![Page 46: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/46.jpg)
Competition
• Minimax + Conditional Planning
![Page 47: An Introduction to Artificial Intelligence CE 40417](https://reader031.vdocuments.mx/reader031/viewer/2022012922/5681454e550346895db21ea1/html5/thumbnails/47.jpg)
Essey & Project Proposals
• To Do.