0% found this document useful (0 votes)
58 views46 pages

6.1types of Planning

Uploaded by

ashish.rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views46 pages

6.1types of Planning

Uploaded by

ashish.rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 46

Vidya Vikas Education Trust’s

Universal College of Engineering, Vasai(E)

AI
CH:06
Planning and Learning
Content
• The planning problem,
– Partial order planning,
– total order planning.
• The process of doing a sequence of actions to achieve a goal is
called planning.
• A plan is a representation of the crude structure of the input scene
by the various object labels.
• The process of planning is a bottom up process to provide clues
concerning which knowledge can be applied to different parts of
the scene.
• The knowledge of the task world is represented by sets of
productions rules.
• Each rule in the bottom up process has a fuzzy predicate which
describes the properties of relations between objects.
• Computer cannot solve any problem without planning it.
• For example, in 8-puzzle game, the computer can’t replace the
tiles onto their positions without the planning procedure of that
problem.
• When we discuss the computer solution of the 8-puzzle game,
what we are really doing was outlining the way the computer
might generate a plan for solving it.
• A computer could look for a solution plan in the same way as a
person who was actually trying to solve the problem by moving
tiles on a board.
Planning
• A planning agent will construct plans to
achieve its goals, and then execute them.
• Analyze a situation in which it finds itself
and develop a strategy for achieving the
agent’s goal.
• Achieving a goal requires finding a sequence
of actions that can be expected to have the
desired outcome
● The planning in Artificial Intelligence is about the decision making tasks

performed by the robots or computer programs to achieve a specific goal.

● The execution of planning is about choosing a sequence of actions with a high

likelihood to complete the specific task.


Basic Components of a Planning System

• When a particular problem will be solved, at that time


some specific rules regarding to that problem are to be
applied.
• Then apply the chosen rule to compute the new problem
state that arises from its application.
• Detect when a solution has been found and calculate the
active and inactive ends of that problem.
• Various components of a planning system are described as
follows.
(a) States: For a planning process, the planners decompose the
world into some environments.
Then environments are defined by some logical conditions and
states.
The problems can be viewed as the task of finding a path from a
given starting state to some desirable goal state.
The state can be viewed as a conjunction of positive literals.
(b)Goal: A goal is a specified state.
To find a solution to a problem using a search procedure is to
generate moves through the problem space until a goal state is
reached.
In the context of game playing programs, a goal state is one in
which we win.For interesting games like chess, it is not easily, to
generate goal state with good goal state generator.
(c) Actions: An action is specified in terms of the pre-conditions that must
hold before it can be executed and then the effects that ensues when it is
executed. For example, an action for running a tiger from one location to
another.
(d)Precondition: The precondition which must hold true before the action
can be executed.

(e) Effect: It is a conjunction of function free literals describing how the


state changes when the action is executed.
(f) Finding a solution: A planning system has succeeded in finding a solution
to a problem when it has found a sequence of operators that transforms the
initial problem state into the goal state. The way it can be solved depends on
the way that state descriptions are represented.
(g) Calculating the Dead State: As a planning system is searching for a sequence
of operators to solve a particular problem, it must be able to detect when it is
exploring a path that can never lead to a solution.
The same reasoning methods that can be used to detect a solution can often be
used for detecting a dead path.
• Planning can be Classical or Non-classical.
• In case of Classical Planning, the environment is fully
observable, deterministic, static and discrete, whereas in case
of
• Non-classical Planning, the environment is partially
observable (i.e. the entire state of the environment is not
visible at a given instant) or non- deterministic (or stochastic,
i.e. the current state and chosen action cannot completely
determine the next state of the environment).
Classical Agent
• Here we are going to use logical representation of
the state of the world.
• planning is termed as a task of finding sequence of
actions in state space where states possess logical
representations.
• classical planners have following assumptions:
– planner has complete as well as certain
knowledge of initial world state.
– no other agent exists whose action will interfere
in execution of plan.
– Each action will be executed accurately.
Planning languages
• Representation of Planning problems is often done using STRIPS
(Stanford Research Institute Problem Solver). It consists of:
– A set of states- It is a conjunction of positive ground literals.

– A set of goals- partially specified state represented as a conjunction of positive literals,

– A set of actions- For each action, there is a precondition that must be satisfied and an effect
which reflects the impact the action has on the environment after it has been performed.

• Planning problems can also be represented using PDDL (Planning Domain


Definition Language).
Planning using State Space Search

• State space consists of the initial state, set of goal


states, set of actions or operations, set of states and
the path cost.
• This state space needs to be searched to find a
sequence of actions leading to the goal state.
• This can be done in the forward or backward
direction.
Forward State Space Search

It is also called Progression. It starts from the initial state and searches in the forward
direction till we reach the goal. It uses STRIPS representation. This is how the problem
formulation looks like.

Initial state: start state

Actions: Each action has a particular precondition to be satisfied before the action can
be performed and an effect that the action will have on the environment.

Goal test: To check if the current state is the goal state or not.

Step cost: Cost of each step which is assumed to be 1.

FSSS starts from the initial state and applies actions to reach the next state. It then
checks whether this state is the goal state or not. If not, it continues to apply other
actions till the goal is reached.
Transportation of Air cargo
between airports
Backward State Space Search

It is also called as Regression.


It uses STRIPS representation.
The problem formulation is similar to that of FSSS and consists of
the initial state, actions, goal test and step cost.
In BSSS, the searching starts from the goal state, and moves in the
backward direction until the initial state is reached.
It starts at the goal, checks if it is the initial state.
If not, it applies the inverse of the actions to produce sub goals until
start state is reached.
Total Order planning (TOP)
FSSS and BSSS are examples of TOP. They only
explore linear sequences of actions from start to
goal state,
They cannot take advantage of problem
decomposition, i.e. splitting the problem into
smaller sub-problems and solving them
individually.
Partial Order Planning (POP)

It works on problem decomposition.


It will divide the problem into parts and achieve these
sub goals independently.
It solves the sub problems with sub plans and then
combines these sub plans and reorders them based on
requirements.
In POP, ordering of the actions is partial.
It does not specify which action will come first out of the
two actions which are placed in the plan.
Let’s look at this with the help of an example.
The problem of wearing shoes can be performed through
total order or partial order planning.
Init: Barefoot

Goal: RightShoeOn ^ LeftShoeOn

Action: 1. RightShoeOn

Precondition: RightSockOn

Effect: RightShoeOn
Action:RightSockOn

Precondition: Barefoot

Effect: RightSockOn
Action: LeftShoeOn

Precondition: LeftSockOn

Effect: LeftShoeOn

Action: LeftSockOn

Precondition: Barefoot

Effect: LeftSockOn

4
The TOP consists of six sequences, one of which can be taken in
order to reach the finish state.
However, the POP is less complex.
It combines two action sequences.
The first branch covers the left sock and left shoe.
To wear left shoe, wearing the left sock is a precondition.
Similarly the second branch covers the right sock and right show.
Once these actions are taken, we achieve our goal and reach the
finish state.
Defining a Partial Order Plan

● A set of actions, that make up the steps of the plan. For instance, {RightShoe,

RightSock, LeftShoe, LeftSock, Start, Finish}.

● A set of ordering constraints, A before B. For instance, {RightSock <

RightShoe, LeftSock < LeftShoe}.

● A set of causal links, A achieves P for B. RighSsock------>RightShoe


Rightsockon

● A set of open preconditions. A precondition is open if it is not achieved by

some action in the plan.


Hierarchical Planning

Here the plans are organized in a hierarchical format. It works on plan decomposition.

Complex actions are decomposed into simpler or primitive ones and it can be denoted

with the help of links between various states at different levels of the hierarchy. This is

called operator expansion.


Primitive tasks- these correspond to the actions of STRIPS,
Compound tasks- these are a set of simpler tasks,
Goal tasks- these correspond to goals of STRIPS.
In Hierarchical Planning, we find a sequence of primitive tasks by decomposition of
compound tasks, in order to reach the goal. For example, in case of building a house,
hierarchical planning is used as shown below.
Conditional Planning

It works regardless of the outcome of an action.


It deals with uncertainty by inspecting what is happening in the
environment at predetermined points in the plan.
It can take place in fully observable and non-deterministic
environments.
It will take actions and must be able to handle every outcome for the
action taken.
For instance, If <test-cond> then plan A else plan B.
In case of a vacuum cleaner problem, If At Left ^ Clean then Right
else Suck.
Thank you !

37

You might also like