Skip to main content

Swarm Squad Ep1: Surviving the jam

Project description

Swarm Squad: Episode I – Surviving the Jam

A hybrid control architecture combining behavior-based formation control with LLM-powered decision making for autonomous multi-agent systems.

#Unmanned Aerial Vehicles   #Multi-agent Systems   #LLM Integration
#Behavior-based Control   #Communication-aware   #Formation Control

🔬 Research Evolution

This project builds upon our previous research in formation control and swarm intelligence:

  • 🚗 Low-Level Controller: Vehicle agents equipped with behavior-based and communication-aware formation control
  • 🤖 High-Level Controller: LLM agents processing simulation data to provide strategic guidance
  • 🎯 Goal: Enable swarm resilience and mission completion in challenging environments with jamming/obstacles

Supplementary Materials

Paper Presentation

🚀 Getting Started

Get uv and create a virtual environment.

uv venv --python 3.10
source .venv/bin/activate
uv pip install swarm-squad-ep1

To run the application, simply type:

swarm-squad-ep1
# or
swarm-squad-ep1 --help

🛠️ Development Installation

  1. Clone the repository and navigate to project folder:

    git clone https://github.com/Sang-Buster/Swarm-Squad-Ep1
    cd Swarm-Squad-Ep1
    
  2. Install uv first:

    # macOS/Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
    # Windows
    powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
    
  3. Create a virtual environment:

    uv venv
    
  4. Activate the virtual environment:

    # macOS/Linux
    source .venv/bin/activate
    
    # Windows
    .venv\Scripts\activate
    
  5. Install the required packages:

    uv pip install -e .
    

👨‍💻 Development Setup

  1. Install ruff and pre-commit:

    uv pip install ruff pre-commit
    
    • ruff is a super fast Python linter and formatter.
    • pre-commit helps maintain code quality by running automated checks before commits are made.
  2. Install git hooks:

    pre-commit install --hook-type commit-msg --hook-type pre-commit --hook-type pre-push
    

    These hooks perform different checks at various stages:

    • commit-msg: Ensures commit messages follow the conventional format
    • pre-commit: Runs Ruff linting and formatting checks before each commit
    • pre-push: Performs final validation before pushing to remote
  3. Code Linting:

    ruff check --fix
    ruff check --select I --fix
    ruff format
    
  4. Run the application:

    uv run src/swarm_squad/main.py
    

📁 File Tree

📂Swarm-Squad-Ep1
 ┣ 📂lib                              // Supplementary materials
 ┃ ┣ 📂img                                // Readme Assets
 ┃ ┣ 📂old                                // Original old code
 ┃ ┣ 📄Li-paper.pdf                       // Original paper
 ┃ ┣ 📄Xing-paper1.pdf                    // Paper 1
 ┃ ┣ 📄Xing-paper2.pdf                    // Paper 2
 ┃ ┗ 📄Xing-ppt.pdf                       // Presentation
 ┣ 📂logs                             // Logs
 ┣ 📂src                              // Source Code
 ┃ ┗ 📦swarm_squad                        // Python package
 ┃ ┃ ┣ 📂controllers                         // Controllers for swarm behavior
 ┃ ┃ ┃ ┣ 📄base_controller.py                   // Base controller interface
 ┃ ┃ ┃ ┣ 📄behavior_controller.py               // Behavior-based controller
 ┃ ┃ ┃ ┣ 📄controller_factory.py                // Controller management system
 ┃ ┃ ┃ ┣ 📄formation_controller.py              // Formation control
 ┃ ┃ ┃ ┗ 📄llm_controller.py                    // LLM controller
 ┃ ┃ ┣ 📂gui                                 // GUI components
 ┃ ┃ ┃ ┗ 📄formation_control_gui.py             // GUI application
 ┃ ┃ ┣ 📂models                              // Model components
 ┃ ┃ ┃ ┗ 📄swarm_state.py                       // Swarm state management
 ┃ ┃ ┣ 📂tests                               // Test cases
 ┃ ┃ ┃ ┗ 📄test_ollama.py                       // Test for Ollama
 ┃ ┃ ┣ 📄config.py                           // Configuration parameters
 ┃ ┃ ┣ 📄main.py                             // Entry point
 ┃ ┃ ┣ 📄utils.py                            // Core utility functions
 ┃ ┃ ┗ 📄visualization.py                    // Visualization functions
 ┣ 📄.gitignore
 ┣ 📄.pre-commit-config.yaml
 ┣ 📄.pre-commit-msg_template.py
 ┣ 📄.python-version
 ┣ 📄LICENSE
 ┣ 📄README.md
 ┣ 📄pyproject.toml
 ┗ 📄uv.lock

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarm_squad_ep1-0.1.7.tar.gz (8.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swarm_squad_ep1-0.1.7-py3-none-any.whl (50.8 kB view details)

Uploaded Python 3

File details

Details for the file swarm_squad_ep1-0.1.7.tar.gz.

File metadata

  • Download URL: swarm_squad_ep1-0.1.7.tar.gz
  • Upload date:
  • Size: 8.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for swarm_squad_ep1-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e350cba75716a389d8e04c7b5d53393276daba6297dd53eea6cf3944b3ed56b8
MD5 c9f0674c25a8a65b85a90a3f69ef8b07
BLAKE2b-256 264f9460aaf37fc0fb373a5cd6f39852cb494ef4dc227c29b387f2d1e2893876

See more details on using hashes here.

File details

Details for the file swarm_squad_ep1-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for swarm_squad_ep1-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c91b0defe2f98c55f102976216d86f6c5902afc173d2450f0da148deec25ee8a
MD5 466e398306936f7636e0e27584960c47
BLAKE2b-256 1661625858aa96cdaa61655341b049da320adb82b0a2076e75ac25cd023c7cc6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page