STRIPS Planning

GATE Relevance: High

🎯 Learning Objectives

  • Define the STRIPS representation: preconditions, add list, delete list
  • Write operator schemas for planning domains
  • Trace the STRIPS algorithm on simple problems
  • Solve the classic Blocks World problem step by step
  • Explain the Sussman Anomaly and why it matters
  • Connect STRIPS to situation calculus and frame axioms

1. The STRIPS Representation

📚 STRIPS (Stanford Research Institute Problem Solver)

STRIPS was one of the first automated planning systems (Fikes & Nilsson, 1971). It represents each action using three components:

  • Preconditions: a conjunction of positive literals that must hold in the current state for the action to be applicable
  • Add List (effects+): literals that become true after the action executes
  • Delete List (effects−): literals that become false after the action executes

Given a state s (a set of ground atoms) and an action a:

  1. Applicability: a is applicable in s iff Precond(a) ⊆ s
  2. Result: Result(s, a) = (s − Del(a)) ∪ Add(a)

💡 Order of Operations

The delete list is applied before the add list. This means if a fluent appears in both the delete and add list, it will be true in the resulting state (because it is first removed, then re-added).

2. Operator Schemas

An operator schema is a parameterised action template. When its variables are bound to specific objects, it becomes a ground action.

Blocks World Operator Schemas

Operator: MoveToBlock(b, x, y)
  Preconditions: On(b, x), Clear(b), Clear(y), b ≠ y
  Add List:      On(b, y), Clear(x)
  Delete List:   On(b, x), Clear(y)

Operator: MoveToTable(b, x)
  Preconditions: On(b, x), Clear(b)
  Add List:      OnTable(b), Clear(x)
  Delete List:   On(b, x)

Operator: MoveFromTable(b, y)
  Preconditions: OnTable(b), Clear(b), Clear(y), b ≠ y
  Add List:      On(b, y)
  Delete List:   OnTable(b), Clear(y)

💡 Naming Convention

Different textbooks use different operators for the blocks world. Some use a single Move(b, from, to) with Table as a special constant; others separate table moves. The key structure — preconditions, add list, delete list — remains the same.

3. The STRIPS Algorithm

The original STRIPS algorithm uses a goal-stack approach (means-ends analysis):

STRIPS Goal-Stack Algorithm

function STRIPS(state, goals):
    push all goals onto the goal stack
    while goal stack is not empty:
        g ← top of goal stack
        if g is a conjunction of literals:
            push each conjunct onto the stack
        else if g is a single literal:
            if g is satisfied in current state:
                pop g from stack
            else:
                select an action a whose add list contains g
                push a onto the stack
                push preconditions of a onto the stack
        else if g is an action:
            if all preconditions of g are satisfied:
                execute g: state ← (state \ Del(g)) ∪ Add(g)
                pop g from stack
    return action sequence

⚠ Limitations of Goal-Stack Planning

The goal-stack approach is not complete — it can fail on problems where sub-goals interact (the Sussman Anomaly). The order in which sub-goals are stacked can lead to undoing previously achieved goals. This limitation motivated the development of partial-order planners.

4. Blocks World: Detailed Example

🔬 Blocks World Setup

Three blocks A, B, C on a table. We want to build a specific tower.

Initial State:

  • OnTable(A), OnTable(B), OnTable(C)
  • Clear(A), Clear(B), Clear(C)
  • HandEmpty

Goal: On(A, B) ∧ On(B, C)

We want: A on top of B, and B on top of C ⇒ tower C-B-A from bottom to top.

🔬 Step-by-Step Solution

Step 1: MoveFromTable(B, C)

  • Check preconditions: OnTable(B) ✓, Clear(B) ✓, Clear(C) ✓, B ≠ C ✓
  • Add: On(B, C)
  • Delete: OnTable(B), Clear(C)
  • New state: {OnTable(A), OnTable(C), On(B,C), Clear(A), Clear(B), HandEmpty}

Step 2: MoveFromTable(A, B)

  • Check preconditions: OnTable(A) ✓, Clear(A) ✓, Clear(B) ✓, A ≠ B ✓
  • Add: On(A, B)
  • Delete: OnTable(A), Clear(B)
  • New state: {OnTable(C), On(B,C), On(A,B), Clear(A), HandEmpty}

Goal check: On(A,B) ✓ and On(B,C) ✓ — Plan found!

Plan: ⟨MoveFromTable(B,C), MoveFromTable(A,B)⟩ — 2 actions, optimal.

💡 Why Order Matters

If we had placed A on B first, then B would no longer be Clear, and we could not move B onto C without first undoing our work. This sensitivity to ordering leads directly to the Sussman Anomaly.

5. The Sussman Anomaly

📚 Sussman Anomaly

The Sussman Anomaly is a classic planning problem that demonstrates the failure of linear planners (those that solve sub-goals one at a time in a fixed order). No matter which sub-goal is tackled first, achieving it interferes with the other.

🔬 The Sussman Anomaly

Initial State:

  • On(C, A), OnTable(A), OnTable(B)
  • Clear(C), Clear(B)

Goal: On(A, B) ∧ On(B, C)

Attempt 1 — Achieve On(A,B) first:

  1. MoveToTable(C, A) → state: {OnTable(A), OnTable(B), OnTable(C), Clear(A), Clear(B), Clear(C)}
  2. MoveFromTable(A, B) → state: {On(A,B), OnTable(B), OnTable(C), Clear(A), Clear(C)}
  3. Now we need On(B,C), but B is not Clear (A is on it)! Must undo step 2.

