Course: CSL304 - Artificial Intelligence
Institution: Indian Institute of Technology (IIT) Bhilai
Semester: 5 (2024-25)
- Paritosh Lahre - 12341550
- Agastya Nath - 12340140
- Y. Rahul Dev Reddy - 12342390
- Aarya Shadangule - 12340020
A sophisticated multi-agent warehouse automation system where autonomous robots coordinate to pick up and deliver packages efficiently. The simulator implements multiple AI search algorithms and conflict resolution strategies to handle complex scenarios with up to 25 robots operating simultaneously on large-scale warehouses (50×50 grids).
- Multiple AI Search Algorithms: A*, BFS, Minimax, CSP, Hill Climbing
- Intelligent Conflict Resolution: Game-theoretic decision making using Minimax
- Dynamic Path Planning: Real-time obstacle avoidance and replanning
- Scalable Architecture: Handles 25+ robots and 80+ packages simultaneously
- Visual Feedback: Real-time matplotlib visualization with statistics
- Automated Parking: Robots return to designated zones after task completion
- Primary pathfinding algorithm for all robot movements
- Uses Manhattan distance heuristic for optimal path calculation
- Ensures shortest collision-free paths in the warehouse grid
- Fallback algorithm when A* encounters complex obstacles
- Guarantees finding a path if one exists
- Used for systematic exploration of alternative routes
- Game-theoretic conflict resolution between robots
- 2-step lookahead to predict and avoid collisions
- Evaluates multiple scenarios to make optimal decisions
- Intelligent package-to-robot assignment
- Minimizes total Manhattan distance for efficient allocation
- Ensures balanced workload distribution among robots
- Escapes deadlock situations through iterative improvement
- Finds detour paths when primary routes are blocked
- Handles dynamic environment changes adaptively
PROJECT/
├── src/ # Source code directory
│ ├── __init__.py # Package initializer
│ ├── warehouse.py # Warehouse environment and grid management
│ ├── robot.py # Robot agent with AI decision-making
│ ├── simulator.py # Simulation orchestration and control
│ ├── visualizer.py # Matplotlib visualization engine
│ ├── informed_search.py # A* algorithm implementation
│ ├── uninformed_search.py # BFS, DFS, UCS algorithms
│ ├── adversarial_search.py # Minimax conflict resolution
│ ├── csp.py # Constraint satisfaction solver
│ └── local_search.py # Hill climbing for detours
│
├── main.py # Main entry point
├── requirements.txt # Python dependencies
├── setup.sh # Quick setup script
│
├── README.md # This file
├── QUICKSTART.md # Quick start guide
├── AI_TECHNIQUES_EXPLAINED.md # Detailed AI concepts documentation
└── PROJECT_STRUCTURE.md # Architecture documentation
- Python 3.8 or higher
- pip (Python package manager)
1. Clone or navigate to the project directory:
git clone https://github.com/SandstromPL/Multi-Agent-Warehouse-Robot-Simulator.git
cd Multi-Agent-Warehouse-Robot-Simulator2. Create a virtual environment (recommended):
python3 -m venv venv
source venv/bin/activate # On Linux/Mac
# OR
venv\Scripts\activate # On Windows3. Install required dependencies:
pip install -r requirements.txtDependencies installed:
numpy>=1.24.0- Numerical computationsmatplotlib>=3.7.0- Visualizationcolorama>=0.4.6- Terminal colored output
4. Verify installation:
python3 -c "import numpy, matplotlib, colorama; print('All dependencies installed successfully!')"Execute a moderate-scale simulation with visual feedback:
python3 main.py --width 25 --height 25 --robots 8 --packages 15 --obstacles 60 --visualization matplotlib --delay 0.1 --conflict-resolution minimax- Creates a 25×25 warehouse (625 cells)
- Deploys 8 autonomous robots
- Distributes 15 packages to deliver
- Places 60 obstacles randomly
- Shows live matplotlib visualization with animated robots
- Uses Minimax algorithm for intelligent conflict resolution
- Updates every 0.1 seconds for smooth animation
Console:
================================================================================
MULTI-AGENT WAREHOUSE ROBOT SIMULATOR
IIT Bhilai - CSL304 AI Project
================================================================================
Conflict Resolution: MINIMAX
================================================================================
Warehouse: 25x25
Robots: 8
Packages: 15
...
All packages delivered in 142 steps!
...
AI TECHNIQUES USED:
• astar
• minimax
================================================================================
| Flag | Type | Default | Description |
|---|---|---|---|
--width |
Integer | 20 | Warehouse width in cells |
--height |
Integer | 20 | Warehouse height in cells |
--obstacles |
Integer | 30 | Number of obstacle cells |
--drop-zones |
Integer | 2 | Number of delivery zones |
Example:
python3 main.py --width 30 --height 30 --obstacles 50| Flag | Type | Default | Description |
|---|---|---|---|
--robots |
Integer | 3 | Number of autonomous robots |
--packages |
Integer | 5 | Number of packages to deliver |
--max-steps |
Integer | 1000 | Maximum simulation steps |
Example:
python3 main.py --robots 10 --packages 20| Flag | Values | Default | Description |
|---|---|---|---|
--visualization |
matplotlib / simple / none | matplotlib | Visualization mode |
--delay |
Float | 0.1 | Delay between steps (seconds) |
Examples:
# Graphical (recommended for ≤35×35)
python3 main.py --visualization matplotlib --delay 0.1
# Terminal ASCII (fast, any size)
python3 main.py --visualization simple --delay 0.05
# No visualization (maximum speed)
python3 main.py --visualization none --delay 0Automatic Fallback:
If you specify --visualization matplotlib for very large grids (40×40+), the simulator will automatically switch to simple terminal visualization. This happens because matplotlib struggles to render large grids efficiently, causing freezing and lag. The system detects this and falls back to terminal mode to ensure smooth simulation performance.
| Flag | Values | Default | Description |
|---|---|---|---|
--conflict-resolution |
minimax / priority | minimax | Conflict resolution strategy |
Examples:
# Minimax (intelligent)
python3 main.py --conflict-resolution minimax
# Priority-based (fast)
python3 main.py --conflict-resolution priority# Run 10 simulations and show statistics
python3 main.py --batch 10 --visualization nonepython3 main.py --width 15 --height 15 --robots 3 --packages 5 --visualization matplotlib --delay 0.15python3 main.py --width 25 --height 25 --robots 8 --packages 15 --obstacles 60 --visualization matplotlib --delay 0.1 --conflict-resolution minimaxpython3 main.py --width 50 --height 50 --robots 25 --packages 80 --obstacles 200 --visualization simple --delay 0.01 --conflict-resolution minimaxpython3 main.py --width 30 --height 30 --robots 10 --packages 20 --batch 5 --visualization none- Start Small: Begin with 15×15 grids
- Optimal Size: 25×25 to 35×35 for matplotlib
- Large Grids: Use
--visualization simplefor 40×40+ - Smooth Animation: Use
--delay 0.1or higher - Stop Anytime: Press
Ctrl+Cto terminate
| Issue | Solution |
|---|---|
| Matplotlib freezes | Reduce grid to ≤35×35 or use --visualization simple |
| Too slow | Reduce --delay or use --visualization none |
| Import errors | Run pip install -r requirements.txt |
- PROJECT_STRUCTURE.md - For quick view of directory structure
- QUICKSTART.md - Minimal setup guide
- AI_TECHNIQUES_EXPLAINED.md - Detailed AI algorithms