Informed Search

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Informed search algorithm

The informed search algorithm is


more useful for large search space.
Informed search algorithm uses the
idea of heuristic, so it is also called
Heuristic search.
Heuristic search
• Heuristic is a function which is used in Informed
Search, and it finds the most promising path. It takes
the current state of the agent as its input and produces
the estimation of how close agent is from the goal.
• The heuristic method, however, might not always give
the best solution, but it guaranteed to find a good
solution in reasonable time.
• Heuristic function estimates how close a state is to the
goal. It is represented by h(n), and it calculates the cost
of an optimal path between the pair of states. The value
of the heuristic function is always positive.
Types Informed search
• Best First Search Algorithm(Greedy search)
• A* Search Algorithm
Best-first Search Algorithm (Greedy Search)

Greedy best-first search algorithm always selects the path


which appears best at that moment. It is the combination of
depth-first search and breadth-first search algorithms. It uses
the heuristic function and search. Best-first search allows us
to take the advantages of both algorithms. With the help of
best-first search, at each step, we can choose the most
promising node. In the best first search algorithm, we expand
the node which is closest to the goal node and the closest cost
is estimated by heuristic function
f(n)= g(n)
Were, h(n)= estimated cost from node n to the goal.
Advantages
• Best first search can switch between BFS and DFS by
gaining the advantages of both the algorithms.
• This algorithm is more efficient than BFS and DFS
algorithms.
Disadvantages
• It can behave as an unguided depth-first search in the
worst case scenario.
• It can get stuck in a loop as DFS.
• This algorithm is not optimal.
Example
Path cost=SBFG=2+1+3=6
A* Search Algorithm

A* search is the most commonly known form of


best-first search. It uses heuristic function h(n), and
cost to reach the node n from the start state g(n). It
has combined features of UCS and greedy best-first
search, by which it solve the problem efficiently. A*
search algorithm finds the shortest path through the
search space using the heuristic function. This
search algorithm expands less search tree and
provides optimal result faster. A* algorithm is
similar to UCS except that it uses g(n)+h(n) instead
of g(n)
Advantages
• A* search algorithm is the best algorithm than other search
algorithms.
• A* search algorithm is optimal and complete.
• This algorithm can solve very complex problems.
Disadvantages
• It does not always produce the shortest path as it mostly
based on heuristics and approximation.
• A* search algorithm has some complexity issues.
• The main drawback of A* is memory requirement as it
keeps all generated nodes in the memory, so it is not
practical for various large-scale problems.
Example
SACG=6

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy