Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Visualize A* and BFS pathfinding algorithms in real-time with an interactive graphical interface. Explore how these algorithms find the shortest path! 🤖

NotificationsYou must be signed in to change notification settings

LakshayD02/Pathfinding_Visualization_Tool_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

This Python tool allows users to visualize the behavior of two popular pathfinding algorithms: A* (A-star) and Breadth-First Search (BFS). It features an intuitive graphical interface where users can interactively set up obstacles, start, and end points on a grid. Users can then watch in real-time as the algorithms calculate and display the shortest path. This tool is excellent for understanding how these algorithms work and comparing their performance.

Features

  • Algorithm Implementations: Implements A* (A-star) and Breadth-First Search (BFS) pathfinding algorithms. 🤖

  • Real-time Visualization: Visualizes the search process of the algorithms in real-time using a graphical user interface. 👀

  • Interactive Grid: Users can interactively set start and end points, and place obstacles (walls) on the grid. 🧱

  • User Control: Options to step through the algorithm or run it in real-time. ⏯️

  • Start/End Point Placement: Click to set the start (green) and end (blue) points. 🟢🔵

  • Obstacle Placement: Click to place obstacles (walls) on the grid (gray). 🚧

  • Removal: Right-click to remove obstacles or clear start/end points (back to black). ⬛

  • A Algorithm Execution:* Press SPACE to run the A* algorithm. ✨

  • BFS Algorithm Execution: Press B to run the BFS algorithm. 🔍

  • Visual Feedback:

    • Open Cells (Explored): Cells being explored turn white. ◻️
    • Closed Cells (Fully Explored): Cells that have been fully explored turn gray. ⬛
    • Path: The final shortest path is highlighted in red. 🟥

Technologies Used

  • Python: The primary programming language. 🐍

  • Pygame (or similar GUI library): For creating the graphical user interface. 🎮

Ideal For

  • Students: Learning about pathfinding algorithms and data structures. 🧑‍🎓

  • Game Developers: Visualizing pathfinding for game AI. 🎮

  • Algorithm Enthusiasts: Exploring and comparing different search algorithms. 🤓

How to Run

  1. Clone the repository:git clone <repo url>

  2. Install Pygame:pip install pygame (orpip install -r requirements.txt if you have one)

  3. Run the program:python pathfinding_visualizer.py (orpython3 pathfinding_visualizer.py)

How to Use

  1. Click on the grid to set the start (green) and end (blue) points.

  2. Click on cells to create obstacles (walls - gray).

  3. Right-click to remove obstacles or clear start/end points.

  4. Press SPACE to run the A* algorithm.

  5. Press B to run the BFS algorithm.

  6. Observe the visualization of the search process and the final path (red).

A* Algorithm

A* Algorithm

Breadth First Search (BFS)

BFS

About

Visualize A* and BFS pathfinding algorithms in real-time with an interactive graphical interface. Explore how these algorithms find the shortest path! 🤖

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp