Tree Search Overview
Tree Search Overview Tree Search is used to find a path from a start state to a goal state. Each node represents a state: A / | \ B C D /|\ | /\ E F G H I J The objective is to reach node J. 1. Breadth-First Search (BFS) Idea Explore nodes level by level. Level 0: A Level 1: B C D Level 2: E F G H I J Expansion order: A → B → C → D → E → F → G → H → I → J Uses a Queue (FIFO) . Advantages Finds shortest path in unweighted graphs. Complete. Disadvantages High memory consumption. 2. Depth-First Search (DFS) Idea Go as deep as possible before backtracking. Expansion order: A → B → E → F → G → C → H → D → I → J Uses a Stack (LIFO) . Advantages Low memory usage. Simple implementation. Disadvantages May miss the shortest path. Can get trapped in deep branches. 3. Best-First Search Idea Expand the node with the smallest heuristic value. h(n) where: h(n) = estimated distance to goal Example: Node h(n) B 1 D 3 C 6 ...