GameSalad has a very cool behaviour called Path Find.
It will calculate the shortest path (through a table) from destination to another.
This template lets you explore this even further by creating your own maze, and watch the path be shown.
Filled with notes.
Hope it helps.