Question: Question 6 ( 3 points ) : Corners Problem: Heuristic Note: Make sure to complete Question 4 before working on Question 6 , because Question
Question points: Corners Problem: Heuristic
Note: Make sure to complete Question before working on Question because Question builds upon your answer for Question
Implement a nontrivial, consistent heuristic for the CornersProblem in cornersHeuristic.
python
pacman.py mediumCorners p AStarCornersAgent z
Note: AStarCornersAgent is a shortcut for
p SearchAgent a fnaStarSearch, probCornersProblem,heuristiccornersHeuristic.
Admissibility vs Consistency: Remember, heuristics are just functions that take search states and return numbers that estimate the
cost to a nearest goal. More effective heuristics will return values closer to the actual goal costs. To be admissible, the heuristic values
must be lower bounds on the actual shortest path cost to the nearest goal and nonnegative To be consistent, it must additionally hold
that if an action has cost then taking that action can only cause a drop in heuristic of at most
Remember that admissibility isn't enough to guarantee correctness in graph search you need the stronger condition of consistency.
However, admissible heuristics are usually also consistent, especially if they are derived from problem relaxations. Therefore it is usually
easiest to start out by brainstorming admissible heuristics. Once you have an admissible heuristic that works well, you can check whether
it is indeed consistent, too. The only way to guarantee consistency is with a proof. However, inconsistency can often be detected by
verifying that for each node you expand, its successor nodes are equal or higher in in fvalue. Moreover, if UCS and ever return paths of
different lengths, your heuristic is inconsistent. This stuff is tricky!
NonTrivial Heuristics: The trivial heuristics are the ones that return zero everywhere UCS and the heuristic which computes the true
completion cost. The former won't save you any time, while the latter will timeout the autograder. You want a heuristic which reduces total
compute time, though for this assignment the autograder will only check node counts aside from enforcing a reasonable time limit
Grading: Your heuristic must be a nontrivial nonnegative consistent heuristic to receive any points. Make sure that your heuristic returns
at every goal state and never returns a negative value. Depending on how few nodes your heuristic expands, you'll be graded:
Remember: If your heuristic is inconsistent, you will receive no credit, so be careful!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
