CS B551: Elements of
Artificial Intelligence
Instructor: Kris Hauser
http://cs.indiana.edu/~hauserk
1
Announcements
HW1 due today
2
Recap
Heuristic search
Consistent
and admissible heuristics
Heuristic accuracy
Local search
Steepest
descent
Monte Carlo descent and simulated annealing
3
Topics
Search applications
Assembly
planning
Branch-and-bound optimization
Collision detection
Footstep planning for rock-climbing robots
4
Assembly (Sequence) Planning
5
6
Possible Formulation
States: All decompositions of the assembly
into subassemblies (subsets of parts in their
relative placements in the assembly)
Initial state: All subassemblies are made of a
single part
Goal state: Un-decomposed assembly
Successor function: Each successor of a state
is obtained by merging two subassemblies (the
successor function must check if the merging
is feasible: collision, stability, grasping, ...)
Arc cost: 1 or time to carry the merging
7
Successor Function
It implicitly represents all the actions
that are feasible in each state
8
A Portion of State Space
9
10
But the formulation rules out
“non-monotonic” assemblies
11
But the formulation rules out
“non-monotonic” assemblies
12
But the formulation rules out
“non-monotonic” assemblies
13
But the formulation rules out
“non-monotonic” assemblies
14
But the formulation rules out
“non-monotonic” assemblies
15
But the formulation rules out
“non-monotonic” assemblies
This “subassembly” is not
allowed in the definition of
the state space: the 2 parts
are not in their relative
placements in the assembly
Allowing any grouping of parts
as a valid subassembly would
make the state space much
bigger and more difficult
to search
16
Multiple “Hands”
17
Branch-and-bound Optimization
min f(x), x in S
Rn
f
x2
x1
S
Steepest descent and other gradient-based
techniques run into local minima
We want a global optimum
18
Exhaustive Search
S
e
19
Exhaustive Search
S
20
Lower-bound function
for any set A S, returns a lower
bound on f(x) for all xA
fL(A):
f
x2
x1
SA
fL(A)
21
Pruning the Search Tree
1
2
2.5
4
3
Values of fL(A)
f(x) = 3.2
22
Branch-and-bound Algorithm
Let f* be the best value seen so far
Init: f* = f(midpt(S))
FRINGE = {S}
While FRINGE not empty, repeat:
What order?
A=
remove an item from FRINGE
Pruning step
If fL(A) f* or |A|<e, then discard A
f* = min(f*,f(midpt(A))
Split A and add subregions to FRINGE
23
Performance
Works well when
When fL is relatively tight
When n isn’t too large
Methods for generating fL
Interval
analysis
Solving “relaxed” versions of f
Problem-specific ways
24
Example: Needle Steering
Feedback Controller
Controller (reflex-based agent) rule:
Twist at the speed such that the
predicted helix path minimizes the
distance to target
25
Constant-twist-rate helices
26
Reachable points under constanttwist-rates
27
Finding closest point
Find small initial domain
Use cylindrical lower bound
BnB takes <
1ms on average
28
Collision Checking
Check whether objects overlap
29
Hierarchical Collision Checking
Enclose objects into bounding volumes (spheres or boxes)
Check the bounding volumes
30
Hierarchical Collision Checking
Enclose objects into bounding volumes (spheres or boxes)
Check the bounding volumes first
Decompose an object into two
31
Hierarchical Collision Checking
Enclose objects into bounding volumes (spheres or boxes)
Check the bounding volumes first
Decompose an object into two
Proceed hierarchically
32
Hierarchical Collision Checking
Enclose objects into bounding volumes (spheres or boxes)
Check the bounding volumes first
Decompose an object into two
Proceed hierarchically
33
Bounding Volume Hierarchy (BVH)
A BVH (~ balanced binary tree) is
pre-computed for each object
(obstacle, robot link)
34
BVH of a 3D Triangulated Cat
35
Collision Checking
Between Two Objects
A
B
C
BVH of object 1
B
A
C
BVH of object 2
[Usually, the two trees have different sizes]
Search for a collision
36
Search for a Collision
Search tree
AA
pruning
A
A
37
Search for a Collision
Search tree
AA
Heuristic: Break
the largest BV
A
A
38
Search for a Collision
Search tree
AA
BA
CA
Heuristic: Break
the largest BV
B
C
A
39
Search for a Collision
Search tree
AA
BA
CA
CB
CC
C
B
C
40
Search for a Collision
Search tree
AA
BA
CA
CB
CC
If two leaves of the BVH’s overlap
(here, C and B) check their content
for collision
C
B
C
B
41
Search Strategy
If there is no collision, all paths must eventually
be followed down to pruning or a leaf node
But if there is collision, one may try to detect it
as quickly as possible
Greedy best-first search strategy with
f(N) = h(N) = d/(rX+rY)
[Expand the node XY
with largest relative
overlap (most likely to
contain a collision)]
rX
d
rY
Y
X
42
Performance
On average, over 10,000 collision checks per
second for two 3-D objects each described by
500,000 triangles, on a contemporary PC
Checks are much faster when the objects are
either neatly separated ( early pruning) or
neatly overlapping ( quick detection of
collision)
43
Footstep Search in Rock-Climbing
Robots
44
Two Levels of Planning
1)
One-step planning:
Plan a path for moving a foot/hand from
one hold to another
Can be solved using a motion planner
(covered in later lecture)
2)
Footstep planning:
Plan a sequence of one-step paths
Can be solved by searching a stance space
45
Footstep Planning
initial 4-hold
stance
...
3-hold
stance
...
...
...
4-hold
stance
46
Footstep Planning
initial 4-hold
stance
...
3-hold
stance
...
...
...
4-hold
stance
4 possible 3-hold stances
47
Footstep Planning
initial 4-hold
stance
...
3-hold
stance
...
...
...
4-hold
stance
New
contact
several candidate 4-hold stances
48
Footstep Planning
initial 4-hold
stance
...
3-hold
stance
...
...
...
4-hold
stance
?
New
contact
49
Footstep Planning
initial 4-hold
stance
...
3-hold
stance
...
...
...
4-hold
stance
breaking contact / zero force
50
Footstep Planning
one-step planning
initial 4-hold
stance
...
3-hold
stance
...
...
...
4-hold
stance
breaking contact / zero force
The one-step planner is needed to determine if a one-step path exists
between two stances
51
Footstep Planning
initial 4-hold
stance
...
3-hold
stance
...
...
...
4-hold
stance
New
contact
52
Footstep Planning
initial 4-hold
stance
...
3-hold
stance
...
...
...
4-hold
stance
one-step planning
53
Size of Stance Graph
N limbs, H holds: O((H+1)N)
6,750,000
for 4 limbs, 50 holds
Most of these are infeasible
Holds
too far apart, too close together, hands would
cross, no equilibrium, …
Each one-step planning query is expensive (on
order of 0.1-10s)
Assuming
avg of 1s per query, 50 hold problem would
take ~78 days to solve
54
A Two-Stage-Search
Stage 1: footstep search produces small
sets of candidates stances that are likely
to contain a feasible path
Stage 2: one-step planner called only on
those stances
How to assess the likelihood of feasibility?
55
Learning-based approach
Learn probability of
one-step feasibility
using machine
learning (statistical
methods)
2D projection of 100,000 steps in
11D stance space
Statistical
Model
Search
56
The logarithm trick
Order search with highest probability path:
but how?
p = Probability of feasible n-step path =
p1*p2*…*pn
57
The logarithm trick
Order search with highest probability path:
but how?
log p = log p1 + log p2 + … + log pn
58
The Logarithm Trick
Order search with highest probability path:
but how?
log p = log p1 + log p2 + … + log pn
So set edge cost to –log pk
Use uniform-cost search (or A*)
59
Recap
Search has applications in many fields, so
know it well!
60
© Copyright 2026 Paperzz