Consistent

The second property a good heuristic function should have is that it should be consistent, which means that it should be non-decreasing:

Figure 33

For example, the heuristic function for node 3 should be greater than (or equal to) the heuristic function for node 2, and the value of the heuristic function for node should be greater than (or equal to) the value of the heuristic function for node 2. Let's look at why this is so, through the following diagram:

Figure 34

Let's suppose that nodes 1 and 2 are intermediate nodes, ...

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.