3.5 Informed (Heuristic) Searches This section show how an informed search strategy can find solution more efficiently than uninformed strategy. • Best-first search, Hill climbing, Beam search, A*, IDA*, RBFS, SMA* • New terms – – – – – Heuristics Optimal solution Informedness Hill climbing problems Admissibility • New parameters – g(n) = estimated cost from initial state to state n – h(n) = estimated cost (distance) from state n to closest goal – h(n) is our heuristic • Robot path planning, h(n) could be Euclidean distance • 8 puzzle, h(n) could be #tiles out of place • Search algorithms which use h(n) to guide search are search algorithms heuristic 3.5.1 Best-First Search (Greedy Best-First Search) Best-first search is a search algorithm which explores a graph by expanding the most promising node chosen according to a specified rule. A node is selected for expansion based on an evaluation function, f(n). Most best-first algorithm include as a component of f a heuristic function, h(n). • QueueingFn is sort-by-h • Best-first search only as good as heuristic Example – map of Romania Driving from Arad to Bucharest Example – Driving from Arad to Bucharest heuristic function f(n)=h(n), straight line distance hueristics Example – Driving from Arad to Bucharest (cont’d) Example – Driving from Arad to Bucharest (cont’d) Comparison of Search Techniques BFS DFS UCS Complete Y N Y Y N Optimal N N Y N N Heuristic N N N N Y Time O(bd) O(bm) O(bd) O(bm) Space O(bd) O(bm) O(bd) O(bm) C*: the cost of the optimal solution ε: every action cost at least ε m: maximum depth of search space IDS Best 3.5.2 A* Search • QueueingFn is sort-by-f – f(n) = g(n) + h(n) g(n): path cost from the start node to node n h(n): estimated cost of the cheapest path from n to goal. • Note that UCS and Best-first both improve search – UCS keeps solution cost low – Best-first helps find solution quickly • A* combines these approaches A * search example - Driving from Arad to Bucharest Comparison of Search Techniques BFS DFS UCS Complete Y N Y Y N Y Optimal N N Y N N Y Heuristic N N N N Y Y Time O(bd) O(bm) O(bd) O(bm) Space O(bd) O(bm) O(bd) O(bm) C*: the cost of the optimal solution ε: every action cost at least ε m: maximum depth of search space IDS Best A* : Relative Error 3.5.3 Memory-bounded Heuristic Search For A* search, the computation time is not a main drawback. Because it keeps all generated nodes in memory, it run out of space long before it runs out of time. Method to reduce memory requirement: 1. Iterative-deepening A* (IDA*) 2. Recursive best-first search (RBFS) 3. Memory-bounded A* (MA*) RBFS • Recursive Best First Search – Linear space variant of A* • Perform A* search but discard subtrees when perform recursion • Keep track of alternative (next best) subtree • Expand subtree until f value greater than bound • Update f values before (from parent) and after (from descendant) recursive call RBFS Example - Driving from Arad to Bucharest Example 3.7 Summary • Studied search methods that an agent can use to select actions in environment that are deterministic, observable, static, and completely known. • Before an agent start searching for solutions, a goal must be identified, and a well-defined problem must be formulated. • A problem consists of 5 parts: the initial state a set of action a transition model describing the results of those actions a goal test function a path cost function • A general Tree-Search algorithm considers all possible paths to find a solution, whereas a Graph-Search algorithm avoids consideration of redundant paths. • Uninformed search methods have access only to the problem definition. Breadth-first search Uniform-cost search Depth-first search Iterative deepening search Bidirectional search • Informed search methods may have access to a heuristic function h(n) that estimate the cost of a solution from n. Greedy best-first search A* search Recursive best-first search (RBFS) search
© Copyright 2026 Paperzz