Expand description
A* search algorithm implementation
A* is an informed search algorithm that finds the least-cost path from a given initial node to a goal node. It uses a best-first search and finds the least-cost path to the goal.
A* uses a heuristic function to estimate the cost from the current node to the goal. The algorithm maintains a priority queue of nodes to be evaluated, where the priority is determined by f(n) = g(n) + h(n), where:
- g(n) is the cost of the path from the start node to n
- h(n) is the heuristic estimate of the cost from n to the goal
Structs§
- AStar
Planner - A* search algorithm planner
- ContinuousA
Star Planner - 2D continuous space A* planner with polygon obstacles
- GridA
Star Planner - Grid-based A* planner for 2D grids with obstacles
- Hashable
Float2D - A wrapper type for f64 arrays that implements Hash and Eq This allows using f64 arrays as keys in HashMaps
- Node
- A node in the search graph
- Path
- A path found by the A* algorithm
Functions§
- euclidean_
distance - Euclidean distance for n-dimensional points
- euclidean_
distance_ 2d - Euclidean distance heuristic for continuous 2D space
- manhattan_
distance - Manhattan distance heuristic for 2D grid-based pathfinding
Type Aliases§
- Heuristic
Fn - Function that estimates the cost from a state to the goal
- Neighbor
Fn - Function that returns neighboring states and costs