Greedy BFS

In the Revisiting the navigation application section, you learned that a heuristic value is a property of the node, and it is a guess, or estimate, of which node will lead to the goal state quicker than others. It is a strategy used to reduce the nodes explored and reach the goal state quicker. In greedy BFS, the heuristic function computes an estimated cost to reach the goal state. For our application, the heuristic function can compute the straight-line distance to the goal state, as follows:

Figure 11

As you can see, in the preceding diagram the initial state is the Bus Stop. From the Bus Stop node, we have one channel, which ...

Get Hands-On Artificial Intelligence for Search now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.