Skip to content

CohleM/AstarAlgorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

AstarAlgorithm

A simple implementation of A star algorithm to find the shortest path between two selected nodes

Requirements

You need to have Python version 3.7.3 installed on your pc .

  • After you've installed python onto your maching you will be needing an additional library called Pygame .
  • You can simply use your python package manager (pip) to install . Type in [pip install pgzero] on your terminal and you're good to go

How To Use It

It's fairly simple to use this program . Run this program using [python Astar.py] After you've run it you'll get some grids and this is where we play around . Press E(for ending point) on your keyboard and select one grid with our mouse pointer and it will be colored to red indicating it is the ending point . Please note there can only be one ending point and press O(for obstacles) on your keyboad and select the grids which you want to be you obstacles . These obstacles can be more than one . Then at last press S (for starting point) and select the grid . This is the triggering point after this program will work and will find the shortest path from starting to ending point

Initial layout

Initial

After pressing E and clicking on any block

second

Final visualization of shortest Path

third

About

A simple implementation of A star algorithm to find the shortest path between two selected nodes

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages