Skip to content

Latest commit

 

History

History
38 lines (35 loc) · 1.07 KB

README.md

File metadata and controls

38 lines (35 loc) · 1.07 KB

AStar Algorithm

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.

Setup

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

AStar Algorithm

Hint

  • #2c2c2c Obstacle

  • #ffff00 Start

  • #00ff00 Goal

  • #0000ff Path

  • 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