I am wondering if the one I came up with is non-trivial.
According to the project's website :
The trivial heuristics are the ones that return zero everywhere (UCS) and the heuristic which computes the true completion cost
The one I implemented calculates the cost of the Minimum Spanning Tree of the remaining food pellets using Kruskal's algorithm and the mazeDistance function of searchAgents.py and adds to it the mazeDistance of Pacman to it's closest pellet.
Is this a case of calculating the true completion cost? Furthermore what is the difference of an exact heuristic vs a trivial heuristic?
Here are 2 examples I thought of where the true completion cost might be different from the heuristic value produced.
MST cost of F1 - F2 - F3 - F4 is equal to 3 and the heuristic value I produce is equal to 4 as F1 is the closest neighbor to Pacman and in this case the true completion cost is 4 as well
However in the following case :
the MST cost of F1 - F2 - F3 - F4 is equal to 3 and the heuristic value I produce is equal to 4 as F2 is the closest neighbor to Pacman now and the true completion cost is equal to 5 as Pacman should go left then eat F1 -> F2 -> F3 -> F4 and the heuristic value is less than the true completion cost.