A project for my second year of Computer Science Algorithm and Analysis. The project is to implement maze generation and solver algorithm.
The maze have 3 types of map
- Normal maze
- Hexagon maze
- Tunnel maze
The maze generation include 3 algorithm,
The maze solver algorithm include 2 algorithm,
Kruskal's Maze Generation Algorithm
Prim's Maze Generation Algorithm
Recursive Backtracking Maze Generation Algorithm
Recursive Backtracking Maze Solver Algorithm
Bidirectional Breadth-First-Search Maze Solver Algorithm
Update the example.txt in src folder first line into:
(normal|tunnel|hex) (modiPrim|kruskal|recurBack) (recurBack|biDir) (map height) (map width) (start row) (start column) (finish row) (finish column)
Example:
hex kruskal recurBack 50 50 0 0 49 49
For tunnel type map, add new line for each tunnel into:
(start row) (start column) (finish row) (finish column)
Example:
tunnel kruskal recurBack 50 50 0 0 49 49
10 10 42 44
25 25 0 25
...
Run the MazeSolver.java with argument line:
<example.txt location> <y/n maze visualization>
Example:
src/example.txt y
- Youhan Xia - Lecturer and Skeleton code provider
- Jeffrey Chan - Lecturer and Skeleton code provider
- Yohanes Keanoe - Implement Algorithm