Note: This is no longer supported. It has been replaced by a pecialization of a general purpose path finder engine. See https://github.com/JamesBremner/PathFinder
Find easiest path through hilly terrain
Search for a path through a rectangular grid of heights that minimizes the changes in elevation. The cost of a change in elevation is defined to be
sqrt(1+(height(a)-(height(b))^2)
A space delimited text file.
Specifies elevation of an m row and n column grid
Column | Desscription |
---|---|
1 | "h", for height |
2 ... n+1 | height for each location in a row n wide |
Column | Desscription |
---|---|
1 | "s", for start |
2 | x location column |
3 | y location row |
Column | Desscription |
---|---|
1 | "e", for end |
2 | x location column |
3 | y location row |
h 1 2 3
h 2 5 2
h 3 2 1
s 1 1
e 3 3
C:\Users\James\code\LazyHillWalker\bin>walker.exe ..\data\hill.txt
Lazy Hill Walker
h 1 2 3
h 2 5 2
h 3 2 1
s 1 1
e 3 3
Path found: 1_1 -> 2_1 -> 3_1 -> 3_2 -> 3_3 ->