Finds the shortest paths in grids with obstacles. The algorithm searches from the start cell (red) to the goal cell (green).
The squares on the board have different costs, symbolizing the time it takes to pass different types of landscapes like mountains and forests. Crossing a mountain takes longer time than crossing grass, meaning a mountain has a higher cost.
| Landscape | Cost | Color |
|---|---|---|
| Water | 100 | Blue |
| Mountains | 50 | Gray |
| Forests | 10 | Dark green |
| Grass | 5 | Light green |
| Roads | 1 | Brown |
The algorithm finds the path with the lowest cost.
The package pillow has to be installed.
- Run a_star.py
- Edit line 4 in
algorithm_comparison.pyto DIJKSTRA - Run algorithm_comparison.py
- Edit line 4 in
algorithm_comparison.pyto BFS - Run algorithm_comparison.py
- Edit line 4/5 to the desired .txt file

