Skip to content

Visualize Dijkstra, Greedy, A*, DFS and BFS algorithms. Also includes Prim's algorithm for generating mazes. Written in Python using pygame.

Notifications You must be signed in to change notification settings

davidetacchini/pathfinding-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathfinding Visualizer

A pathfinding visualizer made in Python using pygame. Includes:

Controls

  • Right mouse button click: either set or remove both the start and the end vertex.
  • Left mouse button hold: draw walls.
  • Right mouse button hold: delete walls.
  • Right mouse button hold along with W: add weights.

Demo

Check out the images here

Algorithms

Dijkstra

  • Weighted
  • Guarantees the shortest path
  • Father of the pathfinding algorithms

Greedy best-first

  • Weighted
  • Does not guarantee the shortest path
  • Uses heuristic to compute end vertex position

A*

  • Weighted
  • Guarantees the shortest path
  • The best algorithm for pathfinding

Depth-first search

  • Unweighted
  • Does not guarantee the shortest path
  • Pretty bad algorithm for pathfinding

Breadth-first search

  • Unweighted
  • Guarantees the shortest path

Prim's Algorithm

  • Usuful to generate random mazes

Links

About

Visualize Dijkstra, Greedy, A*, DFS and BFS algorithms. Also includes Prim's algorithm for generating mazes. Written in Python using pygame.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages