Back to Lecture 9

Introduction to Classical Planning

Understanding the planning problem and key assumptions

What is Classical Planning?

Classical Planning is about finding a sequence of actions to transform an initial state into a goal state.

The Key Difference from Search:
Classical Planning

States: Sets of logical facts

Actions: Preconditions + Effects

Fully structured and inspectable!

Four Key Assumptions of Classical Planning

Classical planning makes four simplifying assumptions. Click each to see what happens when violated:

Deterministic

Actions always produce the same result

Click to see non-deterministic (stochastic) scenario
ASSUMED ✓
Fully Observable

Agent knows all facts about current state

Click to see partial observability
ASSUMED ✓
Static

World changes only when agent acts

Click to see dynamic environment
ASSUMED ✓
Discrete

Finite states and actions

Click to see continuous space
ASSUMED ✓

Example 1: Spare Tire Problem (Saudi Road Trip)

You're on a road trip in Saudi Arabia and get a flat tire. Let's use planning to fix it!

Initial State
Tire(Flat, Axle) Tire(Spare, Trunk)
🚗

Axle: Flat Tire 🔴

Trunk: Spare Tire ⚪

Goal State
Tire(Spare, Axle)
Available Actions:
Remove(obj, loc)

Precondition: Tire(obj, loc)

Effect ADD: Tire(obj, Ground)

Effect DELETE: Tire(obj, loc)

PutOn(tire, Axle)

Precondition: Tire(tire, Ground)

Effect ADD: Tire(tire, Axle)

Effect DELETE: Tire(tire, Ground)

Plan So Far:
No actions yet. Click buttons above to build your plan!

Example 2: Robot Grasping Object

A robot needs to grasp a box to move it to a target location.

Initial State
On(Box, Table) Empty(Hand) Clear(Box)
🤖

Hand: Empty ✋

Table: 📦 Box

Target: 🎯 (empty)

Goal State
On(Box, Target)
Available Actions:
Grasp(obj)

Precondition: On(obj, loc) Clear(obj) Empty(Hand)

Effect ADD: Holding(obj)

Effect DELETE: On(obj, loc) Clear(obj) Empty(Hand)

Place(obj, loc)

Precondition: Holding(obj)

Effect ADD: On(obj, loc) Clear(obj) Empty(Hand)

Effect DELETE: Holding(obj)

Plan So Far:
No actions yet. Click buttons above to build your plan!

Example 3: Blocks World

A classic planning problem: rearrange blocks from one configuration to another.

Initial State
On(A, Table) On(B, Table) On(C, A) Clear(B) Clear(C) HandEmpty

Current:

C
A
B

Goal:

C
B
A

Hand: Empty ✋

Goal State
On(C, B) On(B, A) On(A, Table)
Available Actions:
Pickup(x)

Precondition: On(x, Table) Clear(x) HandEmpty

Effect ADD: Holding(x)

Effect DELETE: On(x, Table) Clear(x) HandEmpty

Putdown(x)

Precondition: Holding(x)

Effect ADD: On(x, Table) Clear(x) HandEmpty

Effect DELETE: Holding(x)

Stack(x, y)

Precondition: Holding(x) Clear(y)

Effect ADD: On(x, y) Clear(x) HandEmpty

Effect DELETE: Holding(x) Clear(y)

Plan So Far:
No actions yet. Click buttons above to build your plan!

Four Key Planning Concepts Illustrated

Let's visualize the fundamental concepts using our Spare Tire example:

1. State Space Representation

All possible states the world can be in:

State S₀ Flat@Axle Spare@Trunk State S₁ Flat@Ground Spare@Trunk State S₂ Flat@Axle Spare@Ground State S₃ Flat@Ground Spare@Ground State Sₐ 🎯 GOAL Spare@Axle

The state space contains ALL possible states. Planning searches through this space to find a path to the goal.

2. Transition Model

How actions transform states:

Remove(Flat, Axle):
Tire(Flat, Axle) Tire(Spare, Trunk)
Tire(Flat, Ground) Tire(Spare, Trunk)
Remove(Spare, Trunk):
Tire(Flat, Ground) Tire(Spare, Trunk)
Tire(Flat, Ground) Tire(Spare, Ground)
PutOn(Spare, Axle):
Tire(Flat, Ground) Tire(Spare, Ground)
Tire(Spare, Axle) 🎯 GOAL!

Each action transforms one state into another by adding and deleting facts according to its effects.

3. Goal Test

Checking if the goal condition is satisfied:

Goal Specification:
Goal = {Tire(Spare, Axle)}
Test Against Current State:
State S₀: {Tire(Flat, Axle), Tire(Spare, Trunk)}
❌ NOT SATISFIED
State S₃: {Tire(Flat, Ground), Tire(Spare, Ground)}
❌ NOT SATISFIED
State Sₐ: {Tire(Spare, Axle)}
✅ GOAL SATISFIED!

Goal test checks if all goal facts are present in the current state.

4. Plan (Solution)

The sequence of actions from initial to goal state:

Initial State S₀:
{Tire(Flat, Axle), Tire(Spare, Trunk)}
PLAN:
1. Remove(Flat, Axle)
2. Remove(Spare, Trunk)
3. PutOn(Spare, Axle)
Goal State Sₐ:
{Tire(Spare, Axle)} 🎉

A plan is a sequence of actions that, when executed from the initial state, reaches the goal state.

Putting It All Together

Classical planning combines these four concepts:

  1. State Space: Defines what's possible
  2. Transition Model: Defines how to move between states
  3. Goal Test: Defines success
  4. Plan: The solution path through the state space

Connection to Search Algorithms

Key Takeaways

✅ What is Classical Planning?
  • Finding action sequences to achieve goals
  • States = sets of logical facts
  • Actions = structured operators with preconditions and effects
✅ Four Key Assumptions
  • Deterministic: Predictable outcomes
  • Fully Observable: Complete state knowledge
  • Static: World changes only via actions
  • Discrete: Finite states and actions
Next: Learn how to formally represent states and actions using STRIPS and PDDL! Continue to State Representation →