Introduction
While Reinforcement Learning (RL) has conquered complex games and advanced robotics, its application to sustainability—specifically energy systems—has been hindered by a significant "realism gap." Most existing RL benchmarks rely on simplified, "toy" environments that fail to capture the messy constraints of the physical world.
SustainGym is a new open-source suite of five RL environments designed to benchmark algorithms on realistic sustainable energy tasks, such as electric vehicle (EV) charging and grid management. By incorporating real-world physical constraints and temporal distribution shifts, SustainGym reveals that standard off-the-shelf RL algorithms still struggle to outperform traditional control methods in real-world scenarios.
The Realism Gap and Distribution Shifts
In the energy sector, autonomous agents must navigate hard physical limits (e.g., power line capacities) and multi-agent competition (e.g., multiple batteries bidding in a market). Most importantly, they must handle distribution shifts.
A distribution shift occurs when the environment changes fundamentally over time. For example, a global pandemic can suddenly alter how and when people charge their electric vehicles, or changing weather patterns can drastically shift the availability of renewable energy.
Unlike robotics, where the "sim-to-real" shift is often due to imperfect physics modeling, the shifts in SustainGym are exogenous. The physical laws remain the same, but the external world—weather, human behavior, and grid emissions—changes unpredictably. Without standardized, realistic benchmarks that include these challenges, researchers cannot reliably develop RL agents ready for real-world deployment.
The SustainGym Environments
To address this gap, the authors introduce SustainGym, a suite of five environments built on top of high-fidelity simulators and backed by real-world datasets:
- EVChargingEnv: Manages charging rates for EV stations using the ACNSim "digital twin" of real networks at Caltech and JPL, utilizing actual charging logs from 2018–2021.
- ElectricityMarketEnv: Bids battery storage into a 24-bus electricity market to maximize profit and reduce CO2, leveraging the IEEE RTS-GMLC test case.
- DatacenterEnv: Schedules flexible computing jobs to align with periods of "green" (low-carbon) energy, based on real job traces from a Google datacenter cluster and historical Marginal Operating Emissions Rate (MOER) data.
- CogenEnv: Manages a combined cycle gas power plant, balancing fuel use against the need to meet steam and electricity demand.
- BuildingEnv: Controls heating and cooling in multi-zone buildings to minimize energy use while maintaining comfort, using Department of Energy (DoE) commercial reference building models.
Key Findings and Algorithm Performance
The researchers tested standard RL algorithms like Proximal Policy Optimization (PPO) and Soft Actor-Critic (SAC) against traditional baselines like Model Predictive Control (MPC) and random policies. The results highlight several critical insights for the future of Green AI:
- RL is Not Yet the "Silver Bullet": In many scenarios, traditional MPC—which uses a mathematical model of the system—still outperforms RL. This highlights a pressing need for RL algorithms that can better incorporate known physical constraints.
- Vulnerability to Distribution Shifts: In
BuildingEnv, agents trained on summer data failed significantly when tested on winter data (and vice versa). This proves that "static" RL training is insufficient for climate-based tasks that experience heavy seasonal variations. - Multi-Agent Factorization Helps: In environments like EV charging, treating each charging station as an individual agent (Multi-Agent RL) improved performance. Breaking down complex energy problems into smaller, coordinated tasks helps RL learn more efficiently. In fact, most standard RL algorithms performed no better than a random policy in EV charging, except for Multi-Agent PPO with discrete actions.
- Learning in Chaos is Hard: In the
CogenEnv(power plant), agents trained on "shifted" environments with high wind power variability actually performed worse than those trained on stable data. The added noise made the environment too difficult to learn from scratch. - The Carbon Awareness Gap: While experiments showed that RL can successfully shift loads to low-carbon periods, the room for improvement compared to an "Oracle" (an agent with perfect future knowledge) remains massive, often exhibiting a 20-50% performance gap.
Limitations and Future Work
While SustainGym is a major step forward, the current suite focuses almost exclusively on electricity and CO2, leaving out other critical sustainability factors like water usage and land pollutants. Additionally, the environments currently offer a binary "original" vs. "shifted" setting. Future versions aim to include varying degrees of shift to test how robust an agent truly is, as well as expand multi-agent support across all environments.
SustainGym serves as a living benchmark, providing the "AI for Climate" community with the rigorous, realistic testing grounds needed to move RL out of the simulation and into the real world.
Summary updated