What is the difference between flat-rate searches and best results?

Both methods have a data structure that allows the nodes (with their cost) to expand. Both methods expand the node with the best cost first. So what's the difference between the two?

I was told that searching for a single price is a blind method, and searching in the first place is not, which confused me even more (do both have node information or not?).

+9


source to share


5 answers


The difference lies in the heuristic function.

Uniform cost search is an uninformed search: it does not use domain knowledge. It expands the least costly node, and it does so in all directions because no target information is provided. It can be thought of as a function f(n) = g(n)

where g(n)

is the cost of the path (the "cost of the path" itself is a function that assigns the numerical cost of the path in relation to the performance measurement, for example, distance in kilometers, number of moves, etc.). It's just the cost of reaching node n.



The best search is informed search: it uses a heuristic function to estimate how close the current state is to a target (are we getting close to a target?). Therefore, our cost function is f(n) = g(n)

combined with the cost we get from n to the target h(n)

(a heuristic function that estimates this cost) to give us f(n) = g(n) + h(n)

. An example of the best search algorithm is the A * algorithm .

Yes, both methods have a list of extended nodes, but a better lookup will try to minimize the number of extended nodes first (path cost + heuristic).

+15


source


There is a bit of misunderstanding here. Uniform cost search, best search and A * search algorithms are all different algorithms. Uniform cost is an uninformed search algorithm when Best First and A * search algorithms are informational search algorithms. Informed means that he is using a heuristic function to solve an expanding node. The difference between the best first lookup and A * is that it is best used first f(n) = h(n)

for expanding and A * is used f(n) = g(n)+h(n)

to select expanding node. h(n)

is a heuristic function. g(n)

is the actual cost from the starting node to node n.



https://www.cs.utexas.edu/~mooney/cs343/slide-handouts/heuristic-search.4.pdf This can be seen here with more details.

+5


source


Small correction to the accepted answer

The best-first search does not measure how close the current state is to the target, but estimates how close to the target each of the following states (from the current state) will affect the chosen path.

An even cost search expands the least cost node (regardless of the heuristic), and a best first search expands the least cost node (heuristic +).

  • f (n) is a cost function used to estimate potential nodes for expansion
  • g (n) - cost of moving to node n
  • h (n) is the estimated cost from which we will get to the final target state if we go to n

F (n) is used in uniform cost searches

f(n) = g(n)

      

The f (n) value used in a best-first search (A * is an example of a best-first search)

f(n) = g(n) + h(n)

      

Each of these functions evaluates potential extension nodes rather than the current node when traversing the tree looking for n, which is the target state

+4


source


The differences are shown below:

  • Uniform Cost of Search (UCS) expands the node with the least path cost (i.e., with the lowest g (n)), whereas a first order search (BFS) expands the node closest to the target

  • UCS cannot handle a heuristic function whereas BFS can handle a heuristic function

  • In UCS f (n) = g (n), while in BFS f (n) = g (n) + h (n).

+1


source


A uniform cost search selects the invisible node with the smallest distance, calculates the distance to it for each unvisited neighbor, and updates the neighboring distance if it is less.

The best search is a heuristic-based algorithm that tries to predict how close the end of a path (i.e., the last node in the path) is to the target node, so that paths that are considered closer to a solution are extended first.

+1


source







All Articles