Voxel Heuristics
Pre-built heuristic functions for A* pathfinding on a VoxelGraph. All are admissible on uniform-cost grids (voxel costs all ≥ 1.0) under the appropriate movement rule:
| Heuristic | Movement rule | Notes |
|---|---|---|
| ZERO | any | A* degenerates to Dijkstra |
| MANHATTAN | VON_NEUMANN_6 | tight for 6-way movement |
| CHEBYSHEV | MOORE_26 | tight when all step costs are 1 (not the default) |
| OCTILE | MOORE_26 | tight when orth = 1, face-diag = √2, body-diag = √3 (the default) |
| EUCLIDEAN | either | always admissible but never tight on a grid |
Admissibility and voxel costs. Every non-ZERO heuristic assumes each step costs at least its geometric length — i.e. all voxel costs are ≥ 1.0. If any voxel cost is < 1.0 (including 0.0) these heuristics overestimate and A* may return a sub-optimal path; wrap the heuristic with scaled using VoxelGraph.minVoxelCost, or use ZERO (Dijkstra), which is always admissible.