Beyond Classical Search

33
BEYOND CLASSICAL SEARCH Instructor: Kris Hauser http://cs.indiana.edu/~hauserk 1

description

Beyond Classical Search. Instructor: Kris Hauser http://cs.indiana.edu/~hauserk. Agenda. Local search, optimization Branch and bound search Online search. Local Search. Light-memory search methods No search tree; only the current state is represented! - PowerPoint PPT Presentation

Transcript of Beyond Classical Search

CS B351: Intro to Artificial Intelligence and Computer Simulation

Beyond Classical SearchInstructor: Kris Hauserhttp://cs.indiana.edu/~hauserk1AgendaLocal search, optimizationBranch and bound searchOnline searchLocal SearchLight-memory search methods No search tree; only the current state is represented!Applicable to problems where the path is irrelevant (e.g., 8-queen)For other problems, must encode entire paths in the stateMany similarities with optimization techniques33Idea: Minimize h(N)Because h(G)=0 for any goal GAn optimization problem!4Steepest DescentS initial stateRepeat: S arg minSSUCCESSORS(S){h(S)} if GOAL?(S) return S if h(S) h(S) then S S else return failure

Similar to:hill climbing with hgradient descent over continuous space55Application: 8-QueenPick an initial state S at random with one queen in each columnRepeat k times:If GOAL?(S) then return SPick an attacked queen Q at random Move Q in its column to minimize the number of attacking queens new S [min-conflicts heuristic]Return failure

123322322222026Application: 8-QueenPick an initial state S at random with one queen in each columnRepeat k times:If GOAL?(S) then return SPick an attacked queen Q at random Move Q in its column to minimize the number of attacking queens new S [min-conflicts heuristic]Return failure

12332232222202Repeat n times:7Application: 8-QueenPick an initial state S at random with one queen in each columnRepeat k times:If GOAL?(S) then return SPick an attacked queen Q at random Move Q in its column to minimize the number of attacking queens new S [min-conflicts heuristic]Return failure

12332232222202Repeat n times:Why does it work ???There are many goal states that are well-distributed over the state spaceIf no solution has been found after a few steps, its better to start it all over again. Building a search tree would be much less efficient because of the high branching factorRunning time almost independent of the number of queens8Steepest DescentS initial stateRepeat:S arg minSSUCCESSORS(S){h(S)} if GOAL?(S) return S if h(S) h(S) then S S else return failure

may easily get stuck in local minimaRandom restart (as in n-queen example)Monte Carlo descent99Gradient Descent in Continuous SpaceMinimize y=f(x)Move in opposite direction of derivativedf/dx(x)yxx1df/dx(x1)Gradient Descent in Continuous SpaceMinimize y=f(x)Move in opposite direction of derivativedf/dx(x)yxx1df/dx(x1)x2Gradient Descent in Continuous SpaceMinimize y=f(x)Move in opposite direction of derivativedf/dx(x)yxx1df/dx(x2)x2Gradient Descent in Continuous SpaceMinimize y=f(x)Move in opposite direction of derivativedf/dx(x)yxx1df/dx(x2)x2x3Gradient Descent in Continuous SpaceMinimize y=f(x)Move in opposite direction of derivativedf/dx(x)yxx1df/dx(x3)x2x3Gradient Descent in Continuous SpaceMinimize y=f(x)Move in opposite direction of derivativedf/dx(x)yxx1x2x3fGradient: analogue of derivative in multivariate functions f(x1,,xn)Direction that you would move x1,,xn to make the steepest increase in fx1x217ffGD works wellGD works poorlyAlgorithm for Gradient DescentInput: continuous objective function f, initial point x0=(x10,,xn0)For t=0,,N-1:Compute gradient vector gt=(f/x1(xt),,f/xn(xt))If the length of gt is small enough [convergence]Return xtPick a step size tLet xt+1= xt -tgtReturn failure [convergence not reached]Industrial strength optimization software uses more sophisticated techniques to use higher derivatives, handle constraints, deal with particular function classes, etc.Problems for Discrete Optimization19PlateauRidgesNP-hard problems typically have an exponential number of local minimaMonte Carlo DescentS initial stateRepeat k times:If GOAL?(S) then return SS successor of S picked at random if h(S) h(S) then S Selse h = h(S)-h(S)with probability ~ exp(h/T), where T is called the temperature, do: S S [Metropolis criterion]Return failure

Simulated annealing lowers T over the k iterations. It starts with a large T and slowly decreases T2020Parallel Local Search TechniquesThey perform several local searches concurrently, but not independently: Beam search Genetic algorithms Tabu search Ant colony/particle swarm optimization2121Empirical Successes of Local SearchSatisfiability (SAT)Vertex CoverTraveling salesman problemPlanning & scheduling

Many others22Relation to Numerical OptimizationOptimization techniques usually operate on a continuous state spaceExample: stitch point clouds together into a global modelSame major issues, e.g., local minima, apply

Dealing with Imperfect KnowledgeClassical search assumes that:World states are perfectly observable, the current state is exactly knownAction representations are perfect, states are exactly predictedHow an agent can cope with adversaries, uncertainty, and imperfect information?252526

Distance, speed, acceleration?Intent?Personality?On-Line SearchSometimes uncertainty is so large that actions need to be executed for the agent to know their effectsOn-line search: repeatedly observe effects, and replanA proactive approach for planningA reactive approach to uncertaintyExample: A robot must reach a goal position. It has no prior map of the obstacles, but its vision system can detect all the obstacles visible from a the robots current position

272728Assuming no obstacles in the unknown region and taking the shortest path to the goal is similar to searching with an admissible (optimistic) heuristic2829Assuming no obstacles in the unknown region and taking the shortest path to the goal is similar to searching with an admissible (optimistic) heuristic2930Assuming no obstacles in the unknown region and taking the shortest path to the goal is similar to searching with an admissible (optimistic) heuristicJust as with classical search, on-line search may detect dead-ends and move to a more promising position (~ nodeof search tree)3031D* algorithm for Mobile Robots

Tony StentzReal-time replanning among unpredictably moving obstacles

Next classUncertain and partially observable environmentsGame playingRead R&N 5.1-4HW1 due at end of next class