Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between uniform-cost search and best-first search methods?

Both methods have a data structure which holds the nodes (with their cost) to expand. Both methods first expand the node with the best cost. So, what is the difference between them?

I was told that uniform-cost search is a blind method and best-first search is not, which confused me even more (both have information about node costs or not?).

like image 581
T.Poe Avatar asked May 24 '17 07:05

T.Poe


People also ask

Is BFS is same as uniform-cost search?

Thus, from (1) and (4), we conclude that BFS is derived from UCS by making transition cost as 1. Therefore, BFS is a special case of UCS.

What's the difference between best first search and a * search?

Best-first search is not complete. A* search is complete. Best-first search is not optimal as the path found may not be optimal. A* search is optimal as the path found is always optimal.

What is the difference between best first search and greedy search?

The generic best-first search algorithm selects a node for expansion according to an evaluation function. Greedy best-first search expands nodes with minimal h(n). It is not optimal, but is often efficient. A* search expands nodes with minimal f(n)=g(n)+h(n).

What is meant by uniform-cost search?

Uniform-cost search is an uninformed search algorithm that uses the lowest cumulative cost to find a path from the source to the destination. Nodes are expanded, starting from the root, according to the minimum cumulative cost. The uniform-cost search is then implemented using a Priority Queue.


1 Answers

The difference is in the heuristic function.

Uniform-cost search is uninformed search: it doesn't use any domain knowledge. It expands the least cost node, and it does so in every direction because no information about the goal is provided. It can be viewed as a function f(n) = g(n) where g(n) is a path cost ("path cost" itself is a function that assigns a numeric cost to a path with respect to performance measure, e.g. distance in kilometers, or number of moves etc.). It simply is a cost to reach node n.

Best-first search is informed search: it uses a heuristic function to estimate how close the current state is to the goal (are we getting close to the goal?). Hence our cost function f(n) = g(n) is combined with the cost to get from n to the goal, the h(n) (heuristic function that estimates that cost) giving us f(n) = g(n) + h(n). An example of a best-first search algorithm is A* algorithm.

Yes, both methods have a list of expanded nodes, but best-first search will try to minimize that number of expanded nodes (path cost + heuristic function).

like image 51
Ivan Sivak Avatar answered Sep 28 '22 11:09

Ivan Sivak