Skip to content

This project aims to find the shortest path from one point to the other given point using A* search algorithm

Notifications You must be signed in to change notification settings

danildenha/Astar.search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A* Search Algorithm for Finding Shortest Paths

This project implements the A* search algorithm to discover the shortest path between two given points. The A* search algorithm is a widely-used pathfinding algorithm known for its efficiency in finding the shortest path between nodes in a graph.

A* Search

Instructions to use

  1. Download Pygame library on your device
  2. Run the code on your IDE
  3. Choose start and end points by making left click on your mouse
  4. Make obstacles with left click of the mouse
  5. Delete elements by right click
  6. Press Space to run the Algorithm
  7. Press C to clear the screen and start over

Heuristic Calculation

To efficiently determine the heuristic value, this project employs the Manhattan Distance calculation method. Manhattan Distance provides a heuristic estimate of the distance between two points in a grid-based system by calculating the sum of the absolute differences between their x and y coordinates.

Manhattan Distance

Technologies Used

The project utilizes the following key technologies:

  • Priority Queue
  • 2D Array
  • Set
  • Pygame Library

The Pygame library is used for visualization purposes, providing an interactive display of the pathfinding process.

Use of the program

Note that node color represents:

  • Explored Nodes (Red)
  • Boundary Nodes (Green)
  • Start Node (Orange)
  • End Node (Pink)
  • Shortest Path (Turquois)
  • Obstacle Node (Black)
  • Empty Node (White)

No obstacles

No obstacles

About

This project aims to find the shortest path from one point to the other given point using A* search algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages