Skip to content

YKeanoe/maze_algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Maze Algorithm

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,

Showcase

Normal Maze
normal

Hexagon Maze
hex

Tunnel Maze
tunnel

Kruskal's Maze Generation Algorithm
kruskal

Prim's Maze Generation Algorithm
prim

Recursive Backtracking Maze Generation Algorithm
recur

Recursive Backtracking Maze Solver Algorithm
recur

Bidirectional Breadth-First-Search Maze Solver Algorithm
bidir

Built With

  • Eclipse - Framework and IDE used.
  • Java - Language used.

Usage

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

Authors

  • Youhan Xia - Lecturer and Skeleton code provider
  • Jeffrey Chan - Lecturer and Skeleton code provider
  • Yohanes Keanoe - Implement Algorithm

Releases

No releases published

Packages

No packages published

Languages