I'm trying to come up with a good and fast heuristic for a clear-map pacman game.
My heuristic is trying to calculate the smallest distance possible that the pacman needs to travel to go to every points with food on the map. My current algorithm is basicly Prim's MST which gets me a O(n logn) running time, but doen't account for situations where the pacman needs to follow a edge to eat, and the return to the previous vertex...
Is there anything better?
Saying in another way: What is the minimum cost of connecting several dots without lifting my pen?
Thanks