Artificial Intelligence · Planning
Planning Systems and Goal Stack
Overview
Planning is the process of deciding a course of action before acting, so that an agent can move from a given situation to a desired situation.
A planning problem is specified by an initial state, a goal description, and a set of actions/operators; a plan is a sequence or partial order of actions that achieves the goal.
In the UGC NET Computer Science syllabus, this lesson sits in the Planning area and requires clear understanding of STRIPS, blocks world, goal stack planning, means-ends analysis, and operator subgoaling. The student should already know basic state-space search, sets, and simple first-order logic notation.
Key concepts
- A planning problem has four parts: initial state, goal description, action set, and plan. The plan transforms the initial state into a state satisfying the goal.
- A planning system is a deliberative system: it reasons about future actions using a model of the world. A reactive agent instead maps perception directly to action, usually without constructing a multi-step plan.
- Classical planning assumes deterministic actions, full observability, finite states, and a static world. The closed-world assumption says any proposition not listed in the current state is false.
- STRIPS stands for STanford Research Institute Problem Solver. It was developed at SRI in the early 1970s and used to control the robot Shakey. It is a planning representation and implementation formalism, not a natural language processing formalism.
- STRIPS representation is action-centric: it describes operators/actions. Each operator schema has a name, preconditions, an add list, and a delete list.
- A precondition is a proposition that must hold before an action can be applied. An add list contains propositions made true by the action. A delete list contains propositions made false by the action.
- In basic STRIPS, a state is a set of positive ground literals. Negations are omitted and handled by the closed-world assumption.
- The blocks world is the standard toy domain used to explain a planning system, not primarily a search technique, constraint satisfaction system, or knowledge-base system.
Conventional predicates include ON(x,y), ONTABLE(x), CLEAR(x), HOLDING(x), and ARMEMPTY. Typical actions are STACK, UNSTACK, PICKUP, and PUTDOWN. - Goal stack planning uses a last-in first-out stack containing goals and operators.
For a conjunction, the planner pushes the conjuncts as subgoals; for an unsatisfied simple goal, it finds an operator that adds that goal, pushes the operator, then pushes the operator’s preconditions as new subgoals. - Means-ends analysis compares the current state with the goal state, finds a difference, and selects an operator whose effects can reduce that difference.
If the operator’s preconditions are not true, it sets up subgoals to establish them. - Operator subgoaling is the backward-chaining process in which operators are selected first, and then subgoals are created to establish the preconditions of those operators.
This is the concept named in the standard means-ends analysis description. - A linear plan is a totally ordered sequence of actions: each action is placed before the next. A non-linear plan or partial-order plan leaves some actions unordered and allows interleaving or concurrency.
- The Sussman anomaly is a blocks-world example showing that solving subgoals independently and concatenating the results can fail or produce unnecessary work when subgoals interact.
Correct planning may need to interleave actions for different subgoals. - Goal ordering matters in goal stack planning. Different orders of the conjuncts can lead to different search paths, extra actions, or backtracking.
How it works
Goal stack planning is best understood as a loop over a stack. The planner keeps a current state and a stack whose top item is processed next.
- Initialize the stack with the overall goal.
- Inspect the top item.
- If the top item is a goal:
- If the goal is already satisfied in the current state, pop it.
- If the goal is a compound conjunction, push its conjuncts as subgoals in a chosen order. Because the stack is LIFO, the last conjunct pushed is processed first.
- If the goal is a simple unsatisfied literal, find an operator whose add list contains that literal. Push the operator, then push the operator’s preconditions as subgoals. The operator stays below its preconditions.
- If the top item is an operator:
- If all preconditions are satisfied, apply the operator: delete its delete-list propositions from the state and add its add-list propositions. Then pop the operator.
- If some preconditions are not satisfied, push those unsatisfied preconditions as subgoals.
- Repeat until the stack is empty. If the final state satisfies the original goal, the sequence of applied operators is a plan.
- If a chosen operator leads to failure, the planner may backtrack and try another operator or another ordering of subgoals.
Means-ends analysis is a more general control strategy. It first computes the difference between the current state and the goal. It then selects an operator known to reduce that difference.
If the operator cannot be applied, the missing preconditions become subgoals; this is operator subgoaling. Goal stack planning can be viewed as one implementation mechanism for such subgoal processing.
Drawing the diagram…
Formulas
-
Let be the current state, represented as a set of true propositions. Let , , and be the precondition set, add list, and delete list of action .
-
An action is applicable in state exactly when:
-
After applying an applicable action , the new state is:
-
Here removes the deleted propositions, and adds the new propositions. If a proposition appears in both lists, the set formula lets the add list win; standard STRIPS examples avoid this overlap.
-
A goal is satisfied in state when:
-
For a conjunctive goal , every must hold in the final state.
Worked examples
Example 1: STRIPS state update.
An action has preconditions , add list , and delete list . The current state is .
Check applicability: , so the action is applicable.
Compute: .
Final state: .
Example 2: Goal stack pop count.
A stack contains, from bottom to top, . The top item is a goal already satisfied in the current state, so it is popped. The next top item is the operator .
Number of goal items popped before is processed: .
Example 3: Interacting operators.
Op1 has precondition , add , delete . Op2 has precondition , add , delete . The initial state is , and the goal is .
Apply Op1: state becomes . Apply Op2: state becomes . This cycles forever. No state contains both and .
Final answer: no plan exists using only these two operators. This illustrates that achieving subgoals one by one can destroy an earlier subgoal.
Example 4: Match-the-list style.
Match: A. Precondition, B. Add list, C. Delete list, D. Goal stack.
Definitions: i. propositions made false by an action; ii. propositions that must hold before an action; iii. propositions made true by an action; iv. a LIFO list of goals and operators.
Correct matching: A-ii, B-iii, C-i, D-iv.
Example 5: Sussman anomaly.
Initial blocks world: on , on table, on table. Goal: and .
If the planner first achieves , it may move off , then stack on . Now is not clear, so to achieve it must unstack , stack on , and then restack on .
A better non-linear order is: move off , stack on , then stack on .
The anomaly shows that independent subgoal solving in a fixed order can be inefficient or can fail without reconsideration.
Comparison
| Concept | Meaning | Key exam point |
|---|---|---|
| Precondition | Must hold before action | Check before applying action |
| Add list | Propositions made true | Added after deletion |
| Delete list | Propositions made false | Removed before addition |
| Goal stack | LIFO list of goals and operators | Order of pushing affects search |
| Goal stack planning | Means-ends analysis |
|---|---|
| Uses a stack of goals and operators | Uses differences between current and goal state |
| Achieves goals by pushing subgoals and operators | Selects operator to reduce a difference |
| Operator subgoaling is a step inside it | Operator subgoaling is central to the strategy |
| Can suffer from bad conjunct ordering | Also needs subgoal interaction handling |
| Linear plan | Non-linear plan |
|---|---|
| Totally ordered sequence of actions | Partial order; some actions may interleave |
| Every action is before the next | Not every pair is ordered |
| Simple to execute | Better for interacting subgoals |
| Planning system | Reactive agent |
|---|---|
| Builds a multi-step plan using a world model | Maps perception directly to action |
| Deliberative and future-oriented | Stimulus-response style |
| Can reason about preconditions and effects | Usually does not construct a plan |
Revision summary
- STRIPS is action-centric, not feature-centric.
- Precondition = must be true; Add = becomes true; Delete = becomes false.
- Apply action only if .
- State update: remove delete list, then add add list.
- Closed-world assumption: unlisted propositions are false.
- Goal stack is LIFO; last pushed item is processed first.
- For a conjunction, push conjuncts as subgoals; ordering matters.
- Operator subgoaling selects an operator and then sets subgoals for its preconditions.
- Means-ends analysis centers on differences between current state and goal.
- Sussman anomaly shows independent subgoal solving can fail when subgoals interact.
- Blocks world is used to explain planning systems.
- Linear plan = fixed total order; non-linear plan = partial order.
Previous-year exam insights
- Direct concept questions ask what a planning system does, what a plan is, and which information an action description specifies.
- STRIPS questions test the action-centric representation and the roles of precondition, add list, and delete list.
- History-based questions test that STRIPS was developed at SRI for Shakey and is not a natural language processing formalism.
- Match-the-list questions pair initial state, goal description, action, plan, precondition, add list, delete list, and goal stack with their definitions.
- Statement and assertion-reason questions test Sussman anomaly, goal-stack ordering, linear plans, and independent subgoal solving.
- Numeric questions ask for the resulting state after a STRIPS action or the number of stack items popped before an operator is processed.
- A common trap is reversing add and delete lists, or applying an action without checking its preconditions.
- Another trap is treating goal stack planning as always complete without backtracking; interacting subgoals can require reordering.
Practice at PARIKSHA
You are ready for the PARIKSHA tests of this sub-topic when you can:
- Define a planning problem using initial state, goal description, actions, and plan.
- Write a STRIPS operator with preconditions, add list, and delete list for a simple action.
- Apply a STRIPS action to a state and compute the new state correctly.
- Trace a goal stack through several push and pop steps on a small block-world goal.
- Explain the difference between means-ends analysis and goal stack planning.
- Explain operator subgoaling in your own words.
- Describe the Sussman anomaly and why non-linear planning helps.
- Distinguish linear plans from partial-order plans.
- Match planning terms such as precondition, add list, delete list, and goal stack with definitions.
- Identify the correct plan or failure when two operators interfere with each other.
Attempt the sub-topic test first, then the subject test.