What is the difference between Hill Climbing Search and Best First Search?

I am trying to learn some search concepts, but ran into this problem. Can someone explain to me what is the difference between rock climbing search and best first search? To me, both of them are similar to expanding nodes with a heuristic value closest to the target. If someone can explain the difference to me, then it will be very grateful. Thanks!

+8
algorithm search
source share
4 answers

You can view the search algorithm to have a queue of other nodes to search. This answer demonstrates this principle .

When searching by depth, you add the current children of the node to the front of the queue (stack). On the first search, you add the current user node to the back of the queue. Think for a moment about how this leads to the correct behavior for these algorithms.

Now, when searching on a hill, you sort [1] the current children of the node before adding them to the queue. In the first search, you add the current children of the node to the queue in any old order, and then sort the entire queue [1]. If you are thinking about the effect that the search order of nodes may have, you should get an idea of ​​the practical difference.

I understood this concept is too subtle to understand its purely abstract terms, but if you work with a few examples with a pencil, it becomes simple.

[1]: sort according to some specific task-specific evaluation of the node solution, for example, "distance from destination" in the search for paths.

+8
source share

Let me have a wiki which is for you :

In a simple ascent to the hill, the first closer node, while in the steepest ascending mountain, the successors are compared, and the one closest to the solution.

...

The coolest climb to the hills seems like the best search that tries all the extensions of the current path instead of just one.

+2
source share

Late, but here.

In BFS, this is about finding a target. So about choosing the best node (the one that we hope will lead us to the goal) among the possible. We continue to try to go towards the goal.

But in climbing the hill, it is about maximizing the objective function. We select the node that provides the highest climb. Thus, unlike BFS, the "value" of the parent node is also taken into account. If we cannot rise higher, we will simply give up. In this case, we may not have reached the goal. We can be local maxima.

+2
source share

The difference is in understanding what is more worrying about finding the state of the target .

Ask a question, what is our goal . the state of the ultimate goal ? or the best way to achieve the goal

Best First Search is a systematic search algorithm in which systematicity is achieved by moving forward iteratively based on determining the best heuristic value for adjacent nodes for each current node.

Here the evaluation function (heuristic function) calculates the best possible way to achieve the goal goal . So, we saw that a search in Best First worries about the best PATH to achieve the goal.

However, there are many problems when the " Path to the goal " is not a problem , the only thing is to reach the final state by any means or methods. (For example: a problem with 8 kings ).

Therefore, local search algorithms are used for this.

Local search algorithms work using a single current node and , as a rule, only for the neighboring node.

Hill Climbing Algorithm is a local search algorithm . Therefore, here we need to understand the approach to get to the state of the goal, and not the best way to achieve when you are thinking about climbing a hill.

(As indicated in AI-A Modern Approach, SR and PN )

Basically, to understand local search, we need to consider the state landscape .

A landscape has both

(i) location (determined by state ) and

(ii) Height (determined by the value of the heuristic function or objective function )

We need to understand two types of elevations ,

(i) If the height corresponds to the objective function , then the goal is to find the highest peak, i.e. global maximum .

(Thus, this type of enhancement is useful in different scenarios that are not cost related and that are only related to finding the best instant movements)

(ii) If the height matches the value , then the goal is to find the lowest valley, i.e. Global minimum .

( Here’s the usual thing , that is, steep (always rising with the best ratings, ie a problem with a plateau or whatever), climbing the hill is like β€œBest first search.” Here is a heuristic function that provides the best minimum cost . And the hill climb here concerns only the current node and iterates through neighboring nodes for the minimum value and continues with the extension of the best node, which is similar to Best First Search )

Note :

The Hill Climbing algorithm does not look forward outside the immediate neighbors of the current state . It applies only to the best neighboring nodes for expansion. And the best neighborhood is determined by the aforementioned rating functions.

While the Best First Search algorithm looks ahead of the nearest neighbors to find the best path to the target (using a heuristic score), and then move on to the best. Thus, the difference lies in the approach of local searches and systematic search algorithms.

Understand the difference in approaches, you will find out why both are named different.

0
source share

All Articles