Best First Search in AI
All you need to know
What is Best First Search?
01.
It is a search algorithm that works on a specific rule. The aim is to reach the goal from the initial state via the shortest path.
The Algorithm:
02.
This algorithm will traverse the shortest path first in the queue. The time complexity of the algorithm is given by O(n*logn) .
Variants of Best First Search
03.
1. Greedy Best First Search
2. A* Best First Search
Advantages
04.
1. Can switch between BFS and DFS, thus gaining the advantages of both.
Disadvantages
1. Chances of getting stuck in a loop are higher.