Skip to content

A maze generation and pathfinding visualisation tool. Written in python.

Notifications You must be signed in to change notification settings

cillian-smith/Pathfinding-Visualisation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathfinding-Visualisation

A Python programme to visualise pathfinding and maze generation on a grid, using Pygame. Made it to practice implementing algorithms in python and to practice with pygame.

 Alt text

Running the app

Clone the repo and run the Runner.py file. It has dependencies on Pygame.

Run: Pip install pygame

Or if using a virtual environment, see the requirements.txt

Instructions

Once the Pygame Window appears, the grid will initialise and you will see a GUI. Place a start and an end node to run a search algortihm.

 Alt text

There are a number of buttons and toggles:

  • A toggle to disable the animation of the searching, instead just showing the result. This is faster than running with animation.
  • A toggle to animate the shortest path

Maze Generation

Currently there are two different maze generation algorithms implemented:

  • Randomised Prim's algorithm
  • Iterative Backtracking

Maze Solving Algorithms

There are currently two algorithms implemented:

  • Djikstra
  • A*

Examples

Prim's

 Alt text

Iterative Backtracking

 Alt text

A*

 Alt text

Djikstra

 Alt text

All examples were on a 200x200 grid.