An open API service indexing awesome lists of open source software.

https://github.com/saadarazzaq/algorithmic-hub

Visualized different AI search algorithms using Pygame
https://github.com/saadarazzaq/algorithmic-hub

artificial-intelligence gui pygame python semester-project shortest-path-algorithm

Last synced: 8 months ago
JSON representation

Visualized different AI search algorithms using Pygame

Awesome Lists containing this project

README

          

# 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](https://github.com/SaadARazzaq/algorithmic-hub/assets/123338307/979d0989-1bb1-4ba9-b1b0-85d357c66adc)
![image](https://github.com/SaadARazzaq/algorithmic-hub/assets/123338307/f8f36f32-32da-4d0c-85d8-01b952cac90d)
![image](https://github.com/SaadARazzaq/algorithmic-hub/assets/123338307/90f4562c-63ed-4b3d-b697-e61242304be8)

## Video Link:

[![Algorithmic Hub (2)](https://github.com/SaadARazzaq/algorithmic-hub/assets/123338307/d2264fc0-dc62-4d4b-99a0-85930d710e91)
](https://youtu.be/eTAAgStW5zE)

## Getting Started

### Prerequisites

- Python 3.x
- Pygame library

### Installation

1. Clone the repository:

```bash
git clone https://github.com/saadarazzaq/algorithmic-hub.git
```

2. Install Requirements:

```bash
pip install -r requirements.txt
```

### Usage

1. Run the script:

```bash
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.