1/16 planning chapter 11- part1 author: vali derhami
TRANSCRIPT
![Page 1: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/1.jpg)
1/16
Planning
Chapter 11- Part1
Author: Vali Derhami
![Page 2: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/2.jpg)
2/16
Outline
• Search vs. planning
• STRIPS operators
• Forward and backward search algorithms
in planning
![Page 3: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/3.jpg)
3/16
Search vs. Planning
• Consider the task get milk, bananas.• Standard search algorithms seem to fail miserably:
![Page 4: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/4.jpg)
4/16
Search vs. Planning (cont.)
Assume a problem-solving agent using search . . .
♦ Which actions are relevant?
– Our previous state-space definition does not clarify this
♦ What is a good heuristic function?
– Must be provided by a human in each individual case
♦ How to decompose the problem?
– Most real-world problems are nearly decomposable
– But the state-space definition does not reveal any structure of the problem
![Page 5: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/5.jpg)
5/16
What is planning?
• Planning in AI is the problem of finding a sequence of actions to achieve some goals.
• The sequence of actions is the system’s plan which then can be executed.
• Planning requires the following:
– representation of goal to achieve;
– knowledge about what actions can be performed;
– knowledge about state of the world;
to generate a plan to achieve the goal.
![Page 6: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/6.jpg)
6/16
Architecture of a Planner
![Page 7: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/7.jpg)
7/16
Planning Language
• What is a good language?– Expressive enough to describe a wide variety of
problems
– Restrictive enough to allow efficient algorithms to operate on it
Planning algorithm should be able to take advantage of the logical structure of the problem
![Page 8: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/8.jpg)
8/16
STRIPS Language
• STanford Research Institute Problems Solver
• The language of predicate logic to representgoal to be achieved; state of environment; actions available to agent;
![Page 9: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/9.jpg)
9/16
Example: Blocks world
• To represent this environment, need the following predicate names:On(x, y) obj x on top of obj yOnTable(x) obj x is on the tableClear(x) nothing is on top of obj xHolding(x) arm is holding xArmEmpty robot arm is emptyHere is a FOL representation of the blocks world described above:Clear(A)Clear(C) On(A,B) OnTable(B) OnTable(C)
ArmEmpty
![Page 10: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/10.jpg)
10/16
Representation of states and goal
• Representation of States = conjunction of ground and function free literals
مثبت لیترالهای از عطفی گزاره( ترکیت لیترالهای بیشتر اینجا در ای)
– e.g. At(A,B) Clear(C), . . . But not At(A, x) or At(neighbour(A),B)!
closed-world assumption is used, meaning that any conditions that are not mentioned in a state are assumed false.
• Representation of goals: A goal is a particular state– e.g. OnTable(A) OnTable(B) OnTable(C)A state s satisfies a goal g if s contains all the atoms in g (and possibly others)
Rich Famous Miserable satisfies Rich Famous
![Page 11: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/11.jpg)
11/16
Representation of actionsAction(Fly(p, from, to), PRECOND:At(p, from) Plane(p) Airport(from) Airport(to)
Effect: At(p, from) At(p, to)) Each action schema has:
– a name and parameter list– a pre-condition list: conjunction of function-free positive literals, list of facts which must be true for action to be executed;
Any variables in the precondition must also appear in the action's parameter list.
– an effect list: a conjunction of function-free literals describing how the state changes when the action is executed. may be contains: a delete list: list of facts that are no longer true after action is performed (negative literals); an add list: list of facts made true by executing the action. (positive literals)
Each of these may contain variables.
![Page 12: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/12.jpg)
12/16
Applicable actions
An action is applicable in any state satisfying its preconditions
Example: Action(Fly(p, from, to),
PRECOND:At(p, from) Plane(p) Airport(from) Airport(to)
Effect: At(p, from) At(p, to))
• Current State: At(Pi, JFK) At(P2, SFO) Plane(Pi) Plane(P2) Airport(JFK) Airport(SFO) .
={p/Pi, from/JFK, to/SFO} جایگزین تعریف• Thus, the concrete action Fly (Pi, JFK, SFO) is applicable.
![Page 13: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/13.jpg)
13/16
Effect of actions
• Starting in state s, the result of executing an applicable action a is a state s' that is the same as s except thatAny positive literal P in the effect of a is added to s' any negative literal P is removed from s‘ all other atoms do not change their value!
After Fly (Pi, JFK, SFO), • current state:
At(Pi, SFO) At(P2, SFO) Plane(Pi) Plane(P2) Airport(JFK) Airport(SFO) .
![Page 14: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/14.jpg)
14/16
Expressiveness and extensions
![Page 15: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/15.jpg)
15/16
Air cargo transport
In(c, p) means that cargo c is inside plane p, and At(x, a) means that object x (either plane or cargo) is at airport a.
![Page 16: 1/16 Planning Chapter 11- Part1 Author: Vali Derhami](https://reader035.vdocuments.us/reader035/viewer/2022081808/5697bff41a28abf838cbcee3/html5/thumbnails/16.jpg)
16/16
Air cargo transport (Cont.)
• Following plan is a solution to the problem: [Load(C1, P1, SFO), Fly(P1, SFO, JFK), Unload(C1,P1, JFK),Load(C2, P2, JFK), Fly(P2, JFK, SFO), Unload(C2, P2, SFO)] .