title: Shortest path on a graph where distances change dynamically? (maximum energy path)
body: <p>I'm trying to find the shortest path between two maxima on a discrete energy landscape whereby the shortest path is that which <em>reduces the least in height</em> over the course of the total path.  Probably maximum energy path is more correct terminology, but in other words even if a path travels a long distance around the landscape but does not go down into the valleys it would be considered good. </p>
  
  <p>My initial idea was to create a graph of the landscape whereby the weight was the difference in landscape height between neighbours, either positive of negative for ascent and descent respectively.  I have just realised that this will not give the result I need, and actually all paths between local maxima will have exactly the same cost.</p>
  
  <p>I then realised that if the distance between nodes on this graph depended on the current position and history of the path, then I could get the result I need.  e.g. if the path has gone down and up from a valley, then I would assign no extra cost to going down another valley (as long as the path isn't exceeding lows it hasn't been to before).</p>
  
  <p><strong>So are there graph search algorithms that exist where the the distance can change dynamically as paths are explored?</strong></p>
  
  <p><strong>Or are there any other suggestions for attacking this problem?</strong></p>