I am trying to learn some search concepts but ran into a wall in the process. Can anyone explain to me what the difference is between hill climbing search and best first search? To me, they both look like expanding the nodes with the heuristic value closest to the goal. If anyone can explain the difference to me, it'd be greatly appreciated. Thanks!
Some algorithms, such as A∗ ǫ (Pearl and Kim 1982) also consider the distance of a node from the goal, d. Hill-climbing algorithms are less deliberative; rather than considering all open nodes, they expand the most promising descendant of the most recently expanded node until they encounter a solution.
Hill Climbing is a heuristic search used for mathematical optimization problems in the field of Artificial Intelligence. Given a large set of inputs and a good heuristic function, it tries to find a sufficiently good solution to the problem. This solution may not be the global optimal maximum.
To add to this, the changes made with gradient descent are in the direction of 'steepest' improvement relative to the current point, whereas hill climbing accepts changes that make any improvement regardless of slope.
The only difference is that the greedy step in the first one involves constructing a solution while the greedy step in hill climbing involves selecting a neighbour (greedy local search).
You can view search algorithm as having a queue of remaining nodes to search. This answer demonstrates this principle.
In depth-first search, you add the current node's children to the front of the queue (a stack). In breadth-first search, you add the current node's children to the back of the queue. Think for a moment about how this leads to the right behaviour for those algorithms.
Now, in hill-climbing search, you sort[1] the current node's children before adding them to the queue. In best-first search, you add the current node's children to the queue in any old order, then sort[1] the entire queue. If you think about the effect that might have on the order in which nodes are searched, you should get an idea of the practical difference.
I found this concept too tangly to understand from purely abstract terms, but if you work through a couple of examples with a pencil it becomes simple.
[1]: sort according to some problem-specific evaluation of the solution node, for example "distance from destination" in a path-finding search.
A liitle late, but here goes.
In BFS, it's about finding the goal. So it's about picking the best node (the one which we hope will take us to the goal) among the possible ones. We keep trying to go towards the goal.
But in hill climbing, it's about maximizing the target function. We pick the node which provides the highest ascent. So unlike BFS, the 'value' of the parent node is also taken into account. If we can't go higher, we just give up. In that case we may not even reach the goal. We might be at a local maxima.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With