Classical Planning and the STRIPS Formalism

Automated planning fundamentally addresses the computational challenge of determining an optimal or satisfactory sequence of actions that can systematically transform an initial, known configuration of the world into a predefined goal state. This paradigm, known as classical planning, operates under several strict assumptions: the environment is fully observable, deterministic (actions always have the same, predictable outcome), static (changes only occur due to the agent’s actions), and the agent has an explicit, complete model of the world. The complexity of solving such problems necessitates a formal, unambiguous language for representation, with the STRIPS (Stanford Research Institute Problem Solver) formalism being a cornerstone in Artificial Intelligence research.

The STRIPS Formalism

STRIPS, developed in the early 1970s, provides a simple yet powerful declarative language for describing planning problems.

Definition

A planning problem within the STRIPS framework is formally defined by a tuple , where is a set of propositions, is a set of operators (actions), is the initial state, and is the goal specification.

A key principle adopted by STRIPS is the Closed World Assumption (CWA), which posits that any proposition not explicitly stated as true in a given state is assumed to be false.

In the provided scenario involving a robot in a two-room environment (, ), the Initial State () is defined by a conjunction of positive ground literals (propositions without variables), representing all facts that are true at the start. Specifically, is given by

According to the CWA, the state implicitly contains the negation of all other possible propositions, such as or . The Goal State () is a partial specification—a conjunction of literals that must be satisfied for the problem to be solved: . Unlike the initial state, literals not mentioned in the goal are considered irrelevant; the plan is successful as long as all goal literals are true.

Action Schemas and State Transition

Actions, or operators, define the transitions between states. In STRIPS, an action schema specifies a Preconditions list (), an Add list (), and a Delete list (). The preconditions are a set of positive literals that must hold true in the current state for the action to be applicable. When an action is executed, all literals in its Delete-list are removed from the current state, and all literals in its Add-list are introduced, forming the resulting state. This structure effectively handles the Frame Problem—the issue of explicitly specifying which facts do not change—by only listing the changes ( and lists), and implicitly assuming everything else remains the same.

The provided action schemas illustrate this mechanism:

  • The action, where is a variable representing a room, requires the and to be in the same room (), deleting the predicate and adding the predicate.
  • The action requires and as preconditions, deleting and adding .
  • The action necessitates that the is in room , the is , and (the robot is moving to a distinct room). Executing it deletes and adds .

The entire planning task then reduces to searching the state-space graph, where nodes represent world states (conjunctions of true literals) and directed edges represent executable actions, seeking a path from the unique initial state to any state that satisfies the goal condition . The major difficulty in classical planning often lies in the exponential explosion of this state space, which is why efficient search algorithms and heuristic methods are critical to finding a valid plan.

Efficient Approaches to Classical Planning

While the foundational STRIPS formalism provides a structured representation for planning problems, the corresponding state-space graph can exhibit a combinatorial explosion, rendering basic classical search algorithms like Breadth-First Search (BFS) or A* search prohibitively inefficient for large domains. To overcome this limitation, more sophisticated and efficient techniques have been developed, primarily focusing on constraining the search space or leveraging problem structure. Key approaches include the SATPlan reduction, GraphPlan’s graph-based approach, and Hierarchical Planning’s use of abstraction.

SATPlan is a powerful method that strategically reframes the planning problem as a Boolean Satisfiability (SAT) problem. This involves generating a sequence of propositional formulas, , where each is satisfiable if and only if a plan of length exists. The formula incorporates representations of the initial state, the goal state at time , and an encoding of all action schemas and state transitions across time steps. By iteratively checking the satisfiability of using highly optimized SAT solvers, the shortest plan can be found. A satisfying assignment of the Boolean variables directly corresponds to a valid sequence of actions.

Hierarchical Planning (often formalized as Hierarchical Task Network - HTN planning) is inspired by human problem-solving, which often involves decomposition. This approach breaks down complex, high-level tasks into smaller, more manageable sub-problems, which are themselves recursively decomposed until they can be solved by primitive actions. This hierarchical structure significantly prunes the search space by focusing the planner on relevant sub-tasks, making it particularly effective for domains with inherent task structure.

GraphPlan

The GraphPlan algorithm, developed by Avrim Blum and Merrick Furst, offers a significant efficiency improvement by combining a forward, constructive approach with a backward, deductive search. It consists of two interleaved phases: graph expansion and solution extraction.

Phase 1: Planning Graph Expansion

