Skip to content

Repository files navigation

Pathfinding Visualizer

This is a simple pathfinding visualizer implemented in Python using the Pygame library. It allows you to interactively place start and end points, as well as obstacles, and visualize various pathfinding algorithms.

Djikstra's Algorithm

image

A* Algorithm

image

dfs Algorithm image

bfs Algorithm image

Greedy Best-First Search Algorithm image

Features

  • Place start and end nodes.
  • Add obstacles to the grid.
  • Visualize pathfinding algorithms:
    • A* (A Star)
    • Dijkstra's
    • Depth-First Search (DFS)
    • Breadth-First Search (BFS)
    • Greedy Best-First Search

Getting Started

  1. Make sure you have Python and Pygame
  2. Clone this repository: git clone https://github.com/GlennWilliam/PathVisualizer.git
  3. Navigate to the project directory:
  4. Run the visualizer: python main.py
  5. To change the algorithm, change the algorithm function on the main.py

Usage

  • Left-click: Place start and end nodes, and add obstacles.
  • Right-click: Remove nodes and obstacles.
  • Press 'Space': Run the selected pathfinding algorithm.
  • Press 'C': Clear the grid.
  • Press 'Ctrl + X': Quit the program.

Algorithms

  • A* (A Star)
  • Dijkstra's
  • Depth-First Search (DFS)
  • Breadth-First Search (BFS)
  • Greedy Best-First Search

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages