Thanks for this library. Being new to pathfinding, I used the A* basic example at it ran right away.
Is your feature request related to a problem? Please describe.
For my use-case, I set DiagonalMovement.never. I now was wondering, if it is possible to favor a path with less turns?
Describe the solution you'd like
- In the following simplified grid, I want to get from
s to e.
- For the purpose of discussion, I drew to possible paths
A (sxxAA..Axxe) and B (sxxBB..Bxxe).
- Without diagonal movement, Path
B has the same length as path A. Is it possible to tune settings(neighbor weights?) so that path A (having less turns) is favored over path B?
+----------+
| ##|
| AAAAAxxe#|
| A B ##|
| xBBBBB ##|
| x |
|#s## |
|#### |
+----------+
Describe alternatives you've considered
- I was (naively) hoping that deliberately setting the start and endpoint in a recess of my blocked areas might help to favor path
A, but I get B instead.
Thanks for this library. Being new to pathfinding, I used the A* basic example at it ran right away.
Is your feature request related to a problem? Please describe.
For my use-case, I set
DiagonalMovement.never. I now was wondering, if it is possible to favor a path with less turns?Describe the solution you'd like
stoe.A(sxxAA..Axxe) andB(sxxBB..Bxxe).Bhas the same length as pathA. Is it possible to tune settings(neighbor weights?) so that pathA(having less turns) is favored over pathB?Describe alternatives you've considered
A, but I getBinstead.