Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aserhiychuk/pyreinforce
Deep Reinforcement Learning library for Python
https://github.com/aserhiychuk/pyreinforce
ai atari machine-learning neural-networks openai-gym python reinforcement-learning tensorflow
Last synced: 3 months ago
JSON representation
Deep Reinforcement Learning library for Python
- Host: GitHub
- URL: https://github.com/aserhiychuk/pyreinforce
- Owner: aserhiychuk
- License: mit
- Created: 2019-05-14T23:25:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-09T23:25:21.000Z (over 2 years ago)
- Last Synced: 2024-03-27T07:05:08.137Z (10 months ago)
- Topics: ai, atari, machine-learning, neural-networks, openai-gym, python, reinforcement-learning, tensorflow
- Language: Python
- Homepage:
- Size: 3.76 MB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PyReinforce
**PyReinforce** is a collection of algorithms that can be used to solve a variety of different reinforcement learning problems.| Breakout | Pong | Space Invaders |
|:-:|:-:|:-:|
| [![Breakout](assets/Breakout_160x210.gif?raw=true)](examples/Atari.ipynb) | [![Pong](assets/Pong_160x210.gif?raw=true)](examples/Atari.ipynb) | [![Space Invaders](assets/SpaceInvaders_160x210.gif?raw=true)](examples/Atari.ipynb) || Cart Pole | Lunar Lander | Pendulum |
|:-:|:-:|:-:|
| [![Cart Pole](assets/CartPole_160x160.gif?raw=true)](examples/MonteCarlo.ipynb) | [![Lunar Lander](assets/LunarLander_160x160.gif?raw=true)](examples/TemporalDifference.ipynb) | [![Pendulum](assets/Pendulum_160x160.gif?raw=true)](examples/DDPG.ipynb) |## Basics
This is how [OpenAI Gym](https://gym.openai.com/) describes the reinforcement learning process:
>There are two basic concepts in reinforcement learning: the environment (namely, the outside world) and the agent (namely, >the algorithm you are writing). The agent sends actions to the environment, and the environment replies with observations and >rewards (that is, a score).PyReinforce is fully compatible with [OpenAI Gym](https://gym.openai.com/). In fact, it will work with **any** environment as long as it implements these methods:
* `reset()`
* `step(action)`Your part is to implement a `Brain`: a neural network that agents use to decide which actions to pick for given states. Agents get better over time by performing training steps on their brains. See [examples](examples) for more details.
## Installation
Install PyReinforce from PyPI:
```bash
pip install PyReinforce
```
or from source:
```bash
git clone https://github.com/aserhiychuk/pyreinforce.git
cd pyreinforce
pip install -e .
```## Examples
* [Monte Carlo](examples/MonteCarlo.ipynb)
* [Temporal Difference](examples/TemporalDifference.ipynb)
* [Policy Gradient](examples/PolicyGradient.ipynb)
* [Deep Deterministic Policy Gradient](examples/DDPG.ipynb)
* [Deep Q-Learning](examples/Atari.ipynb)In order to run the examples you need to install dependencies:
```bash
pip install -r examples/requirements.txt
```