Skip to content

A Python 3 interactive visualizer for procedural maze generation and real-time performance benchmarking of pathfinding algorithms.

License

Notifications You must be signed in to change notification settings

AndresN1/MazeGeneratorAndSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

en es


Advanced Pathfinding & Graph Theory Visualizer

Python Pygame Status

An interactive engineering tool designed to visualize, analyze, and compare Pathfinding algorithms on unweighted graphs, procedurally generated using BFS with visited node tracking.

The project allows for real-time transformation of the maze topology (from Tree to Cyclic Graph) to test the robustness of heuristic algorithms.

Project Demo

Objective

To empirically analyze the behavior of search algorithms under different topological conditions:

  1. Perfect Mazes (Trees): Single possible path. Greedy and A* perform similarly.
  2. Graphs with Cycles (Loops): Multiple paths. Demonstrates how Greedy sacrifices optimality for speed, while A* guarantees the shortest path.

Includes a Real-Time Metrics Panel to measure:

  • CPU Time (ms).
  • Memory Efficiency (Nodes explored).
  • Solution Quality (Path length).

Implemented Algorithms

Algorithm Structure Observed Behavior
BFS (Breadth-First) Queue (FIFO) Guarantees optimal path. Uninformed search, highly memory-intensive.
DFS (Depth-First) Stack (LIFO) Fast but erratic. Frequently produces suboptimal and long solutions.
Greedy Best-First Priority Queue Very fast. Guided solely by heuristic. In graphs with loops, it often falls into local minima (long paths).
A (A-Star)* Priority Queue Optimality and efficiency. Guarantees the optimal path while reducing the number of visited nodes.

Controls & Interaction

  • R: Generate new maze (Recursive Backtracker).
  • C: Clear the maze.
  • W: Break Walls (Introduces random loops into the graph).
  • B: Run BFS.
  • D: Run DFS.
  • G: Run Greedy.
  • A: Run A*.

About

A Python 3 interactive visualizer for procedural maze generation and real-time performance benchmarking of pathfinding algorithms.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages