Skip to content
/ a-star Public

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.

Notifications You must be signed in to change notification settings

siksal/a-star

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published