GridHeuristic.chebyshev constructor
Uses distanceChebyshev distance to estimate the total cost.
The ratio
parameter can be used to scale the heuristic, making it more
or less aggressive, where the default value is 1.0
; a higher value makes
the heuristic tend to overestimate the cost, which makes algorithms like
A* run faster, while a lower value makes it tend to underestimate the cost
which makes the algorithm run slower but may find a more optimal path.
Implementation
const factory GridHeuristic.chebyshev(
Pos goal, {
double ratio,
}) = _ChebyshevHeuristic;