Visualization of several well-known graph pathfinding algorithms using Rust programming language with pixels crate for graphics
The graph is presented as a grid with start-end points and obstacles. Each move (if it moves to a free cell) costs 1 point. 4 types of difficulties of obstacles are supported. Both Dijkstra and A* support moving through obstacles with moving's cost obstacle's difficulty * Graph::OBSTACLE_DIFFICULTY_K
- Breadth first search
- Dijkstra's algorithm
- Heuristic algorithm (heuristic function - Manhattan distance)
- A* algorithm (heuristic function - Manhattan distance)
Breadth first search | Seen points: 73, Length: 15 | |
Dijkstra's algorithm | Seen points: 76, Length: 15 | |
Heuristic algorithm | Seen points: 16, Length: 17 | |
A* algorithm | Seen points: 68, Length: 15 |
Primitive navigation:
`s` - make algorithm's step
`r` - reset graph to initial state
`d` - set dijksta's algorithm
`b` - set bfs algorithm
`h` - set heuristic algorithm
`a` - set a-star algorithm
`1` - set 1' predefined graph
`2` - set 2' predefined graph
`-` - generate ramdom graph
https://www.redblobgames.com/pathfinding/a-star/introduction.html
MIT