The algorithm constructs a planning graph, which is a directed, bipartite graph alternating between State-Levels () and Action-Levels ().

  • State-Level (): Represents the set of all literals (positive or implicitly negative via CWA) that could potentially be true at time step .
  • Action-Level (): Represents the set of all actions whose preconditions are all present in the preceding state-level .

The construction proceeds iteratively from the initial state :

  1. is initialized with the literals of the problem’s initial state .
  2. is formed by identifying all actions from the operator set whose preconditions are subsets of the literals in . This level also includes persistence actions (or no-ops), which are meta-actions representing the fact that a literal from remains true in .
  3. is formed by taking the union of the Add-lists of all actions and persistence actions in .

Example

For the Vacuum-Cleaner World example, the graph expansion demonstrates this process:

  • includes (precondition ) and (precondition ), along with persistence actions for ‘s literals.
  • combines the Add-lists: adds , adds , and persistence maintains , leading to
  • The expansion continues until the graph levels off, meaning .

A critical concept for pruning the search space within the planning graph is mutual exclusion (mutex). Mutex links connect pairs of actions or literals that cannot co-occur in any valid plan at a given level.

  • Mutex Actions at : Two actions are mutex if one’s Add-list conflicts with the other’s Preconditions (destructive interference), if one’s Delete-list conflicts with the other’s Preconditions (inconsistent support), or if their Add-lists are in conflict (competing needs). For instance, the and actions may be mutex if deletes and requires it as a precondition.
  • Mutex Literals at : Two literals are mutex if all possible pairs of actions in that produce them are mutex. For example, and are mutex because they cannot be established simultaneously by non-mutex actions.

Phase 2: Solution Extraction

Once the goal literals are all present in and are pairwise non-mutex, the algorithm initiates a backward search from to find a valid plan. This search selects a non-mutex set of actions from that collectively satisfy all goal literals. The preconditions of these selected actions then become the subgoals for , and the process recurses until is reached. If the backward search fails, the graph is expanded to and the search is retried.

The index of the first state-level that contains the goal propositions, denoted as , is an effective heuristic known as the level cost. Since the graph construction makes no guarantees that the goal literals are non-mutex at this level, is an admissible heuristic (a lower bound on the true plan length) for the number of steps in the optimal plan. This makes it highly valuable for guiding external search algorithms like A*.

Hierarchical Planning and Task Network Decomposition

For problems of significant scale and complexity, particularly those found in robotics or game Artificial Intelligence (AI), the flat structure of classical planning with only primitive actions becomes computationally unmanageable and epistemologically inadequate. Hierarchical Planning addresses this challenge by introducing multiple levels of abstraction, formally realized through the Hierarchical Task Network (HTN) Planning paradigm. The HTN approach finds a plan by recursively decomposing abstract tasks until a sequence composed entirely of executable primitive actions is derived.

HTN planning defines a planning domain using three primary constructs, which allow for structured problem decomposition:

  1. Primitive Tasks (Operators): These are the fundamental, executable actions that directly affect the world state, analogous to the STRIPS actions (e.g., ). They have explicitly defined preconditions and effects (Add and Delete lists).
  2. Compound Tasks: Also known as abstract goals, these represent high-level objectives that cannot be executed directly (e.g., ). Achieving a compound task requires a structured decomposition process.
  3. Methods (Decomposition Recipes): Methods specify how a particular compound task can be broken down into a partially ordered or totally ordered sequence of subtasks. A crucial feature is that a compound task may have multiple methods associated with it, each representing a distinct strategy for achieving the task.

The HTN planner’s objective is to search through the space of possible task decompositions, starting from an initial task network, until every node in the network is a primitive task. The final plan is the sequence of these primitive tasks in the resulting network. This contrasts sharply with classical state-space planning, where the search is conducted over world states. In HTN, the search is conducted over possible task networks.

Task Decomposition and Contextual Execution

The Travel Planning example clearly illustrates the decomposition process. The compound task can be achieved by multiple high-level methods, such as , , or . The selection of a method depends on the prevailing constraints (e.g., distance, available resources). The chosen method, , then decomposes into a sequence of more specific subtasks: . Since is itself complex, it can be further decomposed into primitive actions like , , and , which are the actual executable steps.

The structured nature of HTN planning allows for highly context-aware and conditional behaviors, as highlighted by the game AI example involving the compound task .

  • Conditional Methods: Methods often include conditions that must be satisfied for the decomposition to be applicable. The first method, , is only chosen if the agent’s world state () indicates an enemy is visible. This path leads to the execution of subtasks: .
  • Default/Fallback Methods: The second method, , is a default choice, applicable when the primary condition is false. This decomposition, , guides the agent to a different, less aggressive behavior when no immediate threat is present.
