0% found this document useful (0 votes)
36 views14 pages

Unit-5 Ai

Classical planning involves problem-solving agents that find action sequences to achieve goal states, relying on domain-specific heuristics or a factored representation of states. The Planning Domain Definition Language (PDDL) is used to express actions and states, allowing for efficient planning through action schemas and logical representations. Examples such as air cargo transport and the blocks world illustrate the application of PDDL in defining actions and goals within structured environments.

Uploaded by

Sunil as
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)
36 views14 pages

Unit-5 Ai

Classical planning involves problem-solving agents that find action sequences to achieve goal states, relying on domain-specific heuristics or a factored representation of states. The Planning Domain Definition Language (PDDL) is used to express actions and states, allowing for efficient planning through action schemas and logical representations. Examples such as air cargo transport and the blocks world illustrate the application of PDDL in defining actions and goals within structured environments.

Uploaded by

Sunil as
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

UNIT-5

CLASSICAL PLANNING
CLASSICAL PLANNING
• The problem-solving agent can find sequences of actions that result in a
goal state. But it deals with atomic representations of states and thus needs
good domain-specific heuristics to perform well.
• The hybrid propositional logical agent can find plans without domain-
specific heuristics because it uses domain-independent heuristics based on
the logical structure of the problem. But it relies on ground (variable-free)
propositional inference, which means that it may be swamped when there
are many actions and states. For example, in the wumpus world, the
simple action of moving a step forward had to be repeated for all four
agent orientations, T time steps, and n^2 current locations.
• Planning researchers have settled on a factored representation— one in
which a state of the world is represented by a collection of variables.
• PDDL, the Planning Domain Definition Language, that allows us to
express all 4T n^2 PDDL actions with one action schema.
Planning Domain Definition Language
• Each state is represented as a conjunction of fluents that are ground,
functionless atoms. For example, Poor ∧ Unknown might represent the
state of a hapless agent, and a state in a package delivery problem might be
At(Truck 1, Melbourne) ∧ At(Truck 2, Sydney).
• Database semantics is used: the closed-world assumption means that any
fluents that are not mentioned are false, and the unique names assumption
means that Truck 1 and Truck 2 are distinct.
• The following fluents are not allowed in a state: At(x, y) (because it is non-
ground), ¬Poor (because it is a negation), and At(Father (Fred), Sydney)
(because it uses a function symbol).
• The representation of states is carefully designed so that a state can be
treated either as a conjunction of fluents, which can be manipulated by
logical inference, or as a set of fluents, which can be manipulated with set
operations.
Planning Domain Definition Language
• Actions are described by a set of action schemas that implicitly define the
ACTIONS(s) and RESULT(s, a) functions needed to do a problem-solving
search.
• Classical planning concentrates on problems where most actions leave most
things unchanged. Think of a world consisting of a bunch of objects on a
flat surface. The action of nudging an object causes that object to change its
location by a vector ∆.
• PDDL does that by specifying the result of an action in terms of what
changes; everything that stays the same is left unmentioned.
• A set of ground (variable-free) actions can be represented by a single action
schema. The schema is a lifted representation—it lifts the level of
reasoning from propositional logic to a restricted subset of first-order logic.
• For example, here is an action schema for flying a plane from one location
to another:
Planning Domain Definition Language
• The schema consists of the action name, a list of all the variables used in
the schema, a precondition and an effect.

• The precondition defines the states in which the action can be executed,
and the effect defines the result of executing the action. An action a can be
executed in state s if s entails the precondition of a. Entailment can also be
expressed with the set semantics: s |= q iff every positive literal in q is in
s and every negated literal in q is not.
Planning Domain Definition Language
Example: Air cargo transport
• Air cargo transport problem involving loading and unloading cargo and
flying it from place to place. The problem can be defined with three
actions: Load, Unload, and Fly.
• The actions affect two predicates: 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 .
• When a plane flies from one airport to another, all the cargo inside the
plane goes with it. In first-order logic it would be easy to quantify over all
objects that are inside the plane.
• The approach we use is to say that a piece of cargo ceases to be At
anywhere when it is In a plane; the cargo only becomes At the new airport
when it is unloaded. So At really means “available for use at a given
location.” The following plan is a solution to the problem:
Example: The spare tire problem
• Consider the problem of changing a flat tire
• The goal is to have a good spare tire properly mounted onto the car’s axle,
where the initial state has a flat tire on the axle and a good spare tire in the
trunk.
• There are just four actions: removing the spare from the trunk, removing
the flat tire from the axle, putting the spare on the axle, and leaving the car
unattended overnight .
• We assume that the car is parked in a particularly bad neighborhood, so that
the effect of leaving it overnight is that the tires disappear.
• A solution to the problem is [Remove(Flat, Axle), Remove(Spare,
Trunk ), PutOn(Spare, Axle)].
Example: The spare tire problem
Example: The blocks world
• One of the most famous planning domains is known as the blocks world. This
domain consists of a set of cube-shaped blocks sitting on a table.
• The blocks can be stacked, but only one block can fit directly on top of another. A
robot arm can pick up a block and move it to another position, either on the table or
on top of another block. The arm can pick up only one block at a time, so it
cannot pick up a block that has another one on it.
• The goal will always be to build one or more stacks of blocks, specified in terms of
what blocks are on top of what other blocks. For example, a goal might be to get
block A on B and block B on C.
For example, a goal might be to get block A on B and
block B on C
• We use On(b, x) to indicate that block b is on x, where x is either another block or
the table. The action for moving block b from the top of x to the top of y will be
Move(b, x, y).
• Now, one of the preconditions on moving b is that no other block be on it. In first-
order logic, this would be ¬∃ x On(x, b) or, alternatively, ∀ x ¬On(x, b).
• The action Move moves a block b from x to y if both b and y are clear. After the
move is made, b is still clear but y is not. A first attempt at the Move schema is
• Action(Move(b, x, y),
• PRECOND: On(b, x) ∧ Clear (b) ∧ Clear (y),
• EFFECT: On(b, y) ∧ Clear (x) ∧ ¬On(b, x) ∧ ¬Clear (y)) .
Example: The blocks world
The complexity of classical planning
• What is PlanSAT and Bounded PlanSAT?
• PlanSAT:
– A decision problem that asks, "Is there any plan that
solves the problem?"
– It doesn’t care about how long the plan is, just whether a
plan exists.
• Bounded PlanSAT:
– A decision problem that asks, "Is there a plan of length
kor less that solves the problem?"
– Used when we are interested in finding the shortest
(optimal) plan.
The complexity of classical planning
• Are These Problems Decidable?
• Yes, they are decidable for classical planning because the number
of states is finite.
• If we add function symbols (allowing infinite states):
– PlanSAT becomes semidecidable:
• The algorithm will find a solution if one exists.
• But if no solution exists, the algorithm might run forever.
– Bounded PlanSAT remains decidable because we restrict the
search to a finite length (kkk).

You might also like