Reinforcement learning for energy systems
energypy is a framework for running reinforcement learning experiments on energy environments.
energypy is built and maintained by Adam Green - [email protected].
$ git clone https://github.com/ADGEfficiency/energy-py
$ pip install --ignore-installed -r requirements.txt
$ python setup.py install
energy-py has a high level API to run a specific run of an experiment from a
$ energypy-experiment energypy/examples/example_config.yaml battery
An example config file (
expt: name: example
battery: &defaults total_steps: 10000
env: env_id: battery dataset: example agent: agent_id: random
Results (log files for each episode & experiment summaries) are placed into a folder in the users
$HOME. The progress of an experiment can be watched with TensorBoard by running a server looking at this results folder:
$ tensorboard --logdir='~/energy-py-results'
energypy provides the familiar gym style low-level API for agent and environment initialization and interactions:
env = energypy.make_env(env_id='battery')
agent = energypy.make_agent( agent_id='dqn', env=env, total_steps=10000 )
observation = env.reset()
while not done: action = agent.act(observation) next_observation, reward, done, info = env.step(action) training_info = agent.learn() observation = next_observation
energy-py environments follow the design of OpenAI
gym. energy-py also wraps some classic
gymenvironments such as CartPole, Pendulum and MountainCar.
energy-py currently implements: