"I don't see why not. The algorithm is basically a couple of lists, and some simple comparisons. The most complex thing the computer needs to do is the heuristic calculation, which will probably be the distance formula: sqrt(X^2 + Y^2), although you…"
"You're looking for a path-finding algorithm. There are two I know of that might apply to you.
A* (pronounced A-star) is an algorithm that has seen extensive use in video-games. It needs a map of the area it's supposed to navigate first, represented…"