title: Pathfinding: How can I efficiently check if a path is possible?
body: <p>I am using Dijkstra's algorithm to solve for the ideal path. As part of the program the algorithm is called several thousands of times.</p>
  
  <p>More than half the time the paths are impossible and Dijkstra's takes a very long time to figure this out (In a small test, possible paths were solved in a total of 2 seconds whereas impossible paths took a total of 25.)</p>
  
  <p>As a result, I'd like to know if there is a way that I could very efficiently check if it is even possible to find a path between 2 nodes before wasting time with the algorithm. Is there any very efficient way to do this?</p>
  
  <p>Thanks,
  Dan</p>