That is basically the logic behind A* anyway.

The key is keeping a priority list of unwalked paths. I did this in a String List. The problem with the logic you are using is that it may take tooo long to find the path if it isn;t in a reasonably direct route. The reason I called my algorithm Nearly A* is because it has the same problem - I try to walk striaght to the desitnation instead of in all possible directions at the same time.