Team Ai
Apppublic

Mehthab07/openenv-disaster-response

sourceHugging Facemitupdated 6mo agoView on Hugging Face
1likes
App README

ADRAE++: Autonomous Disaster Response & Resource Allocation

ADRAE++ is a high-fidelity Digital Twin and Reinforcement Learning platform designed to revolutionize crisis management. By integrating real-world geospatial data with hybrid AI coordination, it optimizes the deployment of rescue autonomous units in complex environments.


๐Ÿ—๏ธ System Architecture

mermaid
graph TD
    A[OpenStreetMap Data] --> B[OSMLoader]
    C[Weather API Simulator] --> D[Scenario Generator]
    B --> E[OpenEnv Digital Twin]
    D --> E
    E --> F[Multi-Agent System]
    
    subgraph MAS [Multi-Agent System]
        G[Heuristic++ A*]
        H[RL Brain PPO]
        I[Hybrid LLM+RL Planner]
    end
    
    F --> G & H & I
    E <--> J[FastAPI Backend]
    J <--> K[React Dashboard]

๐Ÿš€ Key Features

  • โ€”Digital Twin Engine: High-performance Gymnasium-compatible environment simulating real urban street networks.
  • โ€”Hybrid Intelligence: Combines long-term reasoning (LLM) with tactical precision (RL/A*).
  • โ€”Real-World Data: Automated pipeline for fetching and caching OpenStreetMap infrastructure.
  • โ€”Interactive Visualization: Real-time simulation control via a premium glassmorphic dashboard.
  • โ€”Operational Benchmarking: Comprehensive suite to evaluate survival rates and mission efficiency.

๐Ÿ› ๏ธ Tech Stack

  • โ€”Backend: Python 3.13 | FastAPI | Gymnasium | Stable-Baselines3 | NetworkX
  • โ€”Data: OSMSnx | GeoPandas
  • โ€”Frontend: React 18 | Vite | Leaflet Maps | Lucide Icons
  • โ€”ML Brain: PyTorch | Ollama (Local LLM)

๐Ÿšฆ Quick Start

Prerequisites

  1. 1.Python 3.13+
  2. 2.Node.js 18+
  3. 3.Ollama (Optional for Hybrid planning)

Installation

bash
# Clone and setup
pip install -r requirements.txt

# Start Backend
python server.py

# Start Frontend
cd ui
npm install
npm run dev

Usage

Visit http://localhost:5173 to access the dashboard.

  1. 1.Select an agent (e.g., Hybrid).
  2. 2.Deploy the mission.
  3. 3.Observe live survivors being rescued on the map.

๐Ÿ“Š OpenEnv Specification & Benchmarking

ADRAE++ fully complies with the OpenEnv specification.

OpenEnv Spaces

  • โ€”Observation Space: Observation(agents: List[AgentState], victims: List[VictimState], time: int, rescued_count: int)
  • โ€”Action Space: Action(agent_moves: List[int]) representing edge traversal choices per agent.
  • โ€”Reward Signal: Rich continuous tracking (Reward(value=float)) penalizing gridlock while continuously rewarding sequential rescues to provide steady partial-progress gradients.

OpenEnv Hackathon Evaluation (Inference)

To evaluate the simulation suite against the OpenEnv hackathon standard bounds:

bash
# Ensure you provide the required Environment Variables:
# HF_TOKEN is strictly mandatory.
export HF_TOKEN="your_huggingface_token"
export MODEL_NAME="gpt-4o-mini" # Optional default
export API_BASE_URL="https://api.openai.com/v1" # Optional default

# Launch the official benchmark
python inference.py

This strictly executes the OpenAI client conforming to the standard stdout [START], [STEP], and [END] syntax grading limits evaluated through the benchmark across native difficulty paradigms.

Official Difficulty Tiers

To ensure standardized benchmarking, the project defines four strict difficulty paradigms. External evaluators can test against these tiers to formally benchmark their agents:

TierTask IDAgentsVictimsObstacles / TopologyDescription
Easysimple_rescue11NoneRoute 1 agent to a nearby victim with entirely clear paths. Tests basic traversal.
Mediumblocked_rescue25Light BlockagesNavigate detours around collapsed physical bridges and flood zones. Tests basic path recalculation.
Hardswarm_rescue440Frequent BlockagesDirect a swarm fleet through a massive city grid with extreme topological restrictions.
Expertexpert_rescue8100Absolute ChaosCoordinate massive simultaneous operations navigating extreme city detours.

Local RL/Heuristic Benchmark

ADRAE++ includes a built-in evaluation suite in scripts/benchmark.py. Initial benchmarks show that Hybrid Intelligence significantly outperforms baseline models in expert-level scenarios with road blockages and severe weather.

AgentSurvival RateAvg. TimeReward
Heuristic++85%120T95.0
Hybrid RL+LLM94%105T128.4
RL PPO78%135T82.2

๐Ÿ‹ Deployment (Docker & Hugging Face Spaces)

To deploy the production-grade suite using Docker:

bash
docker build -t disaster-env .
docker run -p 7860:7860 disaster-env

This multi-stage Dockerfile automatically mounts the React Dashboard within the FastAPI scope on port 7860, natively supporting Hugging Face Spaces deployments.


๐Ÿ‘ค Credits & Research

ADRAE++ is designed for research-level simulation and production-grade operational awareness in humanitarian logistics.