AI Planning Paradigms

How AI Systems Make Smart Decisions

Professor AI • Interactive Lecture • CS Advanced Topics

What is AI Planning?

Teaching Machines to Think Ahead

Understanding AI Planning

AI Planning is like teaching a computer to be a chess grandmaster - but for real life! It's the process of finding a sequence of actions that transforms the current situation into a desired goal state.

Think of it like GPS navigation: You tell it where you are (initial state), where you want to go (goal state), and it figures out the best route (sequence of actions) to get there!
  • Initial State: "I'm at home, hungry, and have no food"
  • Goal State: "I'm at home, fed, and satisfied"
  • Actions: Go to store → Buy ingredients → Return home → Cook meal → Eat
  • Plan: The complete sequence that gets you from hungry to satisfied!

AI planning is everywhere: from robot vacuum cleaners navigating your house to manufacturing systems optimizing production schedules!

Core Components of Any Planning System

Every planning problem, whether it's a robot making coffee or a factory scheduling production, needs these three essential ingredients:

  • Initial State: The starting configuration - "Robot is in kitchen, coffee maker is empty, user wants coffee"
  • Goal State: The desired outcome - "User has hot coffee, robot is back at charging station"
  • Actions (Operators): What the agent can do - "move to location, fill water, add coffee, press start button"
Each Action Has Two Parts:
🔍 Preconditions: What must be true before you can do this action
Effects: What changes after you do this action
Example Action: "Fill Coffee Maker"
Preconditions: Robot at coffee maker, coffee maker empty, water available
Effects: Coffee maker filled with water, water no longer available

Think of actions like LEGO instructions - each step tells you exactly what pieces you need (preconditions) and what you'll have built (effects)!

Planning Approaches

Different Ways to Solve the Puzzle

Forward Planning (Progression)

Forward Planning is like following a recipe step-by-step - you start with your ingredients (initial state) and work forward until you have a delicious meal (goal state)!

How It Works:
1. Start at the initial state
2. Look at all possible actions you can take right now
3. Pick one action and see what state it leads to
4. Repeat until you reach your goal!
  • ✅ Advantages: Very intuitive - mirrors how humans naturally think
  • ✅ Always valid: Every state you explore is actually reachable
  • ✅ Easy to implement: Uses standard search algorithms like A*
  • ❌ Can be inefficient: Might explore many irrelevant paths
  • ❌ Large search space: Too many possibilities to explore
Real-world example: A delivery robot starting from the warehouse, picking up packages, and delivering them one by one until all deliveries are complete.

It's like exploring a maze by always moving forward and marking where you've been!

Backward Planning (Regression)

Backward Planning is like being a detective - you start with the "crime scene" (goal state) and work backward to figure out what must have happened to get there!

How It Works:
1. Start with your goal: "I want to be at work on time"
2. Ask: "What action could have achieved this?" → "Take the 8 AM bus"
3. Ask: "What do I need for that?" → "Be at bus stop by 7:55 AM"
4. Keep working backward until you reach something you can do now!
  • ✅ Goal-focused: Every step directly relates to achieving your goal
  • ✅ Efficient for specific goals: Great when you know exactly what you want
  • ✅ Fewer irrelevant paths: Less likely to get distracted
  • ❌ Complex reasoning: Harder to implement correctly
  • ❌ Assumes reversibility: Not all actions can be "undone" mentally
Real-world example: A chef planning a dinner party works backward from "guests enjoying perfectly timed meal" to figure out when to start each dish.

It's like solving a jigsaw puzzle by starting with the picture on the box and figuring out which pieces you need!

Forward vs Backward Planning

Forward Planning

Like following a recipe: Start with ingredients, follow steps sequentially

Best when:
• You have a clear starting point
• Goal is somewhat flexible
• Actions are straightforward

Example: A cleaning robot systematically going room by room

Backward Planning

Like solving a mystery: Start with the outcome, trace back the clues

Best when:
• You have a very specific goal
• Starting point is flexible
• Limited ways to achieve goal

Example: Planning a surprise party by working backward from the moment guests arrive

VS

Advanced Planning Methods

When Simple Isn't Enough

Goal Stack Planning (STRIPS)

Goal Stack Planning is like organizing your to-do list as a stack of sticky notes - you always work on the top note first!

The Stack Approach:
📚 Push your main goal onto the stack
👆 Look at the top item
✅ If it's already done, pop it off
📝 If not, find an action that achieves it
📚 Push that action's requirements onto the stack
  • ✅ Simple and intuitive: Easy to understand and implement
  • ✅ Hierarchical approach: Breaks complex problems into smaller pieces
  • ✅ Goal-driven: Always focused on achieving something specific
  • ❌ The "Clobbering" Problem: Can undo previous work by accident!
The Sussman Anomaly (Classic Problem):
Imagine stacking blocks: Goal = A on B, B on C
❌ Put A on B first → But then you can't put B on C!
✅ Need to think about goal interactions!

It's like cleaning your room by making a to-do list, but sometimes cleaning one area messes up another area you already cleaned!

Plan Space Planning (Partial-Order)

Plan Space Planning is like being a flexible project manager - you don't commit to a rigid schedule until you absolutely have to!

The "Least Commitment" Principle:
🤝 Only decide order when necessary
🔗 Establish causal links between actions
⚠️ Resolve conflicts when they arise
🎯 Keep the plan as flexible as possible
  • ✅ Handles goal interactions: Solves the clobbering problem elegantly
  • ✅ Flexible plans: Multiple valid execution orders
  • ✅ Less backtracking: Doesn't make premature commitments
  • ❌ Complex implementation: Requires sophisticated data structures
  • ❌ Large plan space: Many possible partial plans to consider
Example: Planning a dinner party
✅ "Buy ingredients" must happen before "cook meal"
❓ But "set table" can happen anytime before guests arrive
💡 Keep maximum flexibility for execution!

It's like having a flexible schedule where you know some things must happen before others, but you don't nail down exact times until necessary!

Hierarchical Task Network (HTN) Planning

HTN Planning is like following your grandmother's cooking wisdom - it uses expert knowledge about how to break down complex tasks into manageable steps!

How HTN Works:
🎯 Start with a high-level task: "Prepare Thanksgiving dinner"
📋 Break it down: "Plan menu" + "Shop" + "Cook" + "Serve"
🔍 Break down further: "Cook" → "Cook turkey" + "Make sides" + "Bake dessert"
⚡ Continue until you have simple, doable actions
  • ✅ Uses domain expertise: Leverages human knowledge and procedures
  • ✅ Handles complex problems: Scales to real-world scenarios
  • ✅ Human-like plans: Results make sense to people
  • ❌ Requires expert knowledge: Someone has to encode the task decompositions
  • ❌ Domain-specific: Not as general-purpose as other methods
Real-world applications:
🏭 Manufacturing: "Assemble car" → detailed step-by-step procedures
🏥 Medical: "Perform surgery" → established protocols and best practices
🤖 Robotics: "Clean house" → room-by-room systematic approach

It's like having a master craftsperson teach an apprentice - the expertise is built into the system!

Evolution of AI Planning

1970s

STRIPS Era

Goal Stack Planning: Simple, linear approach to planning. Great for toy problems but struggled with goal interactions. Like learning to walk before you run!

1980s

State-Space Search

Forward & Backward Planning: More systematic approaches to exploring possible solutions. Think of it as the GPS navigation for AI planning!

1990s

Partial-Order Planning

Plan Space Planning: Revolutionary "least commitment" approach. Solved the clobbering problem by keeping plans flexible until necessary!

2000s+

Knowledge-Rich Planning

HTN & Hybrid Methods: Incorporating human expertise and domain knowledge. Modern AI planning combines multiple approaches for real-world problems!

Key Insights About AI Planning

4
Main Paradigms
Forward, Backward, Goal Stack, and Plan Space - each solving different aspects of the planning puzzle
3
Core Components
Initial State, Goal State, and Actions - the essential building blocks of any planning problem
50+
Years Evolution
From simple STRIPS to modern HTN planning - continuous improvement in handling complexity
Applications
From robot navigation to supply chain management - AI planning is everywhere in modern technology

Refinement in Planning

Refinement is like gradually adding more detail to a rough sketch until you have a complete, detailed drawing!

What is Refinement?
The process of taking a partial or abstract plan and adding more details, constraints, or specificity to make it more complete and executable.
  • Operator Refinement: Breaking down abstract actions into concrete, executable steps
  • Variable Refinement: Replacing general variables with specific values
  • Temporal Refinement: Adding timing constraints and scheduling details
  • Resource Refinement: Specifying exact resources needed
Example: Planning a Trip
🔸 Abstract Plan: "Travel to Paris"
🔸 Refined Plan: "Book flight AA123 on July 15th → Check into Hotel Le Bristol → Take Metro Line 1 to Louvre"

Refinement allows planners to work at different levels of abstraction, making complex planning more manageable!

Planning vs Problem Solving

Understanding the difference between Planning and Problem Solving is crucial for grasping AI's problem-solving landscape!

Key Distinction:
Problem Solving finds A solution, Planning finds THE BEST sequence of actions considering future consequences.
  • Problem Solving: "How do I get from A to B?" (focus on reaching goal)
  • Planning: "What's the best way to get from A to B considering time, cost, and other activities?" (focus on optimal sequence)
  • Problem Solving: Often deals with immediate, single-step decisions
  • Planning: Considers multi-step sequences and their interactions
Real-world Analogy:
🔸 Problem Solving: Finding any route to work when you're late
🔸 Planning: Designing your entire daily schedule considering meetings, traffic, errands, and personal time

Planning involves more sophisticated reasoning about actions, states, and goals over time!

Planning vs Problem Solving

Understanding the difference between Planning and Problem Solving is crucial for grasping AI's problem-solving landscape!

