A simulated data-center cooling controller trained with Soft Actor-Critic. The agent watches the room temperature and server load, then decides how hard to cool — holding the target temperature, dodging thermal violations, and burning as little energy as possible.
Data centers spend a huge share of their power just on cooling. Too little and servers overheat; too much and you waste energy. It's a continuous balancing act — a perfect fit for reinforcement learning.
A custom Gymnasium env models room temperature with a heat-balance equation: IT load heats it up, cooling pulls it down, ambient air leaks in.
A Soft Actor-Critic policy learns from scratch by trial and error — no hand-coded rules — discovering when and how hard to run the cooling.
Every minute, the agent is scored on how close it held the target, how much power it used, and whether it crossed the thermal safety line.
Each 60-second tick, the agent picks a cooling effort, the simulated room reacts, and a reward flows back. Repeat 1,440 times for one simulated day.
Room temperature evolves with a simple first-order heat equation. Servers add heat, the agent's cooling removes it, and the warmer outside air constantly leaks in.
Each step returns a negative cost: squared distance from target, a small energy term, and a heavy penalty for crossing the 30 °C safety ceiling.
This is the project's physics, re-implemented live in your browser with the exact constants from SimpleCoolingCfg. Drive the cooling yourself, or hand it to the auto-pilot and watch it hold the line.
Pure Python — clone, install, and you can sanity-check the sim, train an agent, and watch it work in three commands.
Runs the sim with random actions and live plots — no RL needed. Confirms everything works.
Normalizes observations, trains for 300K steps, then saves the policy and normalization stats.
Loads the trained model, runs one full day deterministically, and renders the result to a plot.
# 1 — install dependencies pip install -r requirements.txt cd environment # 2 — sanity-check the simulation (random actions) python test_env_run.py # 3 — train the Soft Actor-Critic agent (writes sac_dc.zip + vecnorm.pkl) python train_sac.py # 4 — load the policy and render one episode → eval_plot.png python eval_and_render.py