💡 Inspiration

Most drone swarms today rely on a central command center. If that center fails, the entire mission fails. I wanted to build a swarm that doesn't need a "brain" — a system where every drone is its own decision-maker.

Inspired by ant colonies, bird flocks, and military drone coordination, I built a decentralized swarm intelligence system from scratch — starting with zero Python knowledge.

🧠 What It Does

30+ autonomous drones coordinate without any central controller.

Each drone:

  • Senses nearby neighbors (local information only)
  • Allocates tasks using CBBA (Consensus-Based Bundle Algorithm)
  • Communicates using TDMA (Time-Division Multiple Access) — realistic radio discipline
  • Self-heals when drones fail (automatic task reallocation)

The system simulates:

  • ✅ CBBA task allocation with consensus
  • ✅ TDMA radio communication (drones take turns speaking)
  • ✅ Packet loss simulation (0–100%)
  • ✅ Ghost drone fault tolerance (reallocates tasks in under 50 frames)
  • ✅ A/B testing UI to compare "perfect comms" vs. "realistic radio"

🔧 How I Built It

Stack:

  • Python 3.11+ (core simulation)
  • Streamlit (interactive dashboard)
  • Matplotlib + Plotly (visualization)
  • Docker (containerization)
  • Pytest (17-unit tests, all passing)

Key Algorithms Implemented:

  • CBBA — Consensus-Based Bundle Algorithm for task allocation
  • TDMA — Time-Division Multiple Access for realistic communication
  • D-TDMA — Dynamic TDMA (drones near threats get 2× airtime)
  • Reynolds Rules — Cohesion, Separation, Alignment
  • Voronoi Partitioning — Zero-overlap coverage

Total Code: 3,640 lines, 17 tests, 100% passing.

🚧 Challenges Faced

1. Simulating Realistic Communication Most swarm papers assume "magic telepathy" — drones know everything instantly. I had to build a TDMA scheduler that forces drones to take turns speaking, just like real radio.

2. Fault Tolerance Making the swarm self-heal was hard. When a drone goes silent, other drones must detect it, purge its bids, and reallocate its tasks — all without a central controller.

3. A/B Testing I built a toggle in the Streamlit UI so users can compare "perfect communication" (20–30 frames to consensus) vs. "realistic radio" (100–200+ frames). The performance drop is stark — but it's physically real.

4. Learning from Zero I started this project with no Python knowledge. Every line of code was a learning experience.

🏆 Accomplishments I'm Proud Of

  • ✅ 3,640 lines of production-grade Python
  • ✅ 17/17 unit tests passing
  • ✅ CBBA + TDMA + D-TDMA + Ghost Drone Fault Tolerance
  • ✅ Live Streamlit dashboard with A/B testing
  • ✅ Dockerized deployment
  • ✅ IEEE ICRA 2027 paper draft in progress

📚 What I Learned

  • Multi-agent systems are hard — but decentralized systems are resilient
  • Communication is the bottleneck, not compute
  • Realistic simulation > magical assumptions
  • Testing is non-negotiable (17 tests saved me countless bugs)
  • Building in public accelerates learning

🚀 What's Next

  • ROS2 Integration — Port the algorithm to ROS2 for real drone deployment
  • HPM Resilience — Model High-Power Microwave attacks and swarm survival
  • Hardware Validation — Deploy on physical drones (Crazyflie/TurtleBot)
  • IEEE ICRA Submission — Full paper with formal proofs and benchmarks

Built With

  • a/btesting
  • algorithms
  • cbba
  • docker
  • matplotlib
  • multiagentsystem
  • numpy
  • opensource
  • plotly
  • pytest
  • python
  • pyyaml
  • simulation
  • streamlit
  • swarmrobotics
  • systemthinking
  • tdma
  • versioncontrol
Share this project:

Updates

Submission history