This project is a web-based visualization tool for pathfinding algorithms. It allows users to visualize how algorithms like Depth-First Search (DFS) and Breadth-First Search (BFS) find the shortest path between two points on a grid, avoiding obstacles.
- Interactive Grid: Create and modify the grid of nodes.
- Algorithm Selection: Choose between different pathfinding algorithms (DFS and BFS).
- Set Start and End Points: Define the starting and ending nodes for the pathfinding.
- Obstacle Creation: Add obstacles to the grid to challenge the algorithms.
- Maze Generation: Generate a random maze.
- Real-time Visualization: Watch the algorithms explore the grid in real-time.
- Reset Functionality: Easily reset the grid to its initial state.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node.js and npm installed on your machine.
- Clone the repo
git clone https://github.com/your_username_/pathfinder-viz.git
- Install NPM packages
npm install
- Run the development server
npm run dev
- Select an Algorithm: Choose either DFS or BFS from the menu.
- Set Start and End Points: Click on the "Set Start" and "Set End" buttons and then click on the grid to place the start and end nodes.
- Add Obstacles: Click on the "Set Obstacles" button and click on the grid to add obstacles.
- Generate a Maze: Click on the "Maze" button to generate a random maze.
- Run the Visualization: Click the "Run" button to see the algorithm in action.
- Reset: Click the "Reset" button to clear the grid.