To answer the question, why is a good heuristic function required? We will compare the DFS and BFS methods to the heuristic search approach. In DFS and BFS, the costs of all of the edges are equal to 1, and DFS explores all of the child nodes, whereas BFS explores all of the sibling nodes. In a heuristic search, the costs of the edges are different, and the heuristic search selects the nodes to explore based on heuristic functions.
By using a heuristic function, we can reduce the memory that is used, and we can reach the solution in less time. The next question to be answered is, why is a good heuristic function required? The answer is in order to find the optimal solution. In our A* Search example, we illustrated that by using a better heuristic function, we can find the optimal solution; it is clear that A* explores the least number of nodes...