A* instance implementation as requested in #338#359
Open
mifrandir wants to merge 9 commits intopetgraph:masterfrom
Open
A* instance implementation as requested in #338#359mifrandir wants to merge 9 commits intopetgraph:masterfrom
mifrandir wants to merge 9 commits intopetgraph:masterfrom
Conversation
… that checks for equivalence with astar
Collaborator
|
Hi, I like the proposed feature. What is holding this PR back from merging? |
Contributor
Author
|
Nothing to my knowledge. Although I'm not currently in a position to make any further changes. |
Member
Conflicts should be fixed. |
Contributor
Author
Should be fine now. Well, except that it seems the behaviour of the other A* implementation has changed so mine is no longer equivalent... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a simple extension of the already existing A*-implementation.
I've tried to keep it simple, more optimisation and caching could be done for certain scenarios but that would come with tradeoffs (e.g. caching results for calls to
run, using actual shortest path lengths from previous calls as "estimates", ...); I'd be happy to implement them though, just let me know.The time complexity does not change at all (unless
estimate_costhas a bigger complexity thanastar). Optimisation is achieved by reducing calls toestimate_cost. Ifestimate_costis very inexpensive (e.g.|_| 0) this might even result in a significant performance penalty.The space complexity has technically not changed either.
Fixes: #338