Skip to main content

reinforcement learning for practitioners.

Project description

Reinforcement Learning for Practitioners (v1.1, 19Q3)

Travis_Status

Status: under active development, breaking changes may occur. Release notes.

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 a gym 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

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

ppoAgent = PpoAgent('CartPole-v0')
ppoAgent.train([plot.State(), plot.Loss(), plot.Actions(), plot.Rewards()])

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([plot.State(),   plot.Loss(),        plot.Rewards(), 
                plot.Actions(), plot.StepRewards(), plot.Steps(), plot.ToMovie()], 
                learning_rate = 0.0001, 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
    • extensible (pluggable backends, plots & training schemes)

Installation

Install from pypi using pip:

pip install easyagents

Documentation

release notes, glossary, class diagrams

EasyAgents may not be ideal 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.1.13.zip (50.9 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