Skip to content

raynaldlao/Random_maze_pathfinding_algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Shortest Path Algorithms in a Random Maze

This repository contains a Python program that generates a random maze and uses several shortest path algorithms to find the path from a starting point to an ending point. The algorithms implemented are :

  • A* search with and without heuristic
  • Bellman-Ford
  • Dijkstra's algorithm

Installation and Usage

To use this program, you need to have Python 3 and the following libraries installed :

  • networkx
  • matplotlib

This will generate a random maze and display it on the screen, along with the shortest path found by each algorithm. The starting point is displayed in green, the ending point is displayed in red, and the path is displayed in yellow.

You can modify the starting and ending parameters as well as the maze's wall appearance rate by changing the values of the following variables at the beginning of this notebook.

Note

If the program does not find a path in the maze, you need to recompile the code.

Results

Credits

This program was written by MetalGray.

About

Shortest path algorithms in a random maze (A* with and without heuristic, Bellman-Ford, Dijkstra)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published