0% found this document useful (0 votes)
33 views10 pages

Heuristic Search Strategies in AI

Module
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views10 pages

Heuristic Search Strategies in AI

Module
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to AI and ML (21CS752) Prof.

SHIVANANDA

The informed search strategy uses problem-specific knowledge beyond the definition of the problem
itself—can find solutions more efficiently than can an uninformed strategy.

The general approach we consider is called best-first search. Best-first search is an instance of the general
TREE-SEARCH or GRAPH-SEARCH algorithm in which a node is selected for expansion based on an
evaluation function, f (n). The evaluation function is construed as a cost estimate, so the node with the
lowest evaluation is expanded first.

Most best-first algorithms include as a component of f a heuristic function, denoted h(n):

h(n) = Estimated cost of the cheapest path from the state at node n to a goal state.

Heuristic functions are the most common form in which additional knowledge of the problem is imparted
to the search algorithm.

Page - 1
Introduction to AI and ML (21CS752) Prof. SHIVANANDA

Page - 2
Introduction to AI and ML (21CS752) Prof. SHIVANANDA

Thus, if we are trying to find the cheapest solution, a reasonable thing to try first is the node with the lowest
value of g(n) +h(n).

line cannot be an overestimate. In Figure 3.24, we show the progress of an A∗ tree search for Bucharest.
Notice in particular that Bucharest first appears on the frontier at step (e), but it is not selected for expansion
because its f-cost (450) is higher than that of Pitesti (417). Another way to say this is that there might be a
solution through Pitesti whose cost is as low as 417, so the algorithm will not settle for a solution that costs
450.

The two memory-bounded heruistic search algorithms are: RBFS and MA*.

Recursive best-first search (RBFS) is RECURSIVE a simple recursive algorithm that attempts to BEST-
FIRST SEARCH mimic the operation of standard best-first search, but using only linear space. Its structure
is similar to that of a recursive depth-first search, but rather than continuing indefinitely down the current
path, it uses the f_ limit variable to keep track of the f-value of the best alternative path available from any
ancestor of the current node. If the current node exceeds this limit, the recursion unwinds back to the
alternative path. As the recursion unwinds, RBFS replaces the f-value of each node along the path
BACKED-UP VALUE with a backed-up value—the best f-value of its children. In this way, RBFS
remembers the f-value of the best leaf in the forgotten subtree and can therefore decide whether it’s worth
reexpanding the subtree at some later time. Figure 3.27 shows how RBFS reaches Bucharest.

Page - 3
Introduction to AI and ML (21CS752) Prof. SHIVANANDA

Page - 4
Introduction to AI and ML (21CS752) Prof. SHIVANANDA

Page - 5
Introduction to AI and ML (21CS752) Prof. SHIVANANDA

Page - 6
Introduction to AI and ML (21CS752) Prof. SHIVANANDA

Page - 7
Introduction to AI and ML (21CS752) Prof. SHIVANANDA

Page - 8
Introduction to AI and ML (21CS752) Prof. SHIVANANDA

Page - 9
Introduction to AI and ML (21CS752) Prof. SHIVANANDA

Page - 10

Common questions

Powered by AI

When multiple nodes have the same f-value in the A* algorithm, the strategy for selecting which node to expand first is often undefined by the algorithm itself, meaning the order may depend on implementation specifics. This ambiguity can lead to different solution paths or exploration orders, though the optimality of A* guarantees the cost of the solution path remains minimal as long as the heuristic is admissible .

Evaluation functions differentiate informed from uninformed search strategies by using additional problem-specific knowledge to influence node selection. In the context of the best-first search algorithm, the evaluation function f(n) provides a cost estimate, using heuristics to prioritize nodes that appear more promising for reaching a goal. This contrasts with uninformed strategies, which lack this knowledge and rely solely on node expansion order without regard to specific state knowledge, often resulting in less efficient searches .

Admissibility in heuristic functions ensures solution optimality in algorithms like A* by guaranteeing that the heuristic never overestimates the true cost to reach the goal. This trait allows A* to systematically expand the most promising nodes and ensures that once a goal is reached, it is through the path with the minimal cost. Therefore, the solution found is guaranteed to be optimal, provided the heuristic remains admissible .

A* search algorithm ensures it finds the optimal path by using a combination of the cost to reach a node, g(n), and a heuristic function, h(n), to estimate the cost from the node to a goal. The algorithm expands nodes in order of increasing f(n) = g(n) + h(n). This ensures that cheaper paths are considered first. The heuristic function must be admissible, meaning it never overestimates the cost to reach the goal, to guarantee optimality .

AI search algorithms like RBFS and A* differ in their handling of memory, influencing their application depending on resource constraints. RBFS, with its linear memory usage, is preferable in scenarios with limited memory, maintaining completeness while managing space by backtracking. A* may require exponential space to store all nodes, making it suitable when ample memory is available and optimality is paramount. For example, in deeply nested problem spaces with shallow optimal paths, RBFS would be preferable. Conversely, A* is ideal in smaller, manageable areas where memory limitations aren't a concern .

The "backed-up value" in the RBFS algorithm is crucial as it helps the algorithm remember the best f-value of a forgotten subtree's leaves. When recursion unwinds, RBFS uses these backed-up values to decide whether re-expanding a subtree is worthwhile. By keeping track of potential better paths, the algorithm can make informed decisions, balancing memory use with the exploration of promising paths .

A heuristic function can lead to suboptimal solutions if it overestimates the cost to reach the goal (non-admissible). In best-first search algorithms like A*, this results in neglecting potentially optimal paths. To mitigate this, heuristic functions should be admissible, ensuring they never overestimate true costs. Consistency is another desirable property, ensuring that the f-values do not decrease along any path .

The main principle behind the best-first search algorithm is the use of an evaluation function, denoted as f(n), to select the next node for expansion. This evaluation function incorporates problem-specific knowledge through a heuristic function, h(n), which estimates the cost of the cheapest path from a node to the goal state. By selecting nodes based on the lowest f(n), where f(n) = g(n) + h(n), the algorithm can more efficiently find solutions compared to uninformed search strategies .

'Expanding a node' in search strategies like A* involves generating all possible successor nodes, effectively exploring all possible paths from the current node. This process allows the algorithm to evaluate these new nodes using the evaluation function, guiding the search toward the goal by selecting paths with lower f-values. Expanding nodes systematically reveals paths and potential solutions, crucial in traversing the search space effectively .

Recursive Best-First Search (RBFS) works by mimicking traditional best-first search but using only linear space. It uses a variable f_limit to track the best alternative path available. If the current node's f-value exceeds f_limit, the algorithm backtracks, replacing the f-value of each node along the path with a "backed-up value," which is the best f-value of its children. This mechanism allows RBFS to manage memory constraints effectively while attempting to retain the completeness and optimality of best-first searches .

You might also like