Skip to content

Visualized different AI search algorithms using Pygame

License

Notifications You must be signed in to change notification settings

SaadARazzaq/algorithmic-hub

Repository files navigation

algorithmic-hub

This Python Project provides a graphical user interface (GUI) for visualizing various pathfinding algorithms on a grid. It allows users to interactively set start and end points, draw obstacles, and visualize the process of finding the shortest path between the start and end points using different algorithms.

image image image

Video Link:

Algorithmic Hub (2)

Getting Started

Prerequisites

  • Python 3.x
  • Pygame library

Installation

  1. Clone the repository:

    git clone https://github.com/saadarazzaq/algorithmic-hub.git
  2. Install Requirements:

    pip install -r requirements.txt

Usage

  1. Run the script:

    python main.py
  2. Use the mouse to interact with the grid:

    • Left-click to add obstacles or set start/end points.
    • Right-click to remove obstacles or reset the grid.
    • Press spacebar to start the pathfinding algorithm.
    • Press 'C' to clear the grid.
  3. Choose the desired pathfinding algorithm from the dropdown menu in the GUI.

  4. Visualize the process of finding the shortest path between the start and end-points.

Supported Algorithms

The following pathfinding algorithms are supported:

  • A* Algorithm
  • Best First Search
  • Breadth First Search
  • Depth First Search
  • Uniform Cost Search
  • Depth Limited Search
  • Iterative Deepening Search
  • Bidirectional BFS
  • Dijkstra Algorithm

Customization

You can customize the grid size, animation speed, and other parameters by modifying the script variables directly.

Acknowledgments

  • This project was inspired by the need for a visual representation of pathfinding algorithms.
  • Thanks to the Pygame community for providing the graphics library used in this project.

Releases

No releases published

Packages

No packages published