Title: How to favor path with less turns? (A*) · Issue #57 · brean/python-pathfinding · GitHub
Open Graph Title: How to favor path with less turns? (A*) · Issue #57 · brean/python-pathfinding
X Title: How to favor path with less turns? (A*) · Issue #57 · brean/python-pathfinding
Description: 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...
Open Graph Description: 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 DiagonalMo...
X Description: 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 DiagonalMo...
Opengraph URL: https://github.com/brean/python-pathfinding/issues/57
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to favor path with less turns? (A*)","articleBody":"Thanks for this library. Being new to pathfinding, I used the A* basic example at it ran right away.\r\n\r\n**Is your feature request related to a problem? Please describe.**\r\nFor my use-case, I set `DiagonalMovement.never`. I now was wondering, if it is possible to favor a path with less turns? \r\n\r\n**Describe the solution you'd like**\r\n* In the following simplified grid, I want to get from `s` to `e`.\r\n* For the purpose of discussion, I drew to possible paths `A` (`sxxAA..Axxe`) and `B` (`sxxBB..Bxxe`).\r\n* 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`?\r\n\r\n```\r\n+----------+\r\n| ##|\r\n| AAAAAxxe#|\r\n| A B ##|\r\n| xBBBBB ##|\r\n| x |\r\n|#s## |\r\n|#### |\r\n+----------+\r\n```\r\n\r\n**Describe alternatives you've considered**\r\n* 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.\r\n","author":{"url":"https://github.com/maximweb","@type":"Person","name":"maximweb"},"datePublished":"2024-06-20T14:27:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/57/python-pathfinding/issues/57"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cd442215-2e13-ada8-8370-469a3fb08bfb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE4C:8E4C3:14476:1957F:698D242C |
| html-safe-nonce | 7cf7165e08b3b8451270f2f6475024feb25e0bc5639a3a7c46c935b57756e4c4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTRDOjhFNEMzOjE0NDc2OjE5NTdGOjY5OEQyNDJDIiwidmlzaXRvcl9pZCI6IjI4NTYyNDU4ODc0NjU0OTc2NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1832ceecd63c715a5be6b440f8984474112121c5e81415f960a73f839eb2f953 |
| hovercard-subject-tag | issue:2364600336 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/brean/python-pathfinding/57/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c6d48c75e678adaa152615a8ef27f6c02e875484d150465c599fb99859b4feb0/brean/python-pathfinding/issues/57 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c6d48c75e678adaa152615a8ef27f6c02e875484d150465c599fb99859b4feb0/brean/python-pathfinding/issues/57 |
| og:image:alt | 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 DiagonalMo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | maximweb |
| hostname | github.com |
| expected-hostname | github.com |
| None | c25395580e1e3bf82d705e0982a1b24255366088720fef945f1493d5e3e67954 |
| turbo-cache-control | no-preview |
| go-import | github.com/brean/python-pathfinding git https://github.com/brean/python-pathfinding.git |
| octolytics-dimension-user_id | 229768 |
| octolytics-dimension-user_login | brean |
| octolytics-dimension-repository_id | 32716626 |
| octolytics-dimension-repository_nwo | brean/python-pathfinding |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 32716626 |
| octolytics-dimension-repository_network_root_nwo | brean/python-pathfinding |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1fa2bc33fc715bfb2cb9dd8a9cad4f811c16c371 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width