Implementing BFS on randomly generating Maze in order to find the accurate solvable path
Welcome to the Lightning Algorithm project! This repository showcases an algorithm visualizer that generates and solves mazes using Breadth-First Search (BFS). Below you will find detailed information about the project's technologies, file structure, functionalities, and how to access the project.
This project visualizes the process of generating solvable mazes and finding the shortest path through them using BFS. The algorithm generates a maze grid, highlights the maze-solving process, and finally animates a lightning strike along the solved path.
This project is built using:
React: Utilized for its component-based architecture and efficient rendering.
CSS Modules: For scoped styling of React components.
HTML5 Canvas: Used for drawing the maze grid and animations.
The project is organized into several components and directories:
src/components: Contains React components like Canvas, Maze, LightningAnimation, etc.
src/assets: Includes static assets such as images and icons.
src/styles: CSS modules for styling components.
public: Public assets and the main HTML file.
Maze Generation: Automatically generates solvable mazes.
Breadth-First Search (BFS): Finds the shortest path from the top to the bottom of the maze.
Lightning Animation: Strikes along the solved path, accompanied by sound effects.
git clone https://github.com/your-username/lightning-algorithm.git
cd lightning-algorithm
npm install
npm start
Open http://localhost:3000 in your browser to view the project.
This project is currently in development, so it might contain bugs or incomplete features. Contributions and feedback are welcome!
Yes, the maze generation algorithm ensures that all generated mazes have a solvable path from top to bottom.
The lightning animation strikes along the path found by BFS, visually highlighting the shortest route through the maze.
The project is designed primarily for desktop browsers and may not be fully optimized for mobile devices.
If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. Contributions are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or feedback, you can reach out to mailto:[email protected]