240 likes | 549 Views
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
E N D
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 heuristic search algorithms
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 – Driving from Arad to Bucharestheuristic function f(n)=h(n), straight line distance hueristics
Comparison of Search Techniques C*: the cost of the optimal solution ε: every action cost at least ε m: maximum depth of search space
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
Comparison of Search Techniques C*: the cost of the optimal solution ε: every action cost at least ε m: maximum depth of search space : 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: • Iterative-deepening A* (IDA*) • Recursive best-first search (RBFS) • 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
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