State Space Graphs vs. Search Trees Each NODE in search tree is an entire PATH in state space graph. We construct both on demand – and we construct as little as possible.
Tree Search: example.
Breadth-First Search Strategy: expand a shallowest node first Implementation: Fringe is a FIFO queue
Breadth-First Search
Depth-First Search
Depth-First Search
Cost-Sensitive Search BFS finds the shortest path in terms of number of actions. It does not find the least-cost path. We will now cover a similar algorithm which does find the least-cost path. How?
Uniform Cost Search Strategy: expand a cheapest node first: Fringe is a priority queue (priority: cumulative cost)
Uniform Cost Search (Djikstra’s algorithm.)
Informed Search
Search Heuristics 11.2 5 10 A heuristic is: A function that estimates how close a state is to a goal Designed for a particular search problem Examples: Euclidean distance for pathing. Manhattan distance.
Best-First Search
Best-First Search
Best-First Search
Algorithm
Expand the nodes of S and put in the CLOSED list Initialization: Open [A, B], Closed [S] Iteration 1: Open [A], Closed [S, B] Iteration 2: Open [E, F, A], Closed [S, B] : Open [E, A], Closed [S, B, F] Iteration 3: Open [I, G, E, A], Closed [S, B, F] : Open [I, E, A], Closed [S, B, F, G] Hence the final solution path will be: S----> B----->F----> G Continued..
A is the start node and H is the goal node. Class Activity
Advantages More efficient compared to algorithms like DFS. Has advantages of both DFS and BFS as can switch between them both. Disadvantages Algorithm may be stuck in a loop.