This is an AStar algorithm that finds the shortest path from a start position to goal position. It was implemented in C++ using the SDL library for graphic display.
Install dependencies
sudo apt install libsdl2-dev libsdl2-ttf-dev
Clone the repository
git clone https://github.com/siksal/a-star.git
Build the code
cd a-star/build
cmake ../
Compile the code
make
Run the code
./a-star
-
Press mouse button to create or remove obstacle.
-
Press S and mouse button to change start position.
-
Press G and mouse button to change goal position.
-
Blue color is the shortest path from Start to Goal. Watch the algorithm here