Skip to content

bileshg/A-Star-Visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A* Path Finding Algorithm Visualizer

This project is an implementation of the A* Path Finding Algorithm using the Pygame library to visualize the algorithm in real-time. The algorithm finds the shortest path between two points in a grid while avoiding obstacles.

Table of Contents

Requirements

This project requires the following dependencies:

  • Python 3.8+
  • Pygame
  • Poetry

Installation

  1. Clone the repository:

    git clone https://github.com/bileshg/A-Star-Visualization.git
  2. Change to the repository directory:

    cd A-Star-Visualization
  3. Install Poetry if you don't have it already.

  4. Install the required dependencies using Poetry:

    poetry install

Usage

  1. Activate the virtual environment created by Poetry:

    poetry shell
  2. Run the main.py file to launch the visualizer:

    python3 main.py
  3. A window will open displaying an empty grid.

  4. To start the visualization:

    • Left-click on the grid to create a start node (first left-click), end node (second left-click), or barriers (subsequent left-clicks).
    • Right-click on any node to reset it to the default state.
    • Press the spacebar to begin the A* pathfinding algorithm visualization.
    • Press 'C' to clear the grid and start over.

Acknowledgments

Thanks to TechWithTim for the inspiration and the tutorial on which this project is based.

About

A* Pathfinding Algorithm Visualization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages