https://github.com/hcnoh/rl-collection-pytorch
A collection of Reinforcement Learning implementations with PyTorch
https://github.com/hcnoh/rl-collection-pytorch
actor-critic continuous-control deep-learning deep-reinforcement-learning gae generalized-advantage-estimation openai-gym policy-gradient ppo proximal-policy-optimization pytorch reinforcement-learning trpo trust-region-policy-optimization
Last synced: 21 days ago
JSON representation
A collection of Reinforcement Learning implementations with PyTorch
- Host: GitHub
- URL: https://github.com/hcnoh/rl-collection-pytorch
- Owner: hcnoh
- License: mit
- Created: 2020-12-04T07:49:27.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-22T00:51:14.000Z (about 3 years ago)
- Last Synced: 2025-03-30T15:46:26.483Z (about 2 months ago)
- Topics: actor-critic, continuous-control, deep-learning, deep-reinforcement-learning, gae, generalized-advantage-estimation, openai-gym, policy-gradient, ppo, proximal-policy-optimization, pytorch, reinforcement-learning, trpo, trust-region-policy-optimization
- Language: Python
- Homepage:
- Size: 5.84 MB
- Stars: 20
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Reinforcement Learning Collection with PyTorch
This repository is a collection of the following reinforcement learning algorithms:
- **Policy-Gradient**
- **Actor-Critic**
- **Trust Region Policy Optimization**
- **Generalized Advantage Estimation**
- **Proximal Policy Optimization**More algorithms will be added on this repository.
In this repository, [OpenAI Gym](https://gym.openai.com/) environments such as `CartPole-v0`, `Pendulum-v0`, and `BipedalWalker-v3` are used. You need to install them before running this repository.
*Note*: The environment's names could be different depending on the version of OpenAI Gym.
## Install Dependencies
1. Install Python 3.
2. Install the Python packages in `requirements.txt`. If you are using a virtual environment for Python package management, you can install all python packages needed by using the following bash command:```bash
$ pip install -r requirements.txt
```3. Install other packages to run OpenAI Gym environments. These are dependent on the development setting of your machine.
4. Install PyTorch. The version of PyTorch should be greater or equal than 1.7.0.
## Training and Running
1. Modify `config.json` as your machine setting.
2. Execute training process by `train.py`. An example of usage for `train.py` are following:```bash
$ python train.py --model_name=trpo --env_name=BipedalWalker-v3
```The following bash command will help you:
```bash
$ python train.py -h
```
3. You can run your pre-trained agents by executing `run.py`. The usage for running `run.py` is similar to that of `train.py`. You can also check the help message by the following bash bash command:```bash
$ python run.py -h
```## The results of CartPole environment




## The results of Pendulum environment

## The results of BipedalWalker environment

## Recent Works
- The CUDA usage is provided now.
- Modified some errors in GAE and PPO.
- Modified some errors about horizon was corrected.## Future Works
- Find the errors of the Actor-Critic
- Implement ACER
- Search other environments to running the algorithms## References
- An explaination of TRPO line search: [link](https://jonathan-hui.medium.com/rl-trust-region-policy-optimization-trpo-part-2-f51e3b2e373a)
- Additional stability method for PPO value function: [link](https://github.com/takuseno/ppo/issues/6)