You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should AStarPathPlanning.get_distance() return 0.0 when no path exists? #158
As a result, get_distance() returns 0.0 when get_path() returns an empty list.
This makes an unreachable destination indistinguishable from being at the destination itself (a true zero-distance case). It can also cause issues such as selecting an unreachable target as the nearest one when selecting targets based on path distance.
Would it be better for get_distance() to return float("inf") when no path exists?
Alternatively, if returning 0.0 for unreachable destinations is intentional, should this behavior be explicitly documented?
Activity