-
Notifications
You must be signed in to change notification settings - Fork 441
Open
Labels
S-needs-triageStatus: Needs to be labelledStatus: Needs to be labelled
Description
Summary
Consider adding an A* implementation that can be reused multiple times for the same finish vertice.
Motivation
I'm currently building a simple navigation system for a game. Let's say there's multiple monsters targeting the same hero, they all have to find the shortest path to their target. Having a way to pre-populate the A* algorithm with a previous iteration would drastically reduce the cost of this computation (depending of the number of monsters of course).
Details
- What code needs to change? New traits? Which modules?
petgraph::algo::astar, not sure of the direction that it might take, but a I'm thinking of adding someting like this:
struct AstarInstance<'a> {
graph, // &'a
is_goal,
edge_cost,
estimate_cost,
// cached structs from actual astar fn
visited,
scores,
}
impl AstarInstance {
fn path_from(a: NodeId) -> Option<...> { ... }
}-
Is this a new graph algorithm? Include links to papers, Wikipedia, or other
No -
Are you willing to implement this yourself? Mentor someone else and help them
Yes!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
S-needs-triageStatus: Needs to be labelledStatus: Needs to be labelled