Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
CSE 4705 Artificial Intelligence Jinbo Bi Department of Computer Science & Engineering http://www.engr.uconn.edu/~jinbo 1 Search fundamentals • Chapter 3.3 2 Useful concepts 3 Useful concepts • After we formulate a problem, how do we find the solutions for it? • • • Enumerate in some order all possible paths from the initial state Here: search through explicit tree generation • ROOT = initial state • Nodes and leafs generated through transition model In general, search generates a graph (same state through multiple paths), but we will just look at trees in lecture • Treats different paths to the same node as distinct 4 Simple tree search example 5 Simple tree search example Determines search process 6 8-Puzzle: states and nodes 7 8-Puzzle: search tree 8 Uninformed search strategies 9 Uninformed search strategies 10 Uninformed search strategies 11 Breadth-first search 12 Breadth-first search 13 Breadth-first search (simplified) 14 Properties of breadth-first search 15 Exponential space/time complexity 16 Depth-first search 17 Depth-first search 18 Properties of depth-first search 19 Breadth-first vs depth-first search 20 Breadth-first vs depth-first search How can we get the best of both? 21 Depth-limited search: a building block 22 Iterative deepening search 23 Iterative deepening search 24 Iterative deepening search, example 25 Iterative deepening search, example 26 Iterative deepening search, example 27 Iterative deepening search, example 28 Properties of iterative deepening search 29 Iterative deepening search: time complexity 30 Summary of the algorithms 31 Bidirectional search: very brief review • Two simultaneous searches from start and goal • Motivation: • Check whether the node belongs to the other frontier before expansion • Space complexity is the most significant weakness • Complete and optimal if both searches are breadth-first 32 Bidirectional search: very brief review • The predecessor of each node can be efficiently computable • Works well when actions are easily reversible 33 “Uniform cost” search • Motivation: an example Romanian Holiday Problem • All our search methods so far assume • Step-cost = 1 • This is not always true 34 “Uniform cost” search g(N): the path cost function • If all moves equal in cost • Assigning a (potentially) unique cost to each step • Cost = # of nodes in path – 1 • g(n) = depth(n) • Equivalent to what we have been assuming so far • N0, N1, N2, N3 are nodes visited on path p • C(i,j): Cost of going from Ni to Nj • g(N1) = C(0,1) + C(1,2) + C(2,3) 35 “Uniform cost” search 36 “Uniform cost” search Start Goal 37 “Uniform cost” search Example: Romania Holiday Problem Start S g(R) =80 g(P) =177 g(B) =278 P R 1 3 2 F g(F) =99 is updated 4 B g(B) =310 to 278 Goal B 4 Goal 38 Summary of uninformed search C* is the cost of the optimal solution, and e is step cost 39 Informed search strategies 40 Informed search • Part I (classical search) • Informed = use problem-specific knowledge • Best-first search and its variants • A* - Optimal search using knowledge • Proof of optimality of A* • A* for maneuvering AI agents in games • Heuristic functions • Part II (beyond classical search, Chap 4) • Local search and optimization • Local search in continuous space • Hill climbing, local bean search, … 41 Informed search • Is Uniform cost search the best we can do? 42 A better idea 43 The straight-line distance from each city to Bucharest: Start Goal 44 A heuristic function 45 Breadth first for games, robots http://theory.stanford.edu/~amitp/GameProgramming/ 46 An optimal informed search (A*) 47 Breadth first for a world with obstacles Pink: start node; Dark blue: goal Breadth-first search expands many nodes 48 Informed search (A*) in that world 49 Questions? 50