https://github.com/gazeux33/generating-and-solving-mazes
a maze generator and solver using A* in python with pygame
https://github.com/gazeux33/generating-and-solving-mazes
astar-pathfinding maze-generator maze-solver pygame python
Last synced: about 1 year ago
JSON representation
a maze generator and solver using A* in python with pygame
- Host: GitHub
- URL: https://github.com/gazeux33/generating-and-solving-mazes
- Owner: Gazeux33
- Created: 2023-11-08T13:47:55.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-30T08:34:35.000Z (over 2 years ago)
- Last Synced: 2025-02-09T14:19:42.472Z (over 1 year ago)
- Topics: astar-pathfinding, maze-generator, maze-solver, pygame, python
- Language: Python
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Generating and Solving Mazes
## Generation Part
To generate a maze and make sure a solution exists. I choose a wall at random and compare the colour of each dimension of this wall for the x or y axis. If the colour is different then the wall takes the colour of one of the two colours and propagates that same colour.
I repeat this operation as many times as there are walls.

## Solving Part
To resolve the maze as quickly as possible I used the A* algorithm.
This algorithm consists of evaluating each neighbours of a position to determine the best direction to take

