Perform and visualize Depth First Search
On the Home Menu of the simulation, you can access two main modules:
- Maze Pathfinding
- Graph DFS
Maze pathfinding
A maze is a classic puzzle consisting of a complex network of paths and walls. The objective is to navigate from a designated start point to a goal. In this simulation, we utilize the Depth-First Search (DFS) algorithm to visualize the process of finding a solution through the maze, demonstrating how the algorithm explores different paths and backtracks from dead ends.
Usage Instructions:
Adjust Maze Size
Use the controls to increase or decrease the dimensions of the maze.Create Walls
Click on maze squares to add walls and modify the layout.Control Animation Speed
Adjust the slider to change the DFS visualization speed.Randomize Maze
Click the 'Randomize' button to generate a random maze configuration.Start Pathfinding
Click 'Start' to begin the DFS visualization.Observe Results
Watch how DFS explores the maze paths.
The corresponding graph updates in real-time, showing nodes visited and the traversal path.graph DFS
you can view a graph with default values in 'No of nodes' and 'Starting node'. To change values and generate Custom graphs with 'n' number of nodes user follow below steps:
Change the radio button from 'Random' to 'Manual'
Enter the no of nodes you want to generate in the Number of Nodes field.
Click on each adjascent nodes together to generate edges inbetween
Repeat the step 3 untill you made the graph
Enter the Starting node number in the 'Starting Node' field
Press the 'GO' Button to start traversing of node using Depth First Search.
Press the 'RESET' botton to Reset to the presets of simulation/start again.
Random Graphs can also be generated in the simulation as follows:
- Select 'Random' radio button in Create Edges
- Enter the no. of nodes needed in 'Number of nodes' text field.
- Enter the starting Node number in 'Starting Node' field.
- Press the 'Go' Buton to start the traversing in randomly generated graph.
- Press the 'RESET' botton to Reset to the presets of simulation/start again.
The graph trversal based on DFS algorithm starts excecuting on clicking "GO"command button from the web interface.