python-pathfinding
python-pathfinding copied to clipboard
Limit by maximum distance
As suggested here, we could also limit the runtime by a maximum path length instead of just the number of iterations.
So instead of using max_runs (which currently defaults to infinity), we could get a max_depth parameter, for one vector, rather than a general spread? I'd certainly use this feature
The idea was simple: Use the distance from the start to the next nodes (what we are calculating anyway) and if its above a certain threshold do not go into the neighbors of that node (we can call it max_depth). Should be a 1-liner... But we could also have a parameter to limit the angle in which we search.
The idea was simple: Use the distance from the start to the next nodes (what we are calculating anyway) and if its above a certain threshold do not go into the neighbors of that node (we can call it max_depth). Should be a 1-liner... But we could also have a parameter to limit the angle in which we search.
Sounds good to me, not sure what the angle bit means, but max_depth being a simple addition is exciting