Converting planning problems into Boolean satisfiability problems
SAT-based planning converts a planning problem into a Boolean satisfiability (SAT) problem, then uses powerful SAT solvers to find a solution.
Instead of searching through states, we encode the planning problem as logical formulas and let a SAT solver determine if a plan exists!
States, actions, goals
Boolean formulas (CNF)
Find satisfying assignment
SAT-based planning was introduced by Kautz & Selman (1992) in their seminal paper "Planning as Satisfiability". This approach revolutionized automated planning!
Key insight: Modern SAT solvers are incredibly efficient at solving large Boolean formulas, making this approach practical.
Propositionalization is the process of converting first-order planning representations into propositional (Boolean) logic that SAT solvers can understand.
First, we decide the maximum plan length T (number of time steps).
T = 3 steps initially.
If no plan exists, we increment T and try again.
For each fluent and action, create Boolean variables for each time step:
Assert that all initial fluents are true at time t=0,
and all others are false (Closed-World Assumption).
Assert that all goal fluents are true at time t=T (final time step).
Add axioms that encode:
Convert all formulas to Conjunctive Normal Form (CNF) - a conjunction of disjunctions (AND of ORs).
Pass the CNF formula to a SAT solver (e.g., MiniSat, Glucose, Z3).
Exclusion axioms ensure that at most one action is executed at each time step. This prevents the plan from executing multiple conflicting actions simultaneously.
For every pair of different actions Ai and Aj, at every time step t:
Meaning: "Action i at time t OR action j at time t must be false" (i.e., both cannot be true at the same time)
Suppose we have three actions:
Remove(Flat, Axle)Remove(Spare, Trunk)PutOn(Spare)For n actions and T time steps, we need:
Example: With 10 actions and 5 time steps: 10×9/2 × 5 = 225 exclusion axioms!
Precondition axioms ensure that an action can only be executed if its preconditions are satisfied in the current state.
For an action A with preconditions P₁, P₂, ..., Pₙ at time t:
Which is equivalent to (converting to CNF):
Successor-state axioms (also called explanatory frame axioms) specify when and how fluents change from one time step to the next. They solve the frame problem efficiently!
For a fluent F at time t+1:
Meaning: "F is true at t+1 if either:
1. An action that adds F was executed at t, OR
2. F was already true at t AND no action that deletes F was executed"
Challenge: Most fluents stay the same from one time step to the next. We need to specify what doesn't change!
Solution: Successor-state axioms compactly encode both what changes AND what stays the same, avoiding the need for explicit "frame axioms" for every fluent-action pair.
Let's build the successor-state axiom for At(Spare, Axle):
PutOn(Spare)Remove(Spare, Axle)Unload(C1, P1, JED)Unload(C1, P2, JED)Load(C1, P1, JED)Load(C1, P2, JED)
The bi-conditional Ft+1 ↔ X is converted to two implications:
Then further distribute to get pure CNF clauses!
Modern SAT solvers can handle formulas with millions of variables and tens of millions of clauses. They use sophisticated algorithms like DPLL, CDCL, and advanced heuristics.
SAT solver performance has improved exponentially over the past 30 years:
SAT solvers typically use the DIMACS CNF format:
Each line is a clause. Positive numbers = positive literal, negative = negated. 0 marks end of clause.
Annual SAT Competitions drive innovation in SAT solving:
Let's encode the Spare Tire problem with plan length T=3:
The SAT solver returns a satisfying assignment:
Solution Plan:
Transform planning → SAT
Exclusion, precondition, successor-state
Modern SAT solvers are fast!