Compound Task [BeTrunkThumper] 
	Method [WsCanSeeEnemy==true] 
		Subtasks [NavigateToEnemy(), DoTrunkSlam()] 
	Method [true] 
		Subtasks [ChooseBridgeToCheck(), NavigateToBridge(), CheckBridge()]

Primitive Task [DoTrunkSlam] 
	Operator [AnimatedAttackOperator(TrunkSlamAnimNa 
	
Primitive Task [NavigateToEnemy] 
	Operator [NavigateToOperator(EnemyLocRef)] 
		Effects [WsLocation = EnemyLocRef] 
	
Primitive Task [ChooseBridgeToCheck] 
	Operator [ChooseBridgeToCheckOperator] 

Primitive Task [NavigateToBridge] 
	Operator [NavigateToOperator(NextBridgeLocRef)] 
		Effects [WsLocation = NextBridgeLocRef] 

Primitive Task [CheckBridge] 
	Operator [CheckBridgeOperator(SearchAnimName)]

This ability to incorporate conditional logic and structural constraints directly into the decomposition recipes is what grants HTN planning its power in generating plans that reflect complex, domain-specific strategies, moving beyond the simple goal-reaching of basic STRIPS. The execution of the Primitive Task , for instance, is directly linked to an Operator that, upon completion, enforces a change in the world state, such as setting the agent’s location to the enemy’s location (). HTN planning systems are thus particularly well-suited for systems where the path to the goal is more important than just the final state (e.g., following a specific protocol or procedure).

Real-World Planning and Robustness

While formalisms like STRIPS and algorithms like GraphPlan provide a rigorous foundation for automated reasoning, they operate within a theoretical vacuum defined by strict, often unrealistic constraints. Deploying planning agents in the real world necessitates a departure from these idealized conditions.

The Limitations of Classical Assumptions

Classical planning rests upon a “closed-world” philosophy, assuming a controlled environment where the agent is effectively omniscient and omnipotent within its domain. Specifically, these algorithms presume:

  • the environment is fully observable (the agent has perfect, zero-latency access to the global state) and deterministic (actions obey strict physical laws with unique, predictable outcomes).
  • the world is assumed to be static and discrete; strictly speaking, this means no changes occur unless initiated by the agent (no “exogenous events”), and time and space can be cleanly divided into distinct steps or grid units.

Classical planning typically assumes a single-agent context where the planner is the sole active entity, operating with a complete and correct model of the “laws of physics” governing the domain.

In reality, these assumptions rarely hold: sensors are noisy and limited (partial observability), motors slip and fail (stochasticity/non-determinism), and environments are dynamic, populated by other actors or natural forces that change the state of the world independently of the agent. When these assumptions are violated, a classical plan—which is essentially a rigid, linear script—becomes brittle and prone to catastrophic failure.

Uncertainty and Multi-Agent Systems

To address these limitations, the planning paradigm must be extended to incorporate uncertainty and external interaction.

Non-Deterministic and Sensorless Planning

When the assumption of determinism is relaxed, an action may result in one of several possible outcomes. If the agent also lacks sensory feedback—a scenario known as Sensorless Planning—it faces a profound challenge. In this context, the agent does not track a single current state but rather a belief state, which is the set of all physical states the world might be in.

The objective is to find a conformant plan: a sequence of actions that coerces the world into the goal state regardless of which non-deterministic outcomes actually occur.

Conditional Planning and Policies

When the environment is partially observable but the agent possesses sensors, it can employ Conditional Planning (or Contingency Planning). Unlike classical plans, which are linear sequences, conditional plans introduce branching logic. The planner generates a structure that resembles a decision tree, incorporating sensing actions to disambiguate the state of the world at runtime.

The output is often not a fixed plan, but a policy ().

Definition

A policy is a mapping from every possible perceived state (or belief state) to an optimal action ().

For instance, a rover on Mars might have a policy: “Approach rock. IF spectrometer indicates carbonates, drill. ELSE, move to next target.” This allows the agent to react adaptively to information that is only available during execution.

Multi-Agent Planning (MAP)

The Multi-Agent Planning extension relaxes the single-agent assumption, acknowledging that the environment is populated by other autonomous entities. This introduces significant complexity because the environment becomes non-static; changes occur due to the actions of others. MAP distinguishes between cooperative environments (e.g., a swarm of drones fighting a fire), where agents share a joint goal and must coordinate to avoid collisions or redundancy, and adversarial environments (e.g., chess or military strategy), where agents must model the opponent’s intentions to optimize their own utility.

Execution Monitoring and Dynamic Replanning

Given that real-world models are rarely perfect, an agent must be capable of Execution Monitoring. This involves a continuous control loop: Planning Execution Observation. The agent constantly compares its percepts (the actual state, ) against its internal prediction (the expected state, ). If a discrepancy is detected—indicating the plan has failed—the agent must initiate a Replanning phase.

We can categorize replanning strategies based on how they handle the deviation from the expected path. Consider a scenario where an agent intended to move from a pre-failure state to an expected state , but an unexpected event places it in state .

  1. Global Replanning (Plan to ): The most robust but computationally expensive approach. The agent discards the existing plan entirely and invokes the planner to find a new path from the current actual state to the ultimate goal .
  2. Plan Repair (Plan to ): The agent attempts to minimize computational effort by “fixing” the local error. It searches for a short sequence of actions to return from the deviant state back to the pre-failure state (or the original expected state ), effectively trying to get “back on track” to resume the original plan.
  3. Serendipitous Replanning: Occasionally, an unexpected event may be beneficial. If the state is actually closer to the goal than was, the agent can exploit this “luck” by planning a new, shorter path from to a later stage in the original plan, bypassing intermediate steps.

In highly dynamic environments where the world changes faster than a complete plan can be generated, agents may adopt an Online Planning strategy. Rather than formulating a complete solution from start to finish, the agent plans only a short “horizon” into the future (e.g., the next 5 steps), executes the first step, observes the result, and immediately replans the updated horizon. This “look-ahead” approach allows the agent to remain responsive to a rapidly changing environment.

Problem Modeling

Before any computational algorithm can be successfully applied, the problem at hand must be translated into a formal model. This phase is arguably the most critical step in the engineering process, as the choice of representation—how states, actions, and goals are defined—directly dictates the computational complexity and the specific family of algorithms suitable for finding a solution. An ill-conceived model can render a trivial problem intractable, while an elegant model can expose efficient heuristics and solution paths.

Framework for Problem Classification

To select the appropriate algorithmic approach, one must first fundamentally categorize the nature of the problem. This categorization hinges on the definition of a “solution” within the specific domain.

Path-Based vs. State-Based Solutions

The primary distinction lies in whether the solution is defined by the state itself or the path taken to reach it. In problems such as route planning, logistics, or the 8-puzzle, the final state is often trivial or explicitly known (e.g., “be at the destination”); the computational challenge is to discover a valid sequence of actions (a path) that transitions the system from an initial state to the goal state.

These problems fall under the domain of Classical Search or Automated Planning. Conversely, in problems like the N-queens puzzle, Sudoku, or exam scheduling, the sequence of steps taken to arrange the elements is irrelevant. The objective is simply to find a specific configuration (state) that satisfies a set of constraints. These are classified as Constraint Satisfaction Problems (CSPs) or optimization problems, where the cost or utility is associated with the state itself (e.g., the number of constraint violations) rather than the transition cost.

Cost Dynamics in Path-Finding

Within path-based problems, a further distinction must be made regarding the cost of actions. If the objective is to optimize the journey—finding the path with the lowest cumulative cost—algorithms that account for edge weights, such as A* or Uniform Cost Search, are required. These algorithms utilize an objective function to minimize the path cost, . However, if all actions are effectively equal (having a uniform cost, typically 1) and the goal is simply to find the shortest path in terms of the number of steps, unweighted search strategies like Breadth-First Search (BFS), Depth-First Search (DFS), or Iterative Deepening Search (IDS) are sufficient and often more computationally efficient.

Choosing a State Representation

The efficiency of a solver is heavily influenced by the “structure” or level of abstraction used to represent the world states. There are three primary levels of state representation, offering a trade-off between expressiveness and algorithmic complexity.

Atomic Representations

At the lowest level of complexity is the atomic representation, where each state is treated as a “black box” with no internal structure. In this model, states are indivisible entities (e.g., node “A” or node “B” in a graph). The algorithm can check for equality (is State A the same as State B?) but cannot reason about why a state is desirable or how close it is to a goal based on its features. This representation is standard for basic graph search algorithms like BFS or DFS but is limited in its ability to support complex heuristics.

Factored Representations

A significant leap in expressiveness is achieved with factored representations. Here, a state is defined by a fixed set of variables or attributes, each assigned a value.

For example, a state might be represented as a vector . In a map-coloring problem, a state is not just a node, but a collection of variable-value pairs (e.g., ).

This allows algorithms to examine the internal components of a state, enabling the development of heuristics based on the number of satisfied variables, which is essential for CSPs and local search algorithms.

Structured Representations

The most expressive form is the structured representation, which models the world using objects and the logical relationships between them, often utilizing a subset of First-Order Logic. A state is described by a conjunction of literals, such as . Unlike factored representations, which typically have a fixed number of variables, structured representations can describe worlds with varying numbers of objects and complex, relational dynamics. This is the standard for Classical Planning (using languages like STRIPS or PDDL), as it allows the solver to reason about general rules (actions) that apply to classes of objects.

Practical Guidelines for Modeling

To synthesize these concepts into a practical workflow, one can apply a decision-making hierarchy when approaching a new problem.

If the problem requires a sequence of actions to transition between states, it should be modeled as a search problem. If the internal structure of the state is relevant to the transitions (as in robotics), a Planning approach using structured states is ideal; otherwise, Classical Search with atomic or factored states suffices.

If the sequence is irrelevant and the goal is merely to find a specific configuration, the choice depends on the nature of the goal states. If some final states are “better” than others (e.g., minimizing fuel consumption or maximizing schedule preferences), the problem should be modeled as an Optimization problem, solvable via Local Search techniques like Hill Climbing or Simulated Annealing. However, if all valid final states are equally acceptable—meaning the difficulty lies solely in finding any state that satisfies the rules—the problem is best modeled as a Constraint Satisfaction Problem (CSP).

Case Studies

Final Guidelines for Problem Modeling

The final guidelines for automated problem solving emphasize that the art of modeling—the choice of representation—is often more critical than the selection of the solving algorithm itself. A well-chosen model aligns naturally with the problem’s underlying structure, leading to a more efficient and tractable solution.

A Hierarchy of Modeling Paradigms

The relationship between the major problem-solving frameworks can be viewed as a hierarchy, where the complexity of the solution requirement dictates the appropriate modeling choice. This framework, based on determining what constitutes the “solution,” guides the translation from a real-world problem into a formal AI representation.

  1. Constraint Satisfaction Problems (CSPs): This represents the foundational level, where the solution is a final state that merely satisfies a set of imposed constraints. The key characteristic is that all valid solutions are considered equally good; the path taken to reach is irrelevant. Modeling as a CSP is suitable for configuration tasks like map coloring or logical assignments, focusing the solver entirely on feasibility and constraint propagation.

  2. Optimization Problems (Local Search): Building upon the CSP concept, optimization problems also seek a final state, but they incorporate an objective function to differentiate the quality or cost of various valid solutions. Modeling as an Optimization problem is appropriate when the goal is to maximize utility or minimize cost in the final configuration (e.g., maximizing profit in scheduling). These are typically addressed by Local Search algorithms, which move iteratively through the state space toward local optima, often treating the sequence of moves as secondary to the final state’s objective value.

  3. Classical Search and Planning: This is the most expressive and computationally demanding level, where the solution is defined explicitly as the sequence of actions (the path) required to transform an initial state into a goal state . Modeling as Classical Search (for factored states) or Planning (for structured, relational states) is necessary for domains where history and transition cost are paramount, such as robotics or logistics.

It is possible to reformulate a problem from a lower level into a higher one (e.g., treating a CSP as a search problem). However, this often sacrifices computational efficiency, as specialized solvers, such as constraint propagation techniques for CSPs, are often far more effective than general-purpose graph search when the path is not the core issue.

The “More Reasonable” Representation

The ultimate goal of problem modeling is not to find a representation that is merely possible, but one that is “more reasonable.” A reasonable model is characterized by three core properties:

  1. Natural Fit (Semantic Structure): The model should intuitively reflect the actual structure and mechanisms of the domain. For instance, using a logical, structured state representation (PDDL) for a logistics problem involving objects and their locations is more natural and expressive than attempting to define the same state using a single, monolithic factored array.
  2. Computational Tractability (Efficiency): The representation must lend itself to efficient algorithmic solutions. A model that unnecessarily introduces high dimensionality or irrelevant path-based complexity into an otherwise simple constraint problem will lead to the combinatorial explosion of the search space, rendering the problem unsolvable in practice.
  3. Ease of Definition and Modification (Modularity): The rules, states, and goal conditions should be easy to specify and modify. Declarative models, such as the STRIPS formalism, excel here, as rules are expressed via explicit action schemas (preconditions, effects) rather than being hard-coded into procedural functions. This separation of logic (the model) from the solver (the algorithm) enhances domain flexibility.

Choosing the right modeling paradigm—CSP, Optimization, or Planning—based on whether the solution is a state, an optimized state, or a necessary path, is the fundamental step in translating a real-world challenge into a solvable AI problem.