Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Python Streamlit NumPy Matplotlib License Status


An interactive AI-powered rescue drone simulation that navigates a grid environment to locate victims using BFS, DFS, and A* search algorithms — with a stunning sci-fi visualizer.


Live Demo


📸 Preview

┌─────────────────────────────────────────────────────┐
│  🚁  SKYSENTINEL · AI RESCUE DRONE AGENT           │
│  ▸ BFS · DFS · A* PATHFINDING · GRID WORLD ENGINE   │
├──────────────┬──────────────┬───────────────────────┤
│  ALGORITHM   │  PATH LENGTH │  NODES EXPLORED       │
│    A*        │      7       │        7              │
├──────────────┴──────────────┴───────────────────────┤
│  . # . . . . . . #   🚁 = Drone Start               │
        │  . . # . # . . . .   🎯 = Victim                    |                    
│  # # . . . # . . .   * = A* Path                    │
│  . . . . # . # . .   # = Obstacle                   │
│  # . . . . V * * *   . = Free Cell                  │
└─────────────────────────────────────────────────────┘

✨ Features

Feature Description
🧠 3 AI Algorithms Full BFS, DFS, and A* implementations with real pathfinding
🗺️ Dynamic Grid World Configurable 10×25 grid with random obstacles and victim placement
📊 Live Comparison Side-by-side stats — path length and nodes explored for all 3 algorithms
🎨 Sci-Fi UI Dark HUD-style Streamlit interface with Orbitron fonts and neon accents
📈 Visual Charts Bar charts comparing algorithm efficiency in real time
Interactive Controls Adjust grid size, obstacle density, and algorithm — regenerate instantly
🏆 Winner Detection Automatically highlights the optimal algorithm with ★ OPTIMAL badge

🧠 Algorithms Implemented

🔵 BFS — Breadth First Search
  • Uses a deque as the frontier queue (FIFO)
  • Explores all neighbours level by level
  • Guarantees the shortest path
  • Higher node exploration count compared to A*
  • Returns: (path, nodes_explored)
🟠 DFS — Depth First Search
  • Uses a list as a stack (LIFO)
  • Dives deep along one branch before backtracking
  • Does NOT guarantee shortest path
  • Can find paths quickly on open grids
  • Returns: (path, nodes_explored)
🟢 A\* — A-Star Search
  • Uses heapq (priority queue) with f = g + h
  • g_cost = steps taken so far
  • h_cost = Manhattan distance to victim
  • Optimal AND efficient — fewest nodes explored
  • Returns: (path, nodes_explored)

📁 Project Structure

🚁 rescue-drone-agent/
│
├── 📄 algorithms.py       # BFS, DFS, A* search implementations
├── 📄 environment.py      # Grid world engine (obstacles, victim, drone)
├── 📄 main.py             # Integration layer + run_simulation()
├── 📄 app.py              # Streamlit UI (sci-fi visualizer)
└── 📄 requirements.txt    # Python dependencies

⚙️ Setup & Installation

1. Clone the repository

git clone https://github.com/yourusername/skysentinel.git
cd skysentinel

2. Install dependencies

pip install -r requirements.txt

3. Run the app

python -m streamlit run app.py

4. Open in browser

http://localhost:8501

🚀 How to Use

1. ⚙️  Set Grid Size       →  Drag the slider (10–25)
2. 🧱  Set Obstacle Density →  Lower = easier path, Higher = harder
3. 🧠  Select Algorithm     →  BFS / DFS / A*
4. ▶️  Click RUN SIMULATION →  Watch the drone find its path
5. 📊  Compare Results      →  See which algorithm wins

💡 Tip: Set obstacle density to ~0.20 for best results. Too high and no path can be found!


📊 Algorithm Comparison

Algorithm Path Optimality Nodes Explored Speed
BFS ✅ Shortest High Medium
DFS ❌ Not optimal Medium Fast
A* ✅ Shortest Lowest Fastest

A* wins every time — it finds the shortest path while exploring the fewest nodes, thanks to the Manhattan distance heuristic.


🛠️ Tech Stack

Python     3.10+Core language
NumPy      2.xGrid world array operations
Matplotlib 3.xGrid & chart visualizations
Streamlit  1.xInteractive web UI
heapqA* priority queue
collections.dequeBFS frontier queue

👥 Team

Member Roll No Role
Bhoomika Poddar RA2411026010571 AI Core & Algorithms
Farzan Alam RA2411026010573 Simulation & Integration
Akshit Gaurana RA2411026010576 Frontend UI & Demo

21CSC206T — Artificial Intelligence | SRM Institute of Science and Technology


📜 License

MIT License — free to use, modify, and distribute.

**Made with ❤️

21CSC206T · Artificial Intelligence · SRM IST

⭐ Star this repo if you found it helpful!

About

GitHub About (one-liner): Interactive AI rescue drone simulation that navigates a grid to locate victims using BFS, DFS & A* pathfinding — sci-fi HUD visualizer built with Streamlit.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages