0% found this document useful (0 votes)
71 views30 pages

9-M6 - Classical Planning, Planning As State-Space Search-08-10-2024

Uploaded by

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

9-M6 - Classical Planning, Planning As State-Space Search-08-10-2024

Uploaded by

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

Planning

Types of planning

1. Classical Planning
a. Fully-observable, deterministic, finite, static and
discrete.
2. Non-classical Planning
a. Partial-observable, stochastic.
Classical Planning

1. It generally follows ‘factored representation’.


2. The language for planning is known as Planning Domain
Definition Language (PDDL).
3. A planning of a single problem has the following:
a. A set of states,
b. A initial state,
c. A goal state,
d. Set of actions,
Set of Actions
Each set of actions has a precondition and a effect
state.
Eg:-
Example: A PDDL description of an air cargo
transportation planning problem.
Example: Block-World problem
Block-World problem
One Solution of the Aforementioned
Block-world problem:

MoveToTable (C, A),


Move(B, Table, C),
Move(A, Table, B)
The complexity of the classical planning:

1. Semidecidable: an algorithm exists that will


terminate with the correct answer for any solvable
problem, but may not terminate on unsolvable
problems.
Planning as state-space search:

Forward (progression) search through the space of states, starting in the initial state and
using the problem’s actions to search forward for a member of the set of goal states.
Forward (progression) state-space search
❖ Problem Formulation:
➢ Initial State:
■ Starting state for the formulation.
➢ Action State:
■ The set of actions that can be performed based on the current state.
■ The actions needed to be taken based on the precondition and the successor states are
generated.
■ Add a positive step-cost for adding new state in the list and add negative step-cost for
removing an existing state in the list.
■ If no possible step is found (the list of states to be visited is empty) and also the current
state is not the goal state then return failure.
➢ Goal State:
■ The state that we aim to reach.
➢ Goal Test:
■ The current state is needed to checked with the goal state for terminating.
➢ Step Cost:
■ For each action some cost is also added (1 by default).
Algorithm for FSSS (Forward State-space
search)
FSSS(S, s1, g) //S is the set of states, s1 is the starting state, g is the goal state.

1. s <- s1 //s is the current state


2. P <- The empty plan
3. Loop
a. If s satisfies g then return P
b. Else
i. applicable <- [a | the ground instance from the set of states based on the precondition]
ii. If applicable is NULL
1. Return failure
iii. Non-deterministically chose a ⋵ applicable
iv. s <- T(s, a)
v. P <- P.a
Planning as state-space search:(Backward
search)

Backward (regression) search through sets of relevant states, starting at the set of states
representing the goal and using the inverse of the actions to search backward for the initial
state.
Backward (regression) state-space search

BSSS(S, s1, g) //S is the set of states, s1 is the starting state, g is the goal state.
1. s <- g //s is the current state
2. P <- The empty plan
3. Loop
a. If s satisfies s1 then return P
b. Else
i. applicable <- [a | the ground instance from the set of states based on the
precondition] <relevant states>
ii. If applicable is NULL
1. Return failure
iii. Non-deterministically chose a ⋵ applicable
iv. s <- T-1(s, a)
v. P <- P.a
Heuristics for Planning
❖ Finding an admissible heuristics:
➢ Distance from the current state to goal.
➢ By looking at the effect of actions already taken, try to guess how many actions may be needed
to achieve the goal.
➢ Relaxed problem: Another way to find the heuristics is that divide the problem into smaller easy
to solve sub-problems. Next solve them separately and accumulate the results to get the final
result.

Example (STATE ABSTRACTION): Consider an air cargo problem with 10 airports, 50 planes,
and 200 pieces of cargo.

Total States:- 5010 × 20050+10 ≈ 10155

Now consider a problem that all the packages are at just 5 of the airports, and all packages at
a given airport have the same destination. Then the states will be reduced to 510 × 55+10 ≈
1017.
Planning Graphs

Now, we will study how a special data structure called a planning graph can be used to give
better heuristic estimates.

A planning graph is a directed graph organized into levels:

first a level S0 for the initial state, consisting of nodes representing each fluent that
holds in S0 ;

Next, a level A0 consisting of nodes for each ground action that might be applicable in
S0 ;

Next, alternating levels Si followed by Ai ; until we reach a termination condition.


Planning Graphs:(Have cake and eaten a
cake problem)
Planning Graphs:(Have cake and eaten a
cake problem)

The planning graph of “Have cake and eaten a cake” problem up to level S2 . Rectangles indicate actions
(small squares indicate persistence actions), and straight lines indicate preconditions and effects. Mutex
links are shown as curved gray lines. Not all mutex links are shown, because the graph would be too
cluttered. In general, if two literals are mutex at Si , then the persistence actions for those literals will be
mutex at Ai and we need not draw that mutex link.
Planning Graphs (Mutex Lines)
We now define mutex links for both actions and literals. A mutex relation holds
between two actions at a given level if any of the following three conditions
holds:

• 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.
PLANNING AND ACTING IN
NONDETERMINISTIC DOMAINS

● In this section we extend planning to handle partially


observable, nondeterministic, and unknown
environments.
○ sensorless planning (also known as conformant
planning) for environments with no observations;
○ contingency planning for partially observable and
nondeterministic environments;
○ online planning and replanning for unknown
environments.
PLANNING AND ACTING IN
NONDETERMINISTIC DOMAINS

Consider this problem:

given a chair and a table, the goal is to have them match—have the same
color.
PLANNING AND ACTING IN
NONDETERMINISTIC DOMAINS
There are two actions: removing the lid from a paint can and painting an object
using the paint from an open can.
PLANNING AND ACTING IN
NONDETERMINISTIC DOMAINS
To solve a partially observable problem, the agent will have to reason about the percepts it will
obtain when it is executing the plan.

The percept will be supplied by the agent’s sensors when it is actually acting, but when it is
planning it will need a model of its sensors.

The first schema says that whenever an object is in view, the agent will perceive the color of the
object

The second schema says that if an open can is in view, then the agent perceives the color of the
paint in the can.
PLANNING AND ACTING IN
NONDETERMINISTIC DOMAINS
Also, the agent will need an action that causes objects (one at a time) to
come into view:
Sensorless Planning

For a fully observable environment, we would have a Percept


axiom with no preconditions for each fluent.

A sensorless agent, on the other hand, has no Percept axioms


at all. Note that even a sensorless agent can solve the painting
problem.

One solution is to open any can of paint and apply it to both


chair and table, thus coercing them to be the same color (even
though the agent doesn’t know what the color is).
Sensorless Planning
In classical planning, where the closed-world assumption is made, we
would assume that any fluent not mentioned in a state is false, but in
sensorless (and partially observable) planning we have to switch to
an open-world assumption in which states contain both positive and
negative fluents, and if a fluent does not appear, its value is unknown.
Thus, the belief state corresponds exactly to the set of possible worlds
that satisfy the formula. Given this initial belief state, the following
action sequence is a solution:
Multiagent Planning
So far, we have assumed that only one agent is doing the sensing, planning, and acting.
When there are multiple agents in the environment, each agent faces a multiagent planning
problem in which it tries to achieve its own goals with the help or hindrance of others.

Between the purely single-agent and truly multiagent cases is a wide spectrum of problems
that exhibit various degrees of decomposition of the monolithic agent.

An agent with multiple effectors that can operate concurrently—for example, a human who
can type and speak at the same time—needs to do multi-effector planning to manage each
effector while handling positive and negative interactions among the effectors. When the
effectors are physically decoupled into detached units—as in a fleet of delivery robots in a
factory— multi-effector planning becomes multibody planning.
Multiagent Planning

The doubles tennis problem. Two actors A and B are playing together and can be in one of
four locations: LeftBaseline, RightBaseline, LeftNet, and RightNet . The ball can be returned
only if a player is in the right place. Note that each action must include the actor as an
argument.
Multiagent Planning
For simplicity, we assume perfect synchronization: each action takes the
same amount of time and actions at each point in the joint plan are
simultaneous.

In the multiactor setting with n actors, the single action ‘a’ is replaced by a
joint action <a1 , . . . , an>, where ai is the action taken by the ith actor.
Multiagent Planning
Problems arise, however, when a plan has both agents hitting the ball at the same time.

You might also like