Skip to content

A* instance implementation as requested in #338#359

Open
mifrandir wants to merge 9 commits intopetgraph:masterfrom
mifrandir:a-star-instance2
Open

A* instance implementation as requested in #338#359
mifrandir wants to merge 9 commits intopetgraph:masterfrom
mifrandir:a-star-instance2

Conversation

@mifrandir
Copy link
Contributor

@mifrandir mifrandir commented Jul 12, 2020

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_cost has a bigger complexity than astar). Optimisation is achieved by reducing calls to estimate_cost. If estimate_cost is very inexpensive (e.g. |_| 0) this might even result in a significant performance penalty.

The space complexity has technically not changed either.

Fixes: #338

@ABorgna ABorgna modified the milestones: 0.6, 0.6.1 Jul 4, 2021
@starovoid
Copy link
Collaborator

Hi, I like the proposed feature. What is holding this PR back from merging?

@mifrandir
Copy link
Contributor Author

Nothing to my knowledge. Although I'm not currently in a position to make any further changes.

@XVilka
Copy link
Member

XVilka commented Dec 23, 2024

Hi, I like the proposed feature. What is holding this PR back from merging?

Conflicts should be fixed.

@mifrandir
Copy link
Contributor Author

mifrandir commented Dec 23, 2024

Hi, I like the proposed feature. What is holding this PR back from merging?

Conflicts should be fixed.

Should be fine now. Well, except that it seems the behaviour of the other A* implementation has changed so mine is no longer equivalent...

@starovoid starovoid modified the milestones: 0.8.2, 0.8.3 May 26, 2025
@starovoid starovoid added C-new-algorithm Category: A feature request for a new graph algorithm S-waiting-on-review Status: Awaiting review from the assignee but also other interested parties labels Jun 13, 2025
@starovoid starovoid modified the milestones: 0.8.3, 0.8.4 Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-new-algorithm Category: A feature request for a new graph algorithm S-waiting-on-review Status: Awaiting review from the assignee but also other interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A* with cache (multiple start w/ same finish)

4 participants