Energy Management Agent Game

Train a smart building controller, balance comfort against cost, manage renewables and batteries, and watch adaptive energy decisions improve across challenging simulations live today.

Simulation command centre

Configure a building, train an agent, compare policies, and inspect every energy decision.

Live building simulation

Energy flows, occupants, weather, HVAC output, solar production, and battery behaviour update every step.

Ready
Day 1 · 00:00
Outside 18.0°C · Clear
Tariff $0.14/kWh

Manual action console

Actions work directly in manual mode and can also override the learning agent for one step.

Last action: Idle

Policy and trial history

Inspect learned state-action values and compare completed episodes.

StateBest actionQ-valueVisits
No policy states learned yet.
EpisodeRewardCostComfort
Complete an episode to add history.

Advanced scenario settings

Building and comfort

Tariff, renewable energy, and storage

Reward weights

1.0
2.5
0.8
0.5

Scenario switches

Weather forecastGive the agent a noisy next-step forecast.
Random eventsAllow price spikes, faults, and open windows.
Demand chargePenalise the highest grid demand.
Battery degradationPenalise excessive battery cycling.
Distribution shiftChange weather statistics during later episodes.
Adaptive comfortAdjust acceptable temperature using outdoor conditions.
Backup generatorSupport critical loads during grid restrictions.

Learning guide

Goal: keep occupied spaces comfortable while reducing energy cost, carbon emissions, peak demand, and unnecessary equipment switching.

State

The state combines temperature error, tariff level, occupancy, renewable output, and battery charge. Q-learning stores a value for every available action in each observed state.

Action

The agent can idle, heat, cool, ventilate, precondition, dim flexible loads, charge storage, or discharge storage.

Reward

Comfort adds reward. Electricity cost, carbon, demand peaks, and rapid switching subtract reward. Renewable self-use can add a bonus.

Q-learning update

Q(s,a) ← Q(s,a) + α[r + γ max Q(s′,a′) − Q(s,a)]

Exploration

A high exploration rate tries unfamiliar actions. Decay gradually shifts the agent toward the best learned actions.

Suggested experiment

  1. Train for 15 episodes using time-of-use pricing.
  2. Reduce exploration and run the trained agent.
  3. Compare cost, comfort, carbon, and peak demand against the rule baseline.
  4. Enable price spikes or a heatwave to test generalisation.
Energy agent
Ready.