Skip to content

anujsainarain/A_Star

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A* Algorithm

License: MIT Version

Welcome to the A* Algorithm Repository! Here, you'll find an implementation of the A* algorithm, which is used to find the shortest path between two points in a graph.

Implementation

Astar_singular.shortest.path.mp4

Astar Algorithm using one bot

Astar_multiple.shortest.path.mp4

Astar Algorithm using multiple bots

Usage

Before running this code, ensure the pyamaze library is installed on your machine. Follow these steps based on your operating system:

For Windows:

  1. Open the command prompt by pressing the Windows key + R and typing cmd.
  2. Enter the following command: pip install pyamaze

For Mac OS and Linux:

  1. Open the terminal by pressing Command + Spacebar and typing terminal.
  2. Enter the following command: pip install pyamaze

To get started, simply navigate to the code and uncomment the relevant sections based on your needs. We've included detailed comments to guide you through the process.

This implementation supports two heuristics - Manhattan and Euclidean - to efficiently find paths. However, please note that the current code only checks for neighbors in the East, South, West, and North directions, excluding diagonal neighbors. I initially developed the "maze" using pyamaze (Class_Setup1), but you can alter the maze, create a new one using pyamaze, or use the same maze to run the code.

Additionally, this supports up to three agents or robots for pathfinding. If you need more agents, it's easy to modify the code using similar lines. Simply refer to the provided comments for guidance.

I hope this implementation aids you in finding the shortest paths in your graphs.

Contributions

Contributions are welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

The repository implements A* algorithm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages