Skip to main content

A simple stochastic OpenAI environment for training RL agents

Project description

This repository contains a PIP package which is an OpenAI environment for simulating an enironment in which bananas get sold.


Install the OpenAI gym.

Then install this package via

pip install -e .


import gym
import gym_banana

env = gym.make('Banana-v0')

See for some examples.

The Environment

Imagine you are selling bananas. One at a time. And the bananas get bad pretty quickly. Let's say in 3 days. The probability that I will sell the banana is given by

$$p(x) = (1+e)/(1. + e^(x+1))$$

where x-1 is my profit. This x-1 is my reward. If I don't sell the banana, the agent gets a reward of -1 (the price of the banana).

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 gym-banana, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size gym_banana-0.0.3-py3-none-any.whl (4.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size gym_banana-0.0.3.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page