|
|
|
|
|
by rrobukef
2019 days ago
|
|
On the other hand, for movement along the 8 directions the distance is 41% short, for movement along the 4 main directions, the taxicab distance is 41% longer than the actual distance. For a hexagonal grid, the distance is approximated by counting the number of cells of the shortest path. This has <10% relative error (IIRC) from the actual distance. |
|
The half-short-side heuristic (sqrt(aa + bb) ~= a + b/2) makes taxicab very close to correct for non-square distance as well.