I’m an energy engineer / data scientist who likes to build models to control energy systems. I’ve worked on industrial energy projects at a large utility and demand side flexibility at a start-up.

I also teach an introduction to reinforcement learning course and maintain repositories of reinforcement learning and machine learning.

Contact me on LinkedIn or via email. Check out my work on GitHub.

Reinforcement learning for energy systems

blog post - github - DQN debugging, hyperparameter tuning and solving.

Mixed integer linear programming of battery storage and combined heat and power

blog post - github - measuring forecast quality

import energypylinear as epl
model = epl.Battery(power=2, capacity=4, efficiency=1.0)
prices = [10, 50, 10, 50, 10]
info = model.optimize(prices, timestep='30min')

UK and Australian grid data

The Australian grid is a unique combination of high coal penetrations, quality potential renewable resources (and high penetration in South Australia) and a deregulated, volatile electricity market. It also has good data availability - if you know where to look for it.

A hackers guide to AEMO data - Elexon API Web Scraping using Python - What is the UK Imbalance Price?

Combined heat and power

I spent four years working as an industrial energy engineer, and worked with a lot of CHP plant. energy-py-linear has a CHP model that can be configured with a number of gas and steam turbines, then optimized as a function of gas and electricity prices.

from energypylinear.chp import Boiler, GasTurbine, SteamTurbine

assets = [
	GasTurbine(size=10, name='gt1'),
	Boiler(size=100, name='blr1'),
	Boiler(size=100, name='blr2', efficiency=0.9),
	SteamTurbine(size=6, name='st1')

info = optimize(

CHP Cheat Sheet - Gas Engines & Gas Turbines - Four Negative Effects of High Return Temperatures


I’m an energy engineer at heart. Some of my most popular work is the Energy Basics series - such as the heat equation and kW versus kWh.

I’ve also written about Average versus Marginal Carbon Emissions, the Four Inconvenient Truths of the Clean Energy Transition and the intersection of energy and machine learning.

Parallelized Cross Entropy Method


CEM on CartPole and Pendulum. Parallelized across processes and through batch.

$ python cem.py cartpole --num_process 6 --epochs 8 --batch_size 4096

$ python cem.py pendulum --num_process 6 --epochs 15 --batch_size 4096


April 3 2017 - Berlin Machine Learning Group - A Glance at Q-Learning - meetup page - youtube

June 21 2017 - Data Science Festival - A Glance at Q-Learning - meetup page - youtube

September 3 2018 - Berlin Machine Learning Group - energy-py - meetup page - slides - GitHub repo