SlideShare a Scribd company logo
1 of 76
PLANNING
Amar Jukuntla
Planning Agent
environment
agent
?
sensors
actuators
A1 A2 A3
Purpose of Planning
• The purpose of planning is to find a sequence of actions that achieves
a given goal when performed starting in a given state.
• In other words, given a set of operator instances (defining the possible
primitive actions by the agent), an initial state description, and a goal
state description or predicate, the planning agent computes a plan.
Start
Final
Operator
Instances PLAN
What is Plan?
• The task of coming up with a sequence of actions that will achieve a
goal is called Planning.
• Planning Problems so far:
• search-based problem solving
• logical planning
• Consider only environment that are fully observable, deterministic,
finite, static (change happens only when the agent acts), and
discrete (in time, action, objects and effects). These are called
Classical Planning.
Continue…
• Non classical planning is for partially observable or stochastic
environments and involves a different set of algorithms and agent
designs.
Problem Solving Agent + Knowledge Based Agent = Planning Agent
Why Planning
• Intelligent agents must operate in the world.
• Take intelligent actions
• Compose actions together to achieve complex goals
• Change the world to suit the needs. Agents need to reason
about what the world will be like after executing a sequence
of actions
• Need to reason about dynamic environment
Planning Algorithm
• Generate a goal to achieve
• Construct a plan to achieve goal from current
state
• Execute plan until finished
• Begin again with new goal
The language Planning Problems
• Planning algorithms should take advantage of the logical structure of
the problem.
• The key is to find a language that is expressive enough to describe a
wide variety problems, but restrictive enough to allow efficient
algorithms to operate over it.
• The problem should be expressed in a suitable logical language.
• Planning is considered different from problem solving because of the
difference in the way they represent states, goals, actions, and the
differences in the way they construct action sequences.
Continue…
• Representation of states
• Planners decompose the world into logical conditions and represent a state as conjunction of positive
literals
• Example; prepositional logic P V Q
• Representation of goals
• A goal is partially specified state, represented as a conjunction of positive ground literals, such as 𝐏 ∧Q.
A propositional state s satisfies a goal g if s contains all the atoms in g.
• Example; P∧ 𝑸 ∧R satisfies the goal 𝐏 ∧Q
• Representation of actions
• An action is specified in terms of the pre conditions that must hold before it can be executed and the
effects that ensue when it is executed.
• Example: Action(Fly(p,From,To),
PRECOND: At(p, from) ∧ Plane(p) ∧ Airport(from) ∧ Airport(to),
EFFECT: ~At(p,from) ∧ At(p,to))
Continue…
• This is called an action schema, meaning that it represents a
number of different actions that can be derived by
instantiating the variables p, from and to to different
constants. In general action schema consists of three parts:
• The action name and parameter list
• The precondition is a conjunction of function-free positive literals
stating what must be true in state before the actions can be
executed.
• The effect is a conjunction of function-free literals describing how
the state changes when the action is executed.
Continue…
• To improve the readability, some planning systems divide the effect
into the add list for positive literals and delete list for negative
literals.
• If an action is applicable in any state that satisfies the precondition;
otherwise, the action has no effect.
• Example; Action(Fly(p,From,To),
PRECOND: At(p, from) ∧ Plane(p) ∧ Airport(from) ∧ Airport(to),
EFFECT: ~At(p,from) ∧ At(p,to))
• Starting in state s, the result of executing an applicable action a is a
state s` that is the same as s except
A Planning Problem
• Goal :
• Have a birthday party
• Current situation:
• Agent at home, has flour, Does not have butter, Does not have
sugar.
• To Do:
• Invite friends, Buy butter, Buy sugar, Buy balloons, Decorate
house, Bake cake ….
Example: Shopping
• Start
• At(Home) ^ Sells(SM,Milk) ^ Sells(SM,Banana) ^
Sells(HWS,Drill)^Loc(Home)^Loc(SM)^Loc(HWS)
• Buy(x)
• PRE: At(store), Sells(store, x)
• EFF: Have(x)
• Go(x, y)
• PRE: At(x),Loc(y)
• EFF: At(y),¬At(x)
• Goal
• Have(Milk) ^ Have(Banana) ^ Have(Drill)
Solution
• Initial state : At(Home) / -Have(Milk) / -Have(Bananas) / -Have(Drill) /
...
• A state description does not have to be complete. We just want to obtain a
successful plan to a set of possible complete states. But if it does not
mention a given positive literal, then the literal can be assumed to be false.
• Goals are a conjunction of literals. Therefore the goal is
At(Home) / Have(Milk) / Have(Bananas) / Have(Drill)
• Goals can also contain variables. Being at a store that sells milk is
equivalent to
At(x) / Sells(x,Milk)
Continue…
• Operator Schema: an operator with variables.
• it is a family of actions, one for each of the different values of the variables.
• every variable must have a value
• Preconditions and Effects are restrictive. Operator o is applicable in a state s
if every one of the preconditions in o are true in s. An example is if the
initial situation includes the literals
At(Home, Path(Home, Supermarket)...
• then the action Go(Supermarket) is applicable, and the resulting situation
contains the literals
-At(Home),At(Supermarket), Path(Home, Supermarket)...
• The result is all positive literals in Effect(o) hold, all literals in s hold and
negative literals in Effect(o) are ignored.
Example
• "Get a quart of milk and a bunch of
bananas and a variable speed cordless
drill" for a problem solving exercise we
need to specify:
• Initial State: the agent is at home without
any objects that he is wanting.
• Operator Set: everything the agent can do.
• Heuristic function: the # of things that
have not yet been acquired.
Solution
• Planning emphasizes what is in operator and goal
representations. There are three key ideas behind planning:
• to "open up" the representations of state, goals, and operators so
that a reasoner can more intelligently select actions when they are
needed
• the planner is free to add actions to the plan wherever they are
needed, rather than in an incremental sequence starting at the initial
state
• most parts of the world are independent of most other parts which
makes it feasible to take a conjunctive goal and solve it with a
divide-and-conquer strategy
Another
Example: Box
World
A B
C C
B
A
Continue…
• Initial State:
• ontable(A) Λ 𝑜𝑛𝑡𝑎𝑏𝑙𝑒(𝐵)Λon(C,B) Λclear(A) Λ
• Goal State:
• ontable(B) Λon(C,B) Λ 𝑜𝑛 𝐴, 𝐶 Λclear(A) Λ
Description
Another
Example: Box
World
A B
C
C
B
A
A B
C
A B C
A
B
C
A
B
C
Operations
•Op{Action: unstack(C,B)}
•Op{Action: pickup(B)}
•Op{Action: stack(B,C)}
•Op{Action: pickup(A)}
•Op{Action: stack(A,B)}
A B
C
A B C
A
B
C
A
B
C
Planning with state space search
•Planning as Search:
•There are two main approaches to solving planning
problems, depending on the kind of search space
that is explored:
1.Situation-space search
2.Planning-space search
Situation-Space Search
• In situation space search
• The search space is the space of all possible states or situations of
the world
• Initial state defines one node
• A goal node is a state where all goals in the goal state are satisfied
• A solution plan is the sequence of actions (e.g. operator instances)
in the path from the start node to a goal node
START
Finish
Pickup(A)
Unstack(C,B)
Putdown(A)
Stack(A,C)
Stack(C,A)
Stack(C,B)
A B
C
A B C
A
B
C
A
B
C
Planning-space search
• The search space is the space of all possible plans
• A node corresponds to a partial plan
• Initially we will specify an "initial plan" which is one node in this
space
• A goal node is a node containing a plan which is complete, satisfying
all of the goals in the goal state
• The node itself contains all of the information for determining a
solution plan (e.g. sequence of actions)
Start
Pickup(A) Stack(A,C)
Finish
Handempty
Holding(A)
On(A,C)
Situation Planning
Situation Planning Algorithms
•There are 2 approaches to situation-space planning:
1. Progression situation-space planning
2. Regression situation-space planning
Progression(Forward) situation-space planning
• Forward search through the space of states, starting from the initial
state and using the problem’s actions until the member of goal states
are found.
• You can use any search method you like (i.e. BFS, DFS, A*)
• Since the forward search is prone to exploring unrelated nodes, and
tend to have many state spaces, it has been regarded as inefficient
without the help of accurate heuristics.
Disadvantage: huge search space to explore, so usually very inefficient
Continue…
• Algorithm:
1. Start from initial state
2. Find all operators whose preconditions are true in the
initial state
3. Compute effects of operators to generate successor
states
4. Repeat steps #2-#3 until a new state satisfies the goal
conditions
Regression (Backward) situation-space planning
• Backward search through the relevant states, starting from the goal
state, to the initial state using the inverse of actions.
• Backward-chaining from goal state to initial state
• Regression situation-space planning is usually more efficient than
progression because many operators are applicable at each state, yet
only a small number of operators are applicable for achieving a given
goal
• Hence, regression is more goal-directed than progression situation-
space planning.
Disadvantage: cannot always find a plan even if one exists!
Continue…
• Algorithm:
1. Start with goal node corresponding to goal to be
achieved
2. Choose an operator that will add one of the goals
3. Replace that goal with the operator's preconditions
4. Repeat steps #2-#3 until you have reached the initial
state
Heuristics planning
•We can derive an admissible heuristics by
defining a relaxed problem.
•There are two ways to make the problem easier:
by adding more edges to the graph making it
easier to find the path or by forming an
abstraction of state space that has fewer states.
Continue…
• Neither progression or regression are very efficient without a
good heuristic.
• How many actions are needed to achieve the goal?
• Exact solution is NP hard, find a good estimate
• Two approaches to find admissible heuristic:
• The optimal solution to the relaxed problem.
• Remove all preconditions from actions
• The subgoal independence assumption:
The cost of solving a conjunction of subgoals is approximated by the sum of the costs of solving the
subproblems independently.
Total-order Plan
Finish
Start Start Start Start Start Start
Left
Shoe
RightSh
oe
Left
Sock
Finish Finish Finish Finish Finish
Left
Sock
Left
Sock
Left
Sock
Right
Sock
Right
Sock
Right
Sock
Left
Sock
Right
Shoe
Right
Sock
Right
Sock
Left
Shoe
Left
Shoe
Left
Sock
RightSh
oe
RightSh
oe
RightSo
ck
RightSh
oe
Left
Shoe
Left
Shoe
Left
Shoe
Right
Shoe
Planning-space search
Partial-Order Planning
• Progression and regression planning are totally ordered plan
search forms.
• They cannot take advantage of problem decomposition.
• Decisions must be made on how to sequence actions on all the subproblems
• Least commitment strategy:
• Delay choice during search
Continue…
• Partially ordered collection of steps with
• Start step has the initial state description as its effect
• Finish step has the goal description as its precondition causal links from
outcome of one step to precondition of another
• temporal ordering between pairs of steps
• Open condition = precondition of a step not yet causally linked
• A plan is complete iff every precondition is achieved
• A precondition is achieved iff it is the effect of an earlier step and no
possibly intervening step undoes it
Continue…
• Partially Ordered Plans:
• no strict sequence
• partly parallel
• observe threats
Shoe & Sock
• Any planning algorithm
that can place two actions
into a plan without which
comes first is a PO plan.
Continue…
• Start with a rough plan and refine iteratively.
• First plan consists only of start and finish actions:
 start - T as precondition, initial world state as effect
 finish - goal as precondition, NIL as effect
• Select actions to achieve sub-goals separately, quasi in parallel  partial-
order plan
• Fulfill open preconditions (sub-goals), until no more unsatisfied
preconditions are left (last one is T of start)
Continue…
 Add causal links to connect effects from actions to matching
preconditions for plan, e.g.
 move(A,B,x) has effect clear(B)
 clear(B) is precondition for move(B,y,z)
 Causal links specify a partial order.
Continue…
 Recognize threats - the effect of an action A destroys the precondition of
another action B, e.g.
 move(A,x,B) destroys clear(B) (in DELETE-list)
 clear(B) is precondition for move(B,y,z)
 thus, move(B,Fl,C) has to be done before move (A,Fl,B)
 Add threats as partial order to plan: b<a (do b before a).
POP-Algorithm
• In essence, the POP algorithm is the following:
1.Make the initial plan, i.e. the one that contains only
the Start and Finish steps.
2.Do until you have a solution plan
• Take an unachieved precondition from the plan; achieve it
• Resolve any threats using promotion or demotion
Another Example
• At(Home)
• Sells(SM, Banana)
• Sells(HS, Drill)
• Have(Drill)
• Have(Milk)
• Have(Banana)
Get a quart of milk and a bunch of bananas and a variable speed
cordless drill
Partial Order Planning
Start
End
Buy(Banana) Buy(Milk) Buy(Drill)
At(Home) Have(Banana) Have(Milk) Have(Drill)
Causal links
At(Home)
Start
End
Buy(Banana) Buy(Milk) Buy(Drill)
At(Home) Have(Banana) Have(Milk) Have(Drill)
At(s) At(s) At(s) Sells(s,Drill)Sells(s,Milk)Sells(s,Banana)
NB: all causal links
are also ordering links
Ordering links
Causal links
At(Home)
Start
End
Buy(Banana) Buy(Milk) Buy(Drill)
At(Home) Have(Banana) Have(Milk) Have(Drill)
At(SM) At(SM) At(HWS) Sells(HWS,Drill)Sells(SM,Milk)Sells(SM,Banana)
NB: all causal links
are also ordering links
Causal links
At(Home)
Start
End
Buy(Banana) Buy(Milk) Buy(Drill)
At(Home) Have(Banana) Have(Milk) Have(Drill)
Go(SM) Go(HWS)
At(s) At(s)
At(SM) At(SM) At(HWS) Sells(HWS,Drill)Sells(SM,Milk)Sells(SM,Banana)
At(Home)
Start
End
Buy(Banana) Buy(Milk) Buy(Drill)
At(Home) Have(Banana) Have(Milk) Have(Drill)
Go(SM) Go(HWS)
At(Home) At(Home)
At(SM) At(SM) At(HWS) Sells(HWS,Drill)Sells(SM,Milk)Sells(SM,Banana)
At(Home)
Threats to Causal Links
Start
End
Buy(Banana) Buy(Milk) Buy(Drill)
At(Home) Have(Banana) Have(Milk) Have(Drill)
Go(SM) Go(HWS)
At(Home) At(Home)
At(SM) At(SM) At(HWS) Sells(HWS,Drill)Sells(SM,Milk)Sells(SM,Banana)
At(Home)
Threats to Causal Links: Demotion
Start
End
Buy(Banana) Buy(Milk) Buy(Drill)
At(Home) Have(Banana) Have(Milk) Have(Drill)
Go(SM) Go(HWS)
At(HWS) At(Home)
At(SM) At(SM) At(HWS) Sells(HWS,Drill)Sells(SM,Milk)Sells(SM,Banana)
Go(Home)
At(SM)
At(Home)
Planning Graphs
Planning graphs
• GraphPlan is an algorithm based on planning graph
• Planning graphs are also used as a source of heuristics (an estimate of
how many steps it takes to reach the goal)
• Planning graph is an approximation of a complete tree of all possible
actions and their results
Planning graphs work only for propositional planning problems—ones with no variables.
Continue…
• Planning graph is organized into levels
• Level S0: initial state, consisting of nodes representing each fluent
that holds in S0
• Level A0: each ground action that might be applicable in S0
Then alternate Si and Ai
• Si contains fluent which could hold at time i, (may be both P and ¬P);
literals may show up too early but never too late
• Ai contains actions which could have their preconditions satisfied at i
Mutex
•A mutex between two actions indicates that it is
impossible to perform these actions in parallel.
•A mutex between two literals indicates that it is
impossible to have these both literals true at this
stage.
Continue…
• Actions
• Inconsistent effects: two actions that lead to inconsistent effects
• Interference: an effect of the first action negates the precondition of the other
action
• Competing needs: a precondition of the first action is mutually exclusive with
a precondition of the second action.
• Literals
• one literal is the negation of the other one
• Inconsistency support: each pair of action archiving the two literals are
mutually exclusive.
How to compute mutexes
• Inconsistent effects: one action negates an effect of the other.
• For example, Eat (Cake) and the persistence of Have(Cake) have inconsistent
effects because they disagree on the effect Have(Cake).
• Interference: one of the effects of one action is the negation of a
precondition of the other.
• For example Eat (Cake) interferes with the persistence of Have(Cake) by
negating its precondition.
• Competing needs: one of the preconditions of one action is mutually
exclusive with a precondition of the other.
• For example, Bake(Cake) and Eat (Cake) are mutex because they compete on
the value of the Have(Cake) precondition.
Inconsistent effect
Mutex
Effect
Effect
¬P
A1 A2
P
Interference
Mutex
PreCond
Effect
¬P
A1 A2
P
Competing Needs
Mutex
PreCond
A1 A2
P
PreCond
P1Mutex
Example
• Init(Have(Cake))
• Goal(Have(Cake)⋀𝐸𝑎𝑡𝑒𝑛(𝐶𝑎𝑘𝑒))
• Action(Eat(Cake), PRECON: Have(Cake),
EFFECT: ¬Have(Cake)⋀𝐸𝑎𝑡𝑒𝑛(𝐶𝑎𝑘𝑒))
• Action(Bake(Cake), PRECOND: ¬Have(Cake),
EFFECT: Have(Cake))
The planning graph for the “have cake and eat cake too”
Solution
Actions persistence actionspreconditions and effects Mutex
two actions that lead to inconsistent effects
Continue…
• Start at level S0 and determine action level A0 and next level S1.
• A0 >> all actions whose preconditions are satisfied in the previous level.
• Connect precondition and effect of action S0S1.
• Level A0 contains the actions that could occur
• Conflicts between actions are represented by mutex lines (curved lines)
• Level S1 contains all literals that could result from picking any subset of
actions in A0
• Conflicts between literals that cannot occur together are reprented by mutex links.
• S1 defines multiple states and the mutex links are the constraints that define this set
of states.
• Continue until two consecutive levels are identical: leveled off
• Or contain the same amount of literals
Termination
•PG are monotonically increasing
or decreasing:
•Literals increase monotonically
•Actions increase monotonically
•Mutexes decrease monotonically
Dinner Date Example by Dana Nau
• Suppose you want to prepare dinner as a surprise for your sweetheart
(who is asleep)
• S0 ={garbage, cleanHands, quiet}
• G={dinner, present, ¬garbage}
Planning with
Propositional logic
Why SAT?
• We can convert the planning problem into a Boolean satisfiability
problem and solve it by using SAT solvers.
• SAT solvers which could handle very large satisfiability problem
instances and they could solve them very quickly.
Introduction
• The planning problem is translated into a CNF satisfiability
problem.
• The goal is asserted to hold at time step T, and clauses are included for
each time step up to T.
• If the clauses are satisfiable, then a plan extracted by examining the
actions that are true.
• Otherwise, we increment T and repeat.
Analysis with planning
approaches
References
http://www.jennyleestat.com/project/pddl/
Artificial Intelligence: A Modern Approach, 3rd
Ed, S. Russel and P. Norvig (2010)
MIT OpenCourseWare lecture on GraphPlan
and making planning graphs
https://nptel.ac.in/courses/106105078/24

More Related Content

What's hot

Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms Syed Ahmed
 
Planning in AI(Partial order planning)
Planning in AI(Partial order planning)Planning in AI(Partial order planning)
Planning in AI(Partial order planning)Vicky Tyagi
 
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfJenishaR1
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsNuruzzaman Milon
 
State Space Search in ai
State Space Search in aiState Space Search in ai
State Space Search in aivikas dhakane
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchTekendra Nath Yogi
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}FellowBuddy.com
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligencesandeep54552
 
State space search
State space searchState space search
State space searchchauhankapil
 
AI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAsst.prof M.Gokilavani
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AIKirti Verma
 
AI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptxAI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptxAsst.prof M.Gokilavani
 
Production System in AI
Production System in AIProduction System in AI
Production System in AIBharat Bhushan
 

What's hot (20)

Artificial Intelligence -- Search Algorithms
Artificial Intelligence-- Search Algorithms Artificial Intelligence-- Search Algorithms
Artificial Intelligence -- Search Algorithms
 
Planning in AI(Partial order planning)
Planning in AI(Partial order planning)Planning in AI(Partial order planning)
Planning in AI(Partial order planning)
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
 
Artificial intelligence- Logic Agents
Artificial intelligence- Logic AgentsArtificial intelligence- Logic Agents
Artificial intelligence- Logic Agents
 
State Space Search in ai
State Space Search in aiState Space Search in ai
State Space Search in ai
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
 
Agent architectures
Agent architecturesAgent architectures
Agent architectures
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
 
Problems, Problem spaces and Search
Problems, Problem spaces and SearchProblems, Problem spaces and Search
Problems, Problem spaces and Search
 
Classical Planning
Classical PlanningClassical Planning
Classical Planning
 
State space search
State space searchState space search
State space search
 
AI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptx
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AI
 
Planning Agent
Planning AgentPlanning Agent
Planning Agent
 
AI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptxAI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptx
 
Informed search
Informed searchInformed search
Informed search
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
 

Similar to Planning

Similar to Planning (20)

AI_Planning.pdf
AI_Planning.pdfAI_Planning.pdf
AI_Planning.pdf
 
CH4_AI_Lecture.ppt
CH4_AI_Lecture.pptCH4_AI_Lecture.ppt
CH4_AI_Lecture.ppt
 
Goal stack planning.ppt
Goal stack planning.pptGoal stack planning.ppt
Goal stack planning.ppt
 
21CSC206T_UNIT 5.pptx artificial intelligence
21CSC206T_UNIT 5.pptx artificial intelligence21CSC206T_UNIT 5.pptx artificial intelligence
21CSC206T_UNIT 5.pptx artificial intelligence
 
AI Lesson 22
AI Lesson 22AI Lesson 22
AI Lesson 22
 
Lesson 22
Lesson 22Lesson 22
Lesson 22
 
Problem solving in Artificial Intelligence.pptx
Problem solving in Artificial Intelligence.pptxProblem solving in Artificial Intelligence.pptx
Problem solving in Artificial Intelligence.pptx
 
AI_unit IV Full Notes.pdf
AI_unit IV Full Notes.pdfAI_unit IV Full Notes.pdf
AI_unit IV Full Notes.pdf
 
Artificial intelligence(04)
Artificial intelligence(04)Artificial intelligence(04)
Artificial intelligence(04)
 
AI-03 Problems State Space.pptx
AI-03 Problems State Space.pptxAI-03 Problems State Space.pptx
AI-03 Problems State Space.pptx
 
15_Planninsjsjsjsjajahajahahatayayyaauua
15_Planninsjsjsjsjajahajahahatayayyaauua15_Planninsjsjsjsjajahajahahatayayyaauua
15_Planninsjsjsjsjajahajahahatayayyaauua
 
Slides15
Slides15Slides15
Slides15
 
Lecture 3 problem solving
Lecture 3   problem solvingLecture 3   problem solving
Lecture 3 problem solving
 
chapterThree.pptx
chapterThree.pptxchapterThree.pptx
chapterThree.pptx
 
RPT_AI-06_A_Planning Intro.ppt
RPT_AI-06_A_Planning Intro.pptRPT_AI-06_A_Planning Intro.ppt
RPT_AI-06_A_Planning Intro.ppt
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
ProblemSolving(L-2).pdf
ProblemSolving(L-2).pdfProblemSolving(L-2).pdf
ProblemSolving(L-2).pdf
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
Planing presentation
Planing presentationPlaning presentation
Planing presentation
 
Reinforcement learning, Q-Learning
Reinforcement learning, Q-LearningReinforcement learning, Q-Learning
Reinforcement learning, Q-Learning
 

More from Amar Jukuntla (19)

Singly linked list
Singly linked listSingly linked list
Singly linked list
 
Types of files
Types of filesTypes of files
Types of files
 
Hashing
HashingHashing
Hashing
 
Unit 2
Unit 2Unit 2
Unit 2
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
 
Intelligent Agents
Intelligent Agents Intelligent Agents
Intelligent Agents
 
Introduction
IntroductionIntroduction
Introduction
 
DFS
DFSDFS
DFS
 
Sorting
SortingSorting
Sorting
 
Sorting
SortingSorting
Sorting
 
Nature of open source
Nature of open sourceNature of open source
Nature of open source
 
Linux Directory System: Introduction
Linux Directory System: IntroductionLinux Directory System: Introduction
Linux Directory System: Introduction
 
Introduction to Data Structures
Introduction to Data StructuresIntroduction to Data Structures
Introduction to Data Structures
 
Learning
LearningLearning
Learning
 
First Order Logic resolution
First Order Logic resolutionFirst Order Logic resolution
First Order Logic resolution
 
First Order Logic
First Order LogicFirst Order Logic
First Order Logic
 
A*
A*A*
A*
 
Agents1
Agents1Agents1
Agents1
 
Need of object oriented programming
Need of object oriented programmingNeed of object oriented programming
Need of object oriented programming
 

Recently uploaded

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxnuruddin69
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 

Recently uploaded (20)

DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptx
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 

Planning

  • 3. Purpose of Planning • The purpose of planning is to find a sequence of actions that achieves a given goal when performed starting in a given state. • In other words, given a set of operator instances (defining the possible primitive actions by the agent), an initial state description, and a goal state description or predicate, the planning agent computes a plan. Start Final Operator Instances PLAN
  • 4. What is Plan? • The task of coming up with a sequence of actions that will achieve a goal is called Planning. • Planning Problems so far: • search-based problem solving • logical planning • Consider only environment that are fully observable, deterministic, finite, static (change happens only when the agent acts), and discrete (in time, action, objects and effects). These are called Classical Planning.
  • 5. Continue… • Non classical planning is for partially observable or stochastic environments and involves a different set of algorithms and agent designs. Problem Solving Agent + Knowledge Based Agent = Planning Agent
  • 6. Why Planning • Intelligent agents must operate in the world. • Take intelligent actions • Compose actions together to achieve complex goals • Change the world to suit the needs. Agents need to reason about what the world will be like after executing a sequence of actions • Need to reason about dynamic environment
  • 7.
  • 8. Planning Algorithm • Generate a goal to achieve • Construct a plan to achieve goal from current state • Execute plan until finished • Begin again with new goal
  • 9. The language Planning Problems • Planning algorithms should take advantage of the logical structure of the problem. • The key is to find a language that is expressive enough to describe a wide variety problems, but restrictive enough to allow efficient algorithms to operate over it. • The problem should be expressed in a suitable logical language. • Planning is considered different from problem solving because of the difference in the way they represent states, goals, actions, and the differences in the way they construct action sequences.
  • 10. Continue… • Representation of states • Planners decompose the world into logical conditions and represent a state as conjunction of positive literals • Example; prepositional logic P V Q • Representation of goals • A goal is partially specified state, represented as a conjunction of positive ground literals, such as 𝐏 ∧Q. A propositional state s satisfies a goal g if s contains all the atoms in g. • Example; P∧ 𝑸 ∧R satisfies the goal 𝐏 ∧Q • Representation of actions • An action is specified in terms of the pre conditions that must hold before it can be executed and the effects that ensue when it is executed. • Example: Action(Fly(p,From,To), PRECOND: At(p, from) ∧ Plane(p) ∧ Airport(from) ∧ Airport(to), EFFECT: ~At(p,from) ∧ At(p,to))
  • 11. Continue… • This is called an action schema, meaning that it represents a number of different actions that can be derived by instantiating the variables p, from and to to different constants. In general action schema consists of three parts: • The action name and parameter list • The precondition is a conjunction of function-free positive literals stating what must be true in state before the actions can be executed. • The effect is a conjunction of function-free literals describing how the state changes when the action is executed.
  • 12. Continue… • To improve the readability, some planning systems divide the effect into the add list for positive literals and delete list for negative literals. • If an action is applicable in any state that satisfies the precondition; otherwise, the action has no effect. • Example; Action(Fly(p,From,To), PRECOND: At(p, from) ∧ Plane(p) ∧ Airport(from) ∧ Airport(to), EFFECT: ~At(p,from) ∧ At(p,to)) • Starting in state s, the result of executing an applicable action a is a state s` that is the same as s except
  • 13. A Planning Problem • Goal : • Have a birthday party • Current situation: • Agent at home, has flour, Does not have butter, Does not have sugar. • To Do: • Invite friends, Buy butter, Buy sugar, Buy balloons, Decorate house, Bake cake ….
  • 14. Example: Shopping • Start • At(Home) ^ Sells(SM,Milk) ^ Sells(SM,Banana) ^ Sells(HWS,Drill)^Loc(Home)^Loc(SM)^Loc(HWS) • Buy(x) • PRE: At(store), Sells(store, x) • EFF: Have(x) • Go(x, y) • PRE: At(x),Loc(y) • EFF: At(y),¬At(x) • Goal • Have(Milk) ^ Have(Banana) ^ Have(Drill)
  • 15. Solution • Initial state : At(Home) / -Have(Milk) / -Have(Bananas) / -Have(Drill) / ... • A state description does not have to be complete. We just want to obtain a successful plan to a set of possible complete states. But if it does not mention a given positive literal, then the literal can be assumed to be false. • Goals are a conjunction of literals. Therefore the goal is At(Home) / Have(Milk) / Have(Bananas) / Have(Drill) • Goals can also contain variables. Being at a store that sells milk is equivalent to At(x) / Sells(x,Milk)
  • 16. Continue… • Operator Schema: an operator with variables. • it is a family of actions, one for each of the different values of the variables. • every variable must have a value • Preconditions and Effects are restrictive. Operator o is applicable in a state s if every one of the preconditions in o are true in s. An example is if the initial situation includes the literals At(Home, Path(Home, Supermarket)... • then the action Go(Supermarket) is applicable, and the resulting situation contains the literals -At(Home),At(Supermarket), Path(Home, Supermarket)... • The result is all positive literals in Effect(o) hold, all literals in s hold and negative literals in Effect(o) are ignored.
  • 17. Example • "Get a quart of milk and a bunch of bananas and a variable speed cordless drill" for a problem solving exercise we need to specify: • Initial State: the agent is at home without any objects that he is wanting. • Operator Set: everything the agent can do. • Heuristic function: the # of things that have not yet been acquired.
  • 18. Solution • Planning emphasizes what is in operator and goal representations. There are three key ideas behind planning: • to "open up" the representations of state, goals, and operators so that a reasoner can more intelligently select actions when they are needed • the planner is free to add actions to the plan wherever they are needed, rather than in an incremental sequence starting at the initial state • most parts of the world are independent of most other parts which makes it feasible to take a conjunctive goal and solve it with a divide-and-conquer strategy
  • 20. Continue… • Initial State: • ontable(A) Λ 𝑜𝑛𝑡𝑎𝑏𝑙𝑒(𝐵)Λon(C,B) Λclear(A) Λ • Goal State: • ontable(B) Λon(C,B) Λ 𝑜𝑛 𝐴, 𝐶 Λclear(A) Λ
  • 22.
  • 24. A B C A B C A B C A B C
  • 25. Operations •Op{Action: unstack(C,B)} •Op{Action: pickup(B)} •Op{Action: stack(B,C)} •Op{Action: pickup(A)} •Op{Action: stack(A,B)} A B C A B C A B C A B C
  • 26.
  • 27. Planning with state space search •Planning as Search: •There are two main approaches to solving planning problems, depending on the kind of search space that is explored: 1.Situation-space search 2.Planning-space search
  • 28. Situation-Space Search • In situation space search • The search space is the space of all possible states or situations of the world • Initial state defines one node • A goal node is a state where all goals in the goal state are satisfied • A solution plan is the sequence of actions (e.g. operator instances) in the path from the start node to a goal node
  • 30. Planning-space search • The search space is the space of all possible plans • A node corresponds to a partial plan • Initially we will specify an "initial plan" which is one node in this space • A goal node is a node containing a plan which is complete, satisfying all of the goals in the goal state • The node itself contains all of the information for determining a solution plan (e.g. sequence of actions)
  • 33. Situation Planning Algorithms •There are 2 approaches to situation-space planning: 1. Progression situation-space planning 2. Regression situation-space planning
  • 34. Progression(Forward) situation-space planning • Forward search through the space of states, starting from the initial state and using the problem’s actions until the member of goal states are found. • You can use any search method you like (i.e. BFS, DFS, A*) • Since the forward search is prone to exploring unrelated nodes, and tend to have many state spaces, it has been regarded as inefficient without the help of accurate heuristics. Disadvantage: huge search space to explore, so usually very inefficient
  • 35. Continue… • Algorithm: 1. Start from initial state 2. Find all operators whose preconditions are true in the initial state 3. Compute effects of operators to generate successor states 4. Repeat steps #2-#3 until a new state satisfies the goal conditions
  • 36. Regression (Backward) situation-space planning • Backward search through the relevant states, starting from the goal state, to the initial state using the inverse of actions. • Backward-chaining from goal state to initial state • Regression situation-space planning is usually more efficient than progression because many operators are applicable at each state, yet only a small number of operators are applicable for achieving a given goal • Hence, regression is more goal-directed than progression situation- space planning. Disadvantage: cannot always find a plan even if one exists!
  • 37. Continue… • Algorithm: 1. Start with goal node corresponding to goal to be achieved 2. Choose an operator that will add one of the goals 3. Replace that goal with the operator's preconditions 4. Repeat steps #2-#3 until you have reached the initial state
  • 38. Heuristics planning •We can derive an admissible heuristics by defining a relaxed problem. •There are two ways to make the problem easier: by adding more edges to the graph making it easier to find the path or by forming an abstraction of state space that has fewer states.
  • 39. Continue… • Neither progression or regression are very efficient without a good heuristic. • How many actions are needed to achieve the goal? • Exact solution is NP hard, find a good estimate • Two approaches to find admissible heuristic: • The optimal solution to the relaxed problem. • Remove all preconditions from actions • The subgoal independence assumption: The cost of solving a conjunction of subgoals is approximated by the sum of the costs of solving the subproblems independently.
  • 40. Total-order Plan Finish Start Start Start Start Start Start Left Shoe RightSh oe Left Sock Finish Finish Finish Finish Finish Left Sock Left Sock Left Sock Right Sock Right Sock Right Sock Left Sock Right Shoe Right Sock Right Sock Left Shoe Left Shoe Left Sock RightSh oe RightSh oe RightSo ck RightSh oe Left Shoe Left Shoe Left Shoe Right Shoe
  • 42. Partial-Order Planning • Progression and regression planning are totally ordered plan search forms. • They cannot take advantage of problem decomposition. • Decisions must be made on how to sequence actions on all the subproblems • Least commitment strategy: • Delay choice during search
  • 43. Continue… • Partially ordered collection of steps with • Start step has the initial state description as its effect • Finish step has the goal description as its precondition causal links from outcome of one step to precondition of another • temporal ordering between pairs of steps • Open condition = precondition of a step not yet causally linked • A plan is complete iff every precondition is achieved • A precondition is achieved iff it is the effect of an earlier step and no possibly intervening step undoes it
  • 44. Continue… • Partially Ordered Plans: • no strict sequence • partly parallel • observe threats
  • 45. Shoe & Sock • Any planning algorithm that can place two actions into a plan without which comes first is a PO plan.
  • 46. Continue… • Start with a rough plan and refine iteratively. • First plan consists only of start and finish actions:  start - T as precondition, initial world state as effect  finish - goal as precondition, NIL as effect • Select actions to achieve sub-goals separately, quasi in parallel  partial- order plan • Fulfill open preconditions (sub-goals), until no more unsatisfied preconditions are left (last one is T of start)
  • 47. Continue…  Add causal links to connect effects from actions to matching preconditions for plan, e.g.  move(A,B,x) has effect clear(B)  clear(B) is precondition for move(B,y,z)  Causal links specify a partial order.
  • 48. Continue…  Recognize threats - the effect of an action A destroys the precondition of another action B, e.g.  move(A,x,B) destroys clear(B) (in DELETE-list)  clear(B) is precondition for move(B,y,z)  thus, move(B,Fl,C) has to be done before move (A,Fl,B)  Add threats as partial order to plan: b<a (do b before a).
  • 49. POP-Algorithm • In essence, the POP algorithm is the following: 1.Make the initial plan, i.e. the one that contains only the Start and Finish steps. 2.Do until you have a solution plan • Take an unachieved precondition from the plan; achieve it • Resolve any threats using promotion or demotion
  • 50. Another Example • At(Home) • Sells(SM, Banana) • Sells(HS, Drill) • Have(Drill) • Have(Milk) • Have(Banana) Get a quart of milk and a bunch of bananas and a variable speed cordless drill
  • 51. Partial Order Planning Start End Buy(Banana) Buy(Milk) Buy(Drill) At(Home) Have(Banana) Have(Milk) Have(Drill) Causal links At(Home)
  • 52. Start End Buy(Banana) Buy(Milk) Buy(Drill) At(Home) Have(Banana) Have(Milk) Have(Drill) At(s) At(s) At(s) Sells(s,Drill)Sells(s,Milk)Sells(s,Banana) NB: all causal links are also ordering links Ordering links Causal links At(Home)
  • 53. Start End Buy(Banana) Buy(Milk) Buy(Drill) At(Home) Have(Banana) Have(Milk) Have(Drill) At(SM) At(SM) At(HWS) Sells(HWS,Drill)Sells(SM,Milk)Sells(SM,Banana) NB: all causal links are also ordering links Causal links At(Home)
  • 54. Start End Buy(Banana) Buy(Milk) Buy(Drill) At(Home) Have(Banana) Have(Milk) Have(Drill) Go(SM) Go(HWS) At(s) At(s) At(SM) At(SM) At(HWS) Sells(HWS,Drill)Sells(SM,Milk)Sells(SM,Banana) At(Home)
  • 55. Start End Buy(Banana) Buy(Milk) Buy(Drill) At(Home) Have(Banana) Have(Milk) Have(Drill) Go(SM) Go(HWS) At(Home) At(Home) At(SM) At(SM) At(HWS) Sells(HWS,Drill)Sells(SM,Milk)Sells(SM,Banana) At(Home)
  • 56. Threats to Causal Links Start End Buy(Banana) Buy(Milk) Buy(Drill) At(Home) Have(Banana) Have(Milk) Have(Drill) Go(SM) Go(HWS) At(Home) At(Home) At(SM) At(SM) At(HWS) Sells(HWS,Drill)Sells(SM,Milk)Sells(SM,Banana) At(Home)
  • 57. Threats to Causal Links: Demotion Start End Buy(Banana) Buy(Milk) Buy(Drill) At(Home) Have(Banana) Have(Milk) Have(Drill) Go(SM) Go(HWS) At(HWS) At(Home) At(SM) At(SM) At(HWS) Sells(HWS,Drill)Sells(SM,Milk)Sells(SM,Banana) Go(Home) At(SM) At(Home)
  • 59. Planning graphs • GraphPlan is an algorithm based on planning graph • Planning graphs are also used as a source of heuristics (an estimate of how many steps it takes to reach the goal) • Planning graph is an approximation of a complete tree of all possible actions and their results Planning graphs work only for propositional planning problems—ones with no variables.
  • 60. Continue… • Planning graph is organized into levels • Level S0: initial state, consisting of nodes representing each fluent that holds in S0 • Level A0: each ground action that might be applicable in S0 Then alternate Si and Ai • Si contains fluent which could hold at time i, (may be both P and ¬P); literals may show up too early but never too late • Ai contains actions which could have their preconditions satisfied at i
  • 61. Mutex •A mutex between two actions indicates that it is impossible to perform these actions in parallel. •A mutex between two literals indicates that it is impossible to have these both literals true at this stage.
  • 62. Continue… • Actions • Inconsistent effects: two actions that lead to inconsistent effects • Interference: an effect of the first action negates the precondition of the other action • Competing needs: a precondition of the first action is mutually exclusive with a precondition of the second action. • Literals • one literal is the negation of the other one • Inconsistency support: each pair of action archiving the two literals are mutually exclusive.
  • 63. How to compute mutexes • Inconsistent effects: one action negates an effect of the other. • For example, Eat (Cake) and the persistence of Have(Cake) have inconsistent effects because they disagree on the effect Have(Cake). • Interference: one of the effects of one action is the negation of a precondition of the other. • For example Eat (Cake) interferes with the persistence of Have(Cake) by negating its precondition. • Competing needs: one of the preconditions of one action is mutually exclusive with a precondition of the other. • For example, Bake(Cake) and Eat (Cake) are mutex because they compete on the value of the Have(Cake) precondition.
  • 67. Example • Init(Have(Cake)) • Goal(Have(Cake)⋀𝐸𝑎𝑡𝑒𝑛(𝐶𝑎𝑘𝑒)) • Action(Eat(Cake), PRECON: Have(Cake), EFFECT: ¬Have(Cake)⋀𝐸𝑎𝑡𝑒𝑛(𝐶𝑎𝑘𝑒)) • Action(Bake(Cake), PRECOND: ¬Have(Cake), EFFECT: Have(Cake)) The planning graph for the “have cake and eat cake too”
  • 68. Solution Actions persistence actionspreconditions and effects Mutex two actions that lead to inconsistent effects
  • 69. Continue… • Start at level S0 and determine action level A0 and next level S1. • A0 >> all actions whose preconditions are satisfied in the previous level. • Connect precondition and effect of action S0S1. • Level A0 contains the actions that could occur • Conflicts between actions are represented by mutex lines (curved lines) • Level S1 contains all literals that could result from picking any subset of actions in A0 • Conflicts between literals that cannot occur together are reprented by mutex links. • S1 defines multiple states and the mutex links are the constraints that define this set of states. • Continue until two consecutive levels are identical: leveled off • Or contain the same amount of literals
  • 70. Termination •PG are monotonically increasing or decreasing: •Literals increase monotonically •Actions increase monotonically •Mutexes decrease monotonically
  • 71. Dinner Date Example by Dana Nau • Suppose you want to prepare dinner as a surprise for your sweetheart (who is asleep) • S0 ={garbage, cleanHands, quiet} • G={dinner, present, ¬garbage}
  • 73. Why SAT? • We can convert the planning problem into a Boolean satisfiability problem and solve it by using SAT solvers. • SAT solvers which could handle very large satisfiability problem instances and they could solve them very quickly.
  • 74. Introduction • The planning problem is translated into a CNF satisfiability problem. • The goal is asserted to hold at time step T, and clauses are included for each time step up to T. • If the clauses are satisfiable, then a plan extracted by examining the actions that are true. • Otherwise, we increment T and repeat.
  • 76. References http://www.jennyleestat.com/project/pddl/ Artificial Intelligence: A Modern Approach, 3rd Ed, S. Russel and P. Norvig (2010) MIT OpenCourseWare lecture on GraphPlan and making planning graphs https://nptel.ac.in/courses/106105078/24