Finding Search Heuristics
Henry Kautz
A* Graph Search for Any
Admissible Heuristic
if State[node] is not in closed OR
g[node] < g[LookUp(State[node],closed)]
then
Inconsistent but Admissible
Memory Efficient Versions of A*
• Iterative Deepening A* (IDA*)
– Just like IDS, except that:
• Stopping condition: g(n)+h(n)=f(n) > Cutoff
• Increment: Min{ f(n) | n was cutoff last iteration}
– Optimal
– Memory linear in cheapest path
– Will re-expand nodes frequently
Memory-Bounded A*
• Throw nodes out of Closed and/or Fringe when
memory gets low
– Dropping nodes from Closed can make extra work,
but doesn’t hurt optimality
• Dropping nodes from Fringe:
– Choose worst node n from Fringe
– Set f(Parent(n)) = Max { f(Parent(n)),
Min{ f(n’) | n=Parent(n’) }
– If Parent is not in Fringe, put it in Fringe
• Many variations – MA*, SMA*, SMAG*, …
Properties of Heuristics
• Let h1 and h2 be admissible heuristics
• if for all s, h1(s) h2(s), then
– h1 dominates h2
– h1 is better than h2
• h3(s) = max(h1(s), h2(s)) is admissible
– h3 dominates h1 and h2
Exercise: Rubik’s Cube
• State: position and orientation of each
cubie
– Corner cubie: 8 positions, 3 orientations
– Edge cubie: 8 positions, 2 orientations
– Center cubie: 1 position – fixed
• Move: Turn one face
– Center cubits never move!
• Devise an admissible heuristic
Heuristics
• # cubies out of place / 8
– Must divide up 8 so is admissible
– Too optimistic / weak
• Better:
Manhattan dist edge cubies / 4,
max
Manhattan dist corner cubies / 4
• Korf 1997 – Solves Rubik’s cube optimally
Automatically Deriving
Heuristics for STRIPS planning
• Goal: quickly compute upper bound on
distance from S to a state containing
Goals
• Consider:
|Goals – S|/m
where m is the maximum number of goals
added by any one action
Yes!
• Admissible?
• Accurate?
No, ignores preconditions!
Another Attempt
• Create relaxed planning problem: Solve
– Initial = S
– Same Goals
– Eliminate negative effects from all operators
• Use length of shortest solution to relaxed
problem as h
– Admissible?
Yes!
– Accurate?
Pretty good
No, hard as set covering!
– Easy to compute?
Plan Graph Heuristic
•
•
Idea: Quickly estimate the minimum length of
solution of relaxed problem
Method:
1. For each literal, create a dummy “persistence” action
with that literal as precondition and effect
2. Compute a Plan Graph:
•
•
•
•
…
S0: initial literals
A0: actions whose preconditions are in S0
S1: add effects of actions in A0
A1: actions whose preconditions are in S1
Plan Graph Heuristic
•
Method (continued):
3. Propagate mutual exclusions (mutexes):
•
•
•
Two non-persistence actions at the same level are
mutex
A persistence action is mutex with an action that
whose effect negates it
Two literals A and B are mutex at level i if all the
actions that add A are mutex with those that add B
4. Estimated length = lowest level containing all
goals with no mutexes between them
Example Plan Graph
Is Planning Solved?
• A* with plan graph heuristic works well for
domains with relatively few bad
interactions between actions
• For “harder” domains:
– Solve non-optimally using non-admissible
heuristics
– Solve optimally using other approaches –
such as satisfiability testing
• More later in the course!
© Copyright 2026 Paperzz