Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.
/ maze-solver Public archive

Creates a maze then finds a path between the starting point and a random point with different approaches.

License

Notifications You must be signed in to change notification settings

kariyum/maze-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maze_solver

Maze generation

Starts by generating a random maze assuring that it does not contain any closed areas using depth first algorithm. By closed areas I mean, every node is reachable by any other node. Depth first algorithm coupled with random choice of the next node made sure that the maze generated is random.

Path finding:

To find the path between two assinged nodes, two approaches were considered. A blind approach vs a heuristic approach, just to emphasize the use of heuritics. The algorithm starts from an assigned node then begins the search.

First blind approach

This approach prioritizes left -> forward -> right -> backward. Notice here the terms used, left forward right backward not north and so on. It is because the algorithm takes into account the direction that it is facing.

Second heuristic approach

Best first approach is implemented this time. It computes the flying distance between its current position and the goal position.

Here's a visualization of an example

About

Creates a maze then finds a path between the starting point and a random point with different approaches.

Topics

Resources

License

Stars

Watchers

Forks

Languages