Skip to main content

reinforcement learning for practitioners.

Project description

Reinforcement Learning for Practitioners (v1)

Travis_Status

Status: under active development, breaking changes may occur

EasyAgents logo

EasyAgents is a high level reinforcement learning api, written in Python and running on top of OpenAI gym using algorithms implemented in tf-Agents, OpenAI baselines and huskarl.

Use EasyAgents if

  • you have implemented your own environment and want to experiment with it
  • you want try out different libraries and algorithms, but don't want to learn the details of each implementation
  • you are looking for an easy and simple way to get started with reinforcement learning

Try it on colab:

  • Cartpole on colab introduction: training, plotting & switching algorithms. based on the classic reinforcement learning example balancing a stick on a cart.
  • Berater on colab example of a custom environment & training. gym environment based on a routing problem.
  • LineWorld on colab implement your own environment, workshop example [work in progress]

In collaboration with Oliver Zeigermann.

Scenario: simple (quick test, plot state)

from easyagents.agents import PpoAgent
from easyagents.callbacks import plot, duration

ppoAgent = PpoAgent('CartPole-v0')
ppoAgent.train([plot.State(), duration.Fast()])

Scenario_Simple

Scenario: more detailed (custom network & training)

from easyagents.agents import PpoAgent
from easyagents.callbacks import plot, duration

ppoAgent = PpoAgent( 'Orso-v1', fc_layers=(500,500,500))
ppoAgent.train(learning_rate=0.0001, [plot.State()], num_iterations = 500, max_steps_per_episode = 50)

Scenario_Detailed

Guiding Principles

  • easily train, evaluate & debug policies for (you own) gym environment over "designing new algorithms"
  • simple & consistent over "flexible & powerful"
  • inspired by keras:
    • same api across all algorithms
    • support different implementations of the same algorithm

Design ideas

  • separate "public api" from concrete implementation using a frontend / backend architecture (inspired by scikit learn, matplotlib, keras)
  • pluggable backends
  • extensible through callbacks (inspired by keras). separate callback types for training, evaluation and monitoring
  • pre-configurable, algorithm specific train & play loops

Installation

Install from pypi using pip:

pip install easyagents

Vocabulary

some terms explained

Don't use EasyAgents if

  • you would like to leverage implementation specific advantages of an algorithm
  • you want to do distributed or in parallel reinforcement learning

Note

  • This repository is under active development and in an early stage. Thus any- and everything may (and probably should) change.
  • If you have any difficulties in installing or using easyagents please let us know. We'll try to do our best to help you.
  • Any ideas, help, suggestions, comments etc in python / open source development / reinforcement learning / whatever are more than welcome. Thanks a lot in advance.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easyagents-1.0.1.zip (45.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page