A visualization tool for six fundamental uninformed search algorithms in a static grid environment.
- 6 Search Algorithms: BFS, DFS, UCS, DLS, IDDFS, and Bidirectional Search
- Real-time Visualization: Watch algorithms explore the grid step-by-step
- Static Environment: Grid with fixed walls navigation
- Interactive GUI: Built with Matplotlib for clear visualization
- Visual Feedback: Distinguish between frontier nodes, explored nodes, and the final path.
- Python 3.8 or higher
- pip package manager
Install required packages:
pip install matplotlib numpyRun the main application:
python main.pyThe application will present a menu to select:
- Search algorithm (BFS, DFS, UCS, DLS, IDDFS, Bidirectional)
- Grid size (Rows/Cols)
- Obstacle density
- Visualization delay (animation speed)
- Green (S): Start point
- Red (T): Target point
- Black: Static walls
- Light Blue: Frontier nodes (in queue/stack)
- Light Gray: Explored nodes
- Yellow: Final path
- Orange: Current node being expanded
- Explores level by level
- Guarantees shortest path in unweighted grids
- Uses queue (FIFO)
- Explores as deep as possible before backtracking
- Uses stack (LIFO)
- Does not guarantee shortest path
- Explores nodes in order of path cost
- Uses priority queue
- Guarantees optimal path based on movement costs (Diagonals cost more)
- DFS with a specified depth limit
- Prevents infinite loops
- Combines benefits of BFS and DFS
- Gradually increases depth limit
- Memory efficient with completeness guarantee
- Searches from both start and goal simultaneously
- Significantly reduces search space by meeting in the middle
When expanding nodes, the algorithm follows a specific Clockwise order including only the Main Diagonal:
- Up
- Right
- Bottom
- Bottom-Right (Diagonal)
- Left
- Top-Left (Diagonal)
Note: Top-Right and Bottom-Left diagonals are not checked, following the strict 6-direction movement requirement.
.
├── main.py # Main application entry point
├── algorithms.py # Search algorithm implementations
├── grid.py # Grid environment and visualization
├── utils.py # Helper functions and data structures
├── README.md # Project documentation
└── requirements.txt # Python dependencies
Created by Haseeb ur Rahman (23F-0566) and Areeba Majeed (23F-0651)