Figure 8a: Best-first search.