0% found this document useful (0 votes)
801 views

BFS Greedybfs Astar Search Techniques in AI Difference and Details

This document compares three search techniques: Best First Search (BFS), Greedy BFS, and A*. BFS uses an evaluation function and priority queue to search the graph space. Greedy BFS is a variant of BFS that selects the path that seems best according to the heuristic function. A* combines advantages of BFS and uniform cost search by using an admissible heuristic to find an optimal path more efficiently. Key differences are in their evaluation functions, completeness, and ability to find optimal solutions.

Uploaded by

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

BFS Greedybfs Astar Search Techniques in AI Difference and Details

This document compares three search techniques: Best First Search (BFS), Greedy BFS, and A*. BFS uses an evaluation function and priority queue to search the graph space. Greedy BFS is a variant of BFS that selects the path that seems best according to the heuristic function. A* combines advantages of BFS and uniform cost search by using an admissible heuristic to find an optimal path more efficiently. Key differences are in their evaluation functions, completeness, and ability to find optimal solutions.

Uploaded by

Bhuvan Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Best First Search (BFS) Greedy BFS A*

Best-first search algorithm The Greedy BFS algorithm selects Best-first search algorithm
explores a graph by expanding the the path which appears to be the explores a graph by expanding
most promising node chosen best according to the evaluation the most promising node chosen
function.
according to the evaluation according to the evaluation
function. function.

It combines advantages of It is a variant of Best First Search It is the variant of Best First
Breadth-First search and Depth Algorithm. Search algorithm. A* combines
First Search the advantages of Best-first
Search and Uniform Cost Search:
ensure to find the optimized
path while increasing the
algorithm efficiency using
heuristics.

For BFS , evaluation function is For Greedy BFS the evaluation For A* evaluation function is
f(n)=g(n) + h(n) function is f(n)= g(n) + h(n)
Here g(n) : Path Distance f(n) = h(n) h component is the same
and h(n) : Estimate to Goal Here h(n) : Estimate to Goal heuristics applied as in Best-first
search but the g component is
the path from the initial state to
the particular state.

Best First Search is complete. Greedy BFS is not complete. That A* is also complete (unless there
is, there is always the risk of are infinitely many nodes to
taking a path that does not bring explore in the search space)
to the goal.

BFS may or may not give the Greedy BFS didn’t give an optimal The "star", often denoted by an
optimal Solution. solution. asterisk, *, refers to the fact that
BFS is More efficient when It is considered an efficient A* uses an admissible heuristic
compared to DFS. algorithm. function, which essentially
means that A* is optimal, that is,
it always finds the optimal path
between the starting node and
the goal node

Tabular difference between BFS, Greedy BFS and A*

This document shows the difference between BFS, Greedy BFS and A*
search techniques in AI.

Details-
i. An informed search, like Best first search, uses an evaluation function to decide which among the
various available nodes is the most promising (or ‘BEST’) before traversing to that node. The Best
first search uses the concept of a Priority queue and heuristic search. To search the graph space,
the BFS method uses two lists for tracking the traversal. An ‘Open’ list which keeps track of the
current ‘immediate’ nodes available for traversal and ‘CLOSED’ list that keeps track of the nodes
already traversed. This algorithm will traverse the shortest path first in the queue.

ii. It is also an informed search algorithm, and is one of the two variants of Best First Search is Greedy
Best First Search the other one is A*. The Greedy BFS algorithm selects the path which appears to
be the best, it can be known as the combination of depth-first search and breadth-first search.
Greedy BFS makes use of Heuristic function and search and allows us to take advantages of both
algorithms. Greedy BFS is neither complete, nor optimal and for Greedy BFS the evaluation function
is f(n) = h(n).

iii. A* is formulated with weighted graphs, which means it can find the best path involving the smallest
cost in terms of distance and time. This makes A* algorithm an informed search algorithm for best-
first search. A* Algorithm works by vertices in the graph which start with the starting point of the
object and then repeatedly examines the next unexamined vertex, adding its vertices to the set of
vertices that will be examined. A* Algorithms are optimal. A* algorithm also works based on
heuristic methods and this helps achieve optimality which is given by f(n)=g(n)+h(n), where g(n) =
shows the shortest path’s value from the starting node to node n, and h(n) = The heuristic
approximation of the value of the node.

You might also like