Key Distinction:
Problem Solving finds A solution, Planning finds THE BEST sequence of actions considering future consequences.
  • Problem Solving: "How do I get from A to B?" (focus on reaching goal)
  • Planning: "What's the best way to get from A to B considering time, cost, and other activities?" (focus on optimal sequence)
  • Problem Solving: Often deals with immediate, single-step decisions
  • Planning: Considers multi-step sequences and their interactions
Real-world Analogy:
🔸 Problem Solving: Finding any route to work when you're late
🔸 Planning: Designing your entire daily schedule considering meetings, traffic, errands, and personal time

Planning involves more sophisticated reasoning about actions, states, and goals over time!

The Blocks World Problem

The Blocks World is like the "Hello World" of AI planning - a simple but powerful way to understand planning concepts!

The Setup:
🧱 You have colored blocks on a table
🤖 A robot arm that can pick up and move blocks
🎯 Goal: Arrange blocks in a specific configuration
  • States: Which block is on which block, which blocks are clear
  • Actions: PICKUP(block), PUTDOWN(block), STACK(block1, block2), UNSTACK(block1, block2)
  • Preconditions: "To stack A on B, both A and B must be clear"
  • Effects: "After stacking A on B, A is on B, and B is no longer clear"
Classic Example: The Sussman Anomaly
Goal: A on B, B on C
❌ If you put A on B first, you can't move B!
✅ Must plan the sequence carefully: First ensure B can be moved to C

This simple domain reveals deep insights about goal interaction and planning complexity!

A* Algorithm in Planning

A* Algorithm is like having a smart GPS that considers both distance traveled and estimated distance remaining!

A* Formula: f(n) = g(n) + h(n)
🔸 g(n): Actual cost from start to current state
🔸 h(n): Heuristic estimate from current to goal
🔸 f(n): Total estimated cost of path through n
  • Admissible Heuristic: Never overestimates the actual cost
  • Optimal: Guarantees finding the best solution (if heuristic is admissible)
  • Efficient: Explores fewer nodes than uninformed search
  • Complete: Will find a solution if one exists
Planning Example: Robot Navigation
🔸 g(n): Distance already traveled
🔸 h(n): Straight-line distance to goal (admissible because robot can't teleport!)
🔸 Result: Finds shortest path efficiently

A* is crucial in planning because it balances exploration efficiency with solution optimality!

STRIPS Operators in Detail

STRIPS Operators are like precise recipe instructions that specify exactly what ingredients you need and what you'll get!

STRIPS Operator Structure:
📋 Action Name: What you're doing
🔍 Preconditions: What must be true before
Add List: What becomes true after
Delete List: What becomes false after
Example: STACK(X, Y) in Blocks World
Preconditions: CLEAR(X), CLEAR(Y), HOLDING(X)
Add List: ON(X, Y), ARMEMPTY
Delete List: CLEAR(Y), HOLDING(X)
  • Closed World Assumption: If something isn't mentioned, it doesn't change
  • Deterministic: Same action in same state always produces same result
  • Atomic: Actions are indivisible units
  • Instantaneous: No time duration considered

STRIPS representation forms the foundation for most classical planning systems!

Modern Planning Challenges

What Fresher Engineers Should Know

Real-World Planning Challenges

Moving from textbook examples to real-world applications presents exciting challenges and opportunities for engineers!

  • Uncertainty: Real world is unpredictable - weather, traffic, equipment failures
  • Scale: Industrial planning problems can have millions of variables
  • Time Pressure: Plans often need to be generated in real-time
  • Dynamic Environments: Conditions change while executing plans
  • Multi-Objectives: Optimize cost, time, quality, and safety simultaneously
Modern Applications:
🚗 Autonomous Vehicles: Real-time path planning with dynamic obstacles
🏭 Manufacturing: Production scheduling with resource constraints
🚁 Drone Delivery: Multi-drone coordination and path optimization
🎮 Game AI: NPCs that plan complex behaviors
Career Insight: Most AI planning jobs today involve hybrid systems that combine classical planning with machine learning, optimization, and domain-specific heuristics!

Understanding these challenges prepares you for real-world AI engineering roles!

Planning Tools & Technologies

As a fresher engineer, knowing the tools and technologies in AI planning gives you a competitive edge!

Planning Languages & Standards:
📝 PDDL: Planning Domain Definition Language - the "SQL of planning"
🔧 STRIPS: Classic representation still widely used
ADL: Action Description Language for complex domains
  • Planning Software: Fast Downward, FF, LPGP, SHOP2
  • Libraries: PDDL4J (Java), Planning.py (Python), OPTIC
  • Integration: ROS (Robot Operating System) planning frameworks
  • Cloud Services: AWS RoboMaker, Google Cloud AI Planning
  • Visualization: VAL (validator), planviz for plan visualization
Getting Started:
1. Learn PDDL syntax and semantics
2. Try planning competitions (IPC - International Planning Competition)
3. Implement basic planners in Python
4. Explore planning in game development or robotics projects

Hands-on experience with these tools makes you immediately valuable to employers!

Questions & Discussion

Let's explore AI planning together!