--- title: Smart Grid Environment Server emoji: 🎯 colorFrom: yellow colorTo: blue sdk: docker pinned: false app_port: 8000 base_path: /web tags: - openenv --- # ⚡ Smart Grid OpenEnv Environment A realistic reinforcement learning environment that simulates **energy distribution in a smart electrical grid** powered by renewable sources. Built for the Meta x PyTorch OpenEnv Hackathon, this environment enables AI agents to learn how to balance demand, renewable generation, and battery storage. ------------------------------------------------------------------------ ## 🌍 Problem Overview Modern power grids must handle: - Fluctuating energy demand - Intermittent solar and wind generation - Limited battery storage The goal is to optimally distribute energy across regions while minimizing: - Unmet demand - Energy waste - Battery misuse ------------------------------------------------------------------------ ## 🧠 Environment Design ### ⏱ Time-based Simulation - Each episode = 24 timesteps (hours) - Demand and generation vary dynamically over time ------------------------------------------------------------------------ ## 📦 Observation Space ``` Feature Description ------------------ -------------------------- hour Current timestep (0--23) demand_r1 Demand in Region 1 demand_r2 Demand in Region 2 demand_r3 Demand in Region 3 solar_generation Solar power available wind_generation Wind power available battery_level Current battery storage battery_capacity Maximum battery capacity ``` ------------------------------------------------------------------------ ## 🎯 Action Space The agent must output: supply_r1, supply_r2, supply_r3, charge_battery ------------------------------------------------------------------------ ## 🧩 Tasks - Easy: balanced_grid_easy - Medium: solar_management, wind_uncertainty - Hard: peak_demand, full_grid_challenge ------------------------------------------------------------------------ ## 🚀 Running Locally pip install -r requirements.txt uvicorn server.app:app --reload ------------------------------------------------------------------------ ## 🐳 Docker docker build -t smart_grid_env .\ docker run -p 8000:8000 smart_grid_env ------------------------------------------------------------------------ ## 🤖 Inference python inference.py ------------------------------------------------------------------------ ## 📁 Project Structure ``` smart_grid/ ├── client.py ├── models.py ├── openenv.yaml ├── inference.py ├── server/ ├── tasks/ ``` ------------------------------------------------------------------------ ## 🏁 Goal Train an AI agent that balances supply, demand, and storage efficiently.