Attempt 2 — Achieve On(B,C) first:

  1. MoveFromTable(B, C) → but Clear(C) is true, so: On(B,C), but...
  2. Now we need On(A,B), but A has C on it (in the original state). Still requires moving C first.

Correct solution (interleaved):

  1. MoveToTable(C, A) — free A
  2. MoveFromTable(B, C) — achieve On(B,C)
  3. MoveFromTable(A, B) — achieve On(A,B)

This requires interleaving actions for different sub-goals, which a linear planner cannot do.

⚠ GATE Importance

The Sussman Anomaly is a frequently tested concept. Key takeaway: linear (total-order) planners fail when sub-goals interact negatively. The solution is to use interleaved (partial-order) planning or a planner capable of backtracking.

6. Situation Calculus Connection

📚 Situation Calculus

Situation calculus is a first-order logic formalism for reasoning about actions and change. It uses three key sorts:

  • Situations: sequences of actions starting from S0. Notation: do(a, s) is the situation after doing action a in situation s.
  • Actions: terms like Move(A, B).
  • Fluents: predicates or functions that vary across situations, e.g., On(A, B, s).

In situation calculus, the STRIPS action MoveToBlock(b, x, y) would be axiomatised as:

Situation Calculus Axioms for MoveToBlock

// Precondition axiom
Poss(MoveToBlock(b,x,y), s) ⟺
  On(b, x, s) ∧ Clear(b, s) ∧ Clear(y, s) ∧ b ≠ y

// Successor-state axiom for On
On(b, z, do(a, s)) ⟺
  [a = MoveToBlock(b, _, z) ∨ a = MoveFromTable(b, z)]
  ∨ [On(b, z, s) ∧ ¬(a = MoveToBlock(b, z, _))
                   ∧ ¬(a = MoveToTable(b, z))]

The successor-state axiom neatly solves the frame problem: a fluent is true in the next situation if an action just made it true, or it was already true and no action made it false.

7. Frame Axioms in STRIPS

In the STRIPS representation, frame axioms are handled implicitly:

  • Any fluent not in the add or delete list is automatically unchanged.
  • This is sometimes called the STRIPS assumption.

Without STRIPS, one would need explicit frame axioms:

Explicit Frame Axioms (without STRIPS assumption)

// For every fluent F and every action A that does NOT affect F:
F holds in state s ∧ action A does not delete F
  → F holds in Result(s, A)

// Example: On(C, Table) persists through MoveToBlock(A, Table, B)
On(C, Table, s) → On(C, Table, Result(MoveToBlock(A,Table,B), s))

With n fluents and m actions, naively we need O(n × m) frame axioms. STRIPS eliminates this overhead, which is one reason it became the standard for practical planning systems.

8. Worked STRIPS Example: Four-Block Tower

🔬 Building a Four-Block Tower

Blocks: A, B, C, D

Initial State:

  • On(B, A), OnTable(A), OnTable(C), OnTable(D)
  • Clear(B), Clear(C), Clear(D)

Goal: On(A, B) ∧ On(B, C) ∧ On(C, D)

Target tower (bottom to top): D – C – B – A

Step 1: MoveToTable(B, A)

  • Pre: On(B,A) ✓, Clear(B) ✓
  • Add: OnTable(B), Clear(A)  |  Del: On(B,A)
  • State: {OnTable(A), OnTable(B), OnTable(C), OnTable(D), Clear(A), Clear(B), Clear(C), Clear(D)}

Step 2: MoveFromTable(C, D)

  • Pre: OnTable(C) ✓, Clear(C) ✓, Clear(D) ✓
  • Add: On(C,D)  |  Del: OnTable(C), Clear(D)
  • State: {OnTable(A), OnTable(B), OnTable(D), On(C,D), Clear(A), Clear(B), Clear(C)}

Step 3: MoveFromTable(B, C)

  • Pre: OnTable(B) ✓, Clear(B) ✓, Clear(C) ✓
  • Add: On(B,C)  |  Del: OnTable(B), Clear(C)
  • State: {OnTable(A), OnTable(D), On(C,D), On(B,C), Clear(A), Clear(B)}

Step 4: MoveFromTable(A, B)

  • Pre: OnTable(A) ✓, Clear(A) ✓, Clear(B) ✓
  • Add: On(A,B)  |  Del: OnTable(A), Clear(B)
  • State: {OnTable(D), On(C,D), On(B,C), On(A,B), Clear(A)}

Goal check: On(A,B) ✓, On(B,C) ✓, On(C,D) ✓ — Success!

Plan: ⟨MoveToTable(B,A), MoveFromTable(C,D), MoveFromTable(B,C), MoveFromTable(A,B)⟩

Summary

  • STRIPS represents actions via preconditions, add lists, and delete lists.
  • The state transition is: Result(s, a) = (s − Del(a)) ∪ Add(a).
  • The goal-stack algorithm uses means-ends analysis but is incomplete for interacting sub-goals.
  • The Sussman Anomaly shows that linear planners fail when sub-goals interact — interleaving is required.
  • Situation calculus provides a logical underpinning; successor-state axioms elegantly solve the frame problem.
  • The STRIPS assumption eliminates the need for explicit frame axioms by treating unlisted fluents as unchanged.