https://github.com/martinthoma/banana-gym
A simple stochastic OpenAI environment for training RL agents
https://github.com/martinthoma/banana-gym
artificial-intelligence environment machine-learning openai-environment openai-gym python reinforcement-learning
Last synced: about 2 months ago
JSON representation
A simple stochastic OpenAI environment for training RL agents
- Host: GitHub
- URL: https://github.com/martinthoma/banana-gym
- Owner: MartinThoma
- Created: 2017-11-11T18:29:44.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T01:16:48.000Z (over 2 years ago)
- Last Synced: 2024-12-19T01:06:31.136Z (10 months ago)
- Topics: artificial-intelligence, environment, machine-learning, openai-environment, openai-gym, python, reinforcement-learning
- Language: Python
- Size: 42 KB
- Stars: 89
- Watchers: 6
- Forks: 34
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repository contains a PIP package which is an OpenAI environment for
simulating an enironment in which bananas get sold.## Installation
Install the [OpenAI gym](https://gym.openai.com/docs/).
Then install this package via
```
pip install -e .
```## Usage
```
import gym
import gym_bananaenv = gym.make('Banana-v0')
```See https://github.com/matthiasplappert/keras-rl/tree/master/examples 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).