reset password
Author Message
rabbott
Posts: 1649
Posted 09:16 Sep 12, 2019 |

In both problems, one must visit all elements of a given set. In one case the elements are the corners; in the other, the elements are the food dots. Can you set up the two search agents so that they both do A* search with the same heuristic?

For example, in the file in which the cornersHeuristic and the foodHeuristic are defined, I defined a new heuristic called blobHeuristic. (It's the heuristic suggested in the hint for Q7 in this post.) I then commented out the two original heuristics and added this line:

cornersHeuristic = foodHeuristic = blobHeuristic

The autograder gave my code 26/25. (The extra point was because the code for the FoodSearchProblem expanded only 353 nodes, far fewer than the 7,000 needed for the extra point.)

Last edited by rabbott at 09:17 Sep 12, 2019.