Git Product home page Git Product logo

energy-py's Introduction

energy-py

Build Status

energypy is a framework for running reinforcement learning experiments on energy environments.

energypy is built and maintained by Adam Green - [email protected].

Installation

$ git clone https://github.com/ADGEfficiency/energy-py

$ pip install --ignore-installed -r requirements.txt

$ python setup.py install

Running experiments

energy-py has a high level API to run a specific run of an experiment from a yaml config file:

$ energypy-experiment energypy/examples/example_config.yaml battery

An example config file (energypy/examples/example_config.yaml):

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'

Low level API

energypy provides the familiar gym style low-level API for agent and environment initialization and interactions:

import energypy

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

Library

energy-py environments follow the design of OpenAI gym. energy-py also wraps some classic gym environments such as CartPole, Pendulum and MountainCar.

energy-py currently implements:

  • naive agents
  • DQN agent
  • Battery storage environment
  • Demand side flexibility environment
  • Wrappers around the OpenAI gym CartPole, Pendulum and MountainCar environments

Further reading

energy-py's People

Contributors

adgefficiency avatar tomharvey avatar keirsimmons avatar hassaku avatar nhoening avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.