600 likes | 743 Views
CS B551: Elements of Artificial Intelligence. Instructor: Kris Hauser http://cs.indiana.edu/~hauserk. Announcements. HW1 due today. Recap. Heuristic search Consistent and admissible heuristics Heuristic accuracy Local search Steepest descent Monte Carlo descent and simulated annealing.
E N D
CS B551: Elements of Artificial Intelligence Instructor: Kris Hauser http://cs.indiana.edu/~hauserk
Announcements • HW1 due today
Recap • Heuristic search • Consistent and admissible heuristics • Heuristic accuracy • Local search • Steepest descent • Monte Carlo descent and simulated annealing
Topics • Search applications • Assembly planning • Branch-and-bound optimization • Collision detection • Footstep planning for rock-climbing robots
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
Successor Function • It implicitly represents all the actions that are feasible in each state
But the formulation rules out “non-monotonic” assemblies X This “subassembly” is not allowed in the definition of the state space: the 2 partsare 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
f Branch-and-bound Optimization • min f(x), x in S Rn • Steepest descent and other gradient-based techniques run into local minima • We want a global optimum x2 S x1
Lower-bound function • fL(A): for any set A S, returns a lower bound on f(x) for all xA f x2 S A fL(A) x1
1 2 4 2.5 3 Values of fL(A) f(x) = 3.2 Pruning the Search Tree
What order? 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: • A = remove an item from FRINGE • If fL(A) f* or |A|<e, then discard A • f* = min(f*,f(midpt(A)) • Split A and add subregions to FRINGE Pruning step
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
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
Find small initial domain Finding closest point Use cylindrical lower bound BnB takes < 1ms on average
Collision Checking • Check whether objects overlap
Hierarchical Collision Checking • Enclose objects into bounding volumes (spheres or boxes) • Check the bounding volumes
Hierarchical Collision Checking • Enclose objects into bounding volumes (spheres or boxes) • Check the bounding volumes first • Decompose an object into two
Hierarchical Collision Checking • Enclose objects into bounding volumes (spheres or boxes) • Check the bounding volumes first • Decompose an object into two • Proceed hierarchically
Hierarchical Collision Checking • Enclose objects into bounding volumes (spheres or boxes) • Check the bounding volumes first • Decompose an object into two • Proceed hierarchically
Bounding Volume Hierarchy (BVH) A BVH (~ balanced binary tree) is pre-computed for each object (obstacle, robot link)
A A C C B B Collision Checking Between Two Objects BVH of object 1 BVH of object 2 [Usually, the two trees have different sizes] Search for a collision
pruning Search for a Collision Search tree AA A A
Search for a Collision Search tree AA Heuristic: Break the largest BV A A
BA CA B C Search for a Collision Search tree AA Heuristic: Break the largest BV A
BA CA CB CC C C B Search for a Collision Search tree AA
C B BA CA CB CC C B Search for a Collision Search tree AA If two leaves of the BVH’s overlap(here, C and B) check their content for collision
rY d rX Y X 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 searchstrategy with f(N) = h(N) = d/(rX+rY)[Expand the nodeXYwith largest relative overlap (most likely to contain a collision)]
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)
Two Levels of Planning • One-step planning:Plan a path for moving a foot/hand from one hold to anotherCan be solved using a motion planner (covered in later lecture) • Footstep planning:Plan a sequence of one-step pathsCan be solved by searching a stance space
initial 4-hold stance ... 3-hold stance ... ... 4-hold stance ... Footstep Planning
initial 4-hold stance ... 3-hold stance ... ... 4-hold stance ... Footstep Planning 4 possible 3-hold stances
initial 4-hold stance ... 3-hold stance ... ... 4-hold stance ... Footstep Planning Newcontact several candidate 4-hold stances
initial 4-hold stance ... 3-hold stance ... ... 4-hold stance ... Footstep Planning ? Newcontact
initial 4-hold stance ... 3-hold stance ... ... breaking contact / zero force 4-hold stance ... Footstep Planning