Skip to main content

PyTorch Reinforcement Learning Framework

Project description

<p align="center"><img src="./docs/assets/img/cherry_full.png" height="150px" /></p>


Cherry is reinforcement learning framework for researchers built on top of PyTorch.

Unlike other reinforcement learning implementations, cherry doesn't

# Installation

For now, cherry is still in development.

1. Clone the repo: `git clone`
2. `cd cherry`
3. `pip install -e cherry`

Upon our first public release, you'll be able to

pip install cherry

# Usage

The following snippet demonstrates some of the tools offered by cherry.

env = gym.make('CartPole-v0')
env = envs.Logger(env, interval=1000)
env = envs.Normalized(env)
env = envs.Torch(env)

policy = ActorCriticNet()
optimizer = optim.Adam(policy.parameters(), lr=1e-2)
running_reward = 10.0
replay = ch.ExperienceReplay()
get_action = lambda state: get_action_value(state, policy)

for episode in count(1):
# We use the rollout collector, but could've written our own
num_samples, num_episodes = rollouts.collect(env,
# Update policy
update(replay, optimizer)

More fun stuff available in the [examples/](./examples/) folder.

# Documentation


Some functionalities that we might want to implement.

* normalize / serialize / parallelize environments,
* compute advantages / policy gradients / rewards,
* print and log training / debugging stats,
* distributed / async training,
* fix: what is up with the non-determinism ?
* sample batches from replay,
* function to sample experience,
* handle recurrent policies,
* functions for GAE, discounted and bootstrapped rewards,
* unified support for continuous and discrete environments,
* one high-performance implementation of A2C on Breakout and Ant-v1. (or pybullet equivalent)

# Acknowledgements

Cherry draws inspiration from many reinforcement learning implementations.

* [OpenAI Baselines](
* [RLLab](
* Ilya Kostrikov's [implementations](
* Shangtong Zhang's [implementations](
* [RLKit](

Project details

Download files

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

Files for cherry-rl, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size cherry-rl-0.0.1.tar.gz (8.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page