Sahilumraniya / Maze_Game

This project provides a visual demonstration of the A* algorithm using Pygame. It allows users to interactively create a grid, set start and end points, and add barriers, visualizing how the A* algorithm finds the shortest path between the start and end points while avoiding obstacles.

Home Page:https://drive.google.com/file/d/1LrzyO_xEnLR_5kf07WBCzsCL-b5WsLQg/view

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A* Algorithm Visualization with Pygame

This project is a visualization of the A* algorithm using Pygame. The A* algorithm is a popular pathfinding algorithm used in various applications, including robotics and gaming.

Overview

The project provides a graphical interface where users can create a grid, place a start and end node, and add barriers. The A* algorithm then finds the shortest path between the start and end nodes while avoiding barriers.

Features

  • Interactive grid creation
  • Placement of start and end nodes
  • Addition of barriers
  • Visualization of the A* algorithm
  • Real-time pathfinding visualization
  • Color-coded nodes for easy visualization

Requirements

  • Python
  • Pygame library

Usage

  1. Clone the repository to your local machine.
  2. Install the required dependencies (pygame).
  3. Run the A_star_pygame.py file.
  4. Follow the on-screen instructions to interact with the visualization:
    • Left-click to add start node, end node, or barriers.
    • Right-click to remove nodes.
    • Press the SPACE key to start the A* algorithm.
    • Press the I key to start the BFS algorithm.
  5. Watch as the algorithm finds the shortest path between the start and end nodes.

Future Enhancements

  • Implement additional pathfinding algorithms.
  • Add more customization options for the grid and visualization.
  • Optimize the code for better performance.
  • Improve the user interface for better user experience.

Contribution

Contributions are welcome! If you have any suggestions, bug fixes, or feature implementations, feel free to open an issue or submit a pull request.

About

This project provides a visual demonstration of the A* algorithm using Pygame. It allows users to interactively create a grid, set start and end points, and add barriers, visualizing how the A* algorithm finds the shortest path between the start and end points while avoiding obstacles.

https://drive.google.com/file/d/1LrzyO_xEnLR_5kf07WBCzsCL-b5WsLQg/view


Languages

Language:Python 100.0%