Skip to main content

# anyrl-py

This is a Python remake (and makeover) of [anyrl](https://github.com/unixpickle/anyrl). It is a general-purpose library for Reinforcement Learning which aims to be as modular as possible.

# Installation

You can install anyrl with pip:

` pip install anyrl `

# APIs

There are several different sub-modules in anyrl:

  • models: abstractions and concrete implementations of RL models. This includes actor-critic RNNs, MLPs, CNNs, etc. Takes care of sequence padding, BPTT, etc.

  • envs: APIs for dealing with environments, including wrappers and asynchronous environments.

  • rollouts: APIs for gathering and manipulating batches of episodes or partial episodes. Many RL algorithms include a “gather trajectories” step, and this sub-module fulfills that role.

  • algos: well-known learning algorithms like policy gradients or PPO. Also includes mini-algorithms like Generalized Advantage Estimation.

  • spaces: tools for using action and observation spaces. Includes parameterized probability distributions for implementing stochastic policies.

# Motivation

Currently, most RL code out there is very restricted and not properly decoupled. In contrast, anyrl aims to be extremely modular and flexible. The goal is to decouple agents, learning algorithms, trajectories, and things like GAE.

For example, anyrl decouples rollouts from the learning algorithm (when possible). This way, you can gather rollouts in several different ways and still feed the results into one learning algorithm. Further, and more obviously, you don’t have to rewrite rollout code for every new RL algorithm you implement. However, algorithms like A3C and Evolution Strategies may have specific ways of performing rollouts that can’t rely on the rollout API.

# Use of TensorFlow

This project relies on TensorFlow for models and training algorithms. However, anyrl APIs are framework-agnostic when possible. For example, the rollout API can be used with any policy, whether it’s a TensorFlow neural network or a native-Python decision forest.

# Style

I use autopep8 and flake8. Here is the command you can use to run autopep8:

` autopep8 --recursive --in-place --max-line-length 100 . `

I recommend the following flag for flake8: –max-line-length=100

Metadata

Release files for anyrl 0.12.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anyrl 0.12.23
File Size Uploaded
anyrl-0.12.23.tar.gz 65.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anyrl 0.12.23
File Interpreter ABI Platform
anyrl-0.12.23-py3-none-any.whl Python 3 none any Details

Total release size: 155.6 kB

Release files / anyrl-0.12.23.tar.gz

Download URL anyrl-0.12.23.tar.gz
Size 65.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a7efa7803f01beb7a797a04c787be0472666030dfb290537f3c0ced975135fa7
BLAKE2b-256 checksum
How to use checksums
b319e361cf17b0617b159eb0eb7a8ab7be36b12adb8b55dad23fe451aa889c48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.20.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.3

Release files / anyrl-0.12.23-py3-none-any.whl

Download URL anyrl-0.12.23-py3-none-any.whl
Size 90.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9dfa10c6f220e31731ec49d7b47fd0ac0bfc4966dc35ac4bd26ee77969d2a688
BLAKE2b-256 checksum
How to use checksums
7b078924a62b35dfb681d88c148de055059ccc8adf1759551281aae733bdfb64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.20.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.3

Release history Release notifications | RSS feed

This release

0.12.23 This release

2 release files

0.12.5

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.27

1 release file

0.11.9

2 release files

0.11.8

2 release files

0.11.7

2 release files

0.11.6

2 release files

0.11.5

2 release files

0.11.4

2 release files

0.11.3

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.4

2 release files

0.9.0

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page