• Stars
    star
    203
  • Rank 192,890 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 2 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pathfinding visualizations with Python and Pygame

Pathfinding Visualizer

A pathfinding visualizer made in Python and Pygame. This project aims to provide a fun and interactive way to learn about popular pathfinding algorithms such as Dijkstra's, A* and other supported algorithms.

Demonstration.mp4

Screenshots

A* Search Dijkstra's Search
Greedy Best-First Search Breadth-First Search
Depth-First Search Results

Features

  • Visualizes popular pathfinding algorithms such as Dijkstra's and A*.
  • Visualizes popular maze generation algorithms like Recursive division and Prim's algorithm.
  • Feature to run all algorithms b2b to compare their performance.
  • Step-by-step animation of the search process, allowing you to see how the algorithms work.
  • Option to place obstacles on the grid to create custom maps.
  • Selectable starting and ending points on the grid.
  • Configurable speed of the animation.
  • Configurable grid size
  • Clean and intuitive user interface.

Supported Algorithms

The following pathfinding algorithms are currently supported in this visualizer:

  1. Depth First Search (DFS): A traversal-based algorithm that goes as far as possible along each branch before backtracking. Not commonly used for pathfinding.
  2. Breadth First Search (BFS): A traversal-based algorithm that explores all neighbors of a node before moving on to the next level. Guaranteed to find the shortest path in unweighted graphs.
  3. Greedy Best First Search: A heuristic search algorithm that prioritizes visiting nodes closest to the goal. Not guaranteed to find the shortest path, but often faster.
  4. A* Search: A heuristic search algorithm that combines the strengths of BFS and greedy best first search. Efficient for many types of graphs.
  5. Dijkstra's Search: A shortest path algorithm that uses a priority queue to prioritize visiting nodes with the smallest known cost. Guaranteed to find the shortest path in weighted graphs.

Each algorithm uses a different approach to finding the shortest path between two points on a graph. Choose the one that best fits your use case and watch it in action.

Requirements

  • Python 3.10 and above: You can download the latest version of Python from the official website (https://www.python.org/downloads/).
  • Pygame: You can install Pygame by running 'pip install pygame' in your terminal.

Usage

  • Download the project repository to your local machine.
  • Navigate to the project directory.
  • Run python3 run.pyw if on Linux or Mac
  • Run python run.pyw if on Windows

Command Line Arguments

  1. --cell-size Usage: python run.pyw --cell-size:<int>

Contributing

This project is open to contributions, bug reports, and suggestions. If you've found a bug or have a suggestion, please open an issue.

License

This project is licensed under the MIT License.

Enjoy visualizing pathfinding algorithms!

More Repositories

1

WhatsUp

The ultimate mobile chat app. This project brings you the closest experience to WhatsApp, crafted with the power of Flutter and Firebase. With features like real-time conversations, efficient media transmission, voice messaging, and robust security, we've recreated the essence of WhatsApp while adding our unique touch.
Dart
43
star
2

Chatty

Chat rooms
TypeScript
5
star
3

DesktopOrganiser

A simple automation program which keeps your desktop organised!
Python
5
star
4

Flappy-Bird

Flappy-Bird game with Python and Pygame
Python
4
star
5

Reflect

A Discord Bot made with love in Python
Python
4
star
6

Online-Tic-Tac-Toe-Multiplayer

An online multiplayer game: Tic-Tac-Toe.
Python
4
star
7

CleanMyMac

CleanMyMac CLI Alternative
Python
4
star
8

Quizzo-GUI

A basic GUI based quiz game written in Python and PyQt6.
Python
3
star
9

Tauseef-Hilal

My GitHub Profile
3
star
10

Reflect-JS

A JS rewrite of Reflect
JavaScript
3
star
11

Quizzo-CLI

QUIZO is a CONSOLE quiz game.
Python
3
star
12

Calculator

A basic calculator written in Python and PyQt6.
Python
3
star
13

C-DataStructures

Data structures implemented in C
C
3
star
14

FusionFlix

Your Gateway to Infinite Entertainment! From trending hits to user-curated gems, FusionFlix caters to your every mood. Discover, share, and indulge in a fusion of entertainment like never before.
TypeScript
3
star
15

DataStructures

Generic Data Structures implemented in C language
C
2
star
16

Pong-Multiplayer

Pong multiplayer written in Python and PyGame
Python
2
star
17

hello-world

Just a test repository
2
star
18

Tic-Tac-Toe

Tic-Tac-Toe multiplayer with AI
TypeScript
2
star
19

notification_server

Real-time push notification server for my WhatsApp clone
Python
1
star