Skip to content

A generic path-finding algorithm that reads any maze from a text file and finds a valid path from an entrance on the top row to an exit located on the left, right, or bottom edge. Implements DFS-based traversal with backtracking and outputs both coordinate paths and visualized representation.

Notifications You must be signed in to change notification settings

inteera/MazeSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Maze Solver – Java

A simple and flexible maze-solving algorithm implemented in Java.
The solver reads a maze from a .txt file, parses it into a grid, and finds a valid path from an entrance on the top row to an exit on any border (left, right, bottom).

The maze can be any size as long as it follows two rules:

  1. Entrance is on the top row.
  2. Exit is on the left, right, or bottom boundary.

πŸš€ Features

  • βœ” Reads maze from an external text file
  • βœ” Works on any maze layout fitting the entrance/exit rules
  • βœ” Uses Breath First Search (BFS)
  • βœ” Prevents revisiting nodes
  • βœ” Outputs:
    • Full coordinate path
  • βœ” Clean, object-oriented structure

About

A generic path-finding algorithm that reads any maze from a text file and finds a valid path from an entrance on the top row to an exit located on the left, right, or bottom edge. Implements DFS-based traversal with backtracking and outputs both coordinate paths and visualized representation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages