https://github.com/weiyx16/rl_toy_example
Deep RL toy example based on gym package with several methods
https://github.com/weiyx16/rl_toy_example
a2c a3c continuous-mountain-car dqn-tensorflow gym mountain-car qlearning sarsa sarsa-lambda
Last synced: 2 months ago
JSON representation
Deep RL toy example based on gym package with several methods
- Host: GitHub
- URL: https://github.com/weiyx16/rl_toy_example
- Owner: weiyx16
- Created: 2019-12-13T09:03:04.000Z (over 5 years ago)
- Default Branch: release
- Last Pushed: 2020-01-15T09:17:07.000Z (over 5 years ago)
- Last Synced: 2025-01-22T00:46:15.874Z (4 months ago)
- Topics: a2c, a3c, continuous-mountain-car, dqn-tensorflow, gym, mountain-car, qlearning, sarsa, sarsa-lambda
- Language: Python
- Homepage:
- Size: 1.03 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Mountain car RL task
Env from [gym](https://github.com/openai/gym) and compare different methods on two tasks: [Mountain car v0](https://gym.openai.com/envs/MountainCar-v0) and [Continuous mountain car v0](https://gym.openai.com/envs/MountainCarContinuous-v0)
## Env
+ Ubuntu
+ Tensorflow 1.x (test on 1.12.0)
+ Gym (test on 0.15.4)
+ Numpy (test on 1.17.2)
+ Matplotlib (test on 3.1.1)```sh
# or if you use anaconda, you can directly run:
$ conda env create -f environment.yml
```## Usage
**Notice** if you want to render the video, in beginning of each file:
```python
RENDER = True # Show GUI
```### Mountain Car v0
Result: DQN>Sarsa-lambda>Sarsa~QTable
```sh
$ cd MountainCar
# Run QTable
$ python QTable_MountainCar.py
# Run Sarsa
$ python Sarsa_MountainCar.py
# Run Sarsa-lambda
$ python Sarsalambda_MountainCar.py
# Run DQN
$ python DQN_MountainCar.py
```### Continuous Mountain Car v0
Result: A2C>A3C
```sh
$ cd MountainCar_Continuous
# Run A2C
$ python A2C_MountainCar.py
# Run A3C
$ python A3C_MountainCar.py
```## Citation
```bibtex
@misc{RLYixuan2020,
author = {Yixuan, Wei},
title = {Mountain car RL task},
howpublished = {\url{https://github.com/weiyx16/RL_Toy_Example}},
year = {2020}
}
```## Thanks
+ https://github.com/MorvanZhou/Reinforcement-learning-with-tensorflow
+ https://towardsdatascience.com/reinforcement-learning-w-keras-openai-dqns-1eed3a5338c
+ https://github.com/stefanbo92/A3C-Continuous
+ https://github.com/sudharsan13296/Hands-On-Reinforcement-Learning-With-Python
+ https://medium.com/@asteinbach/actor-critic-using-deep-rl-continuous-mountain-car-in-tensorflow-4c1fb2110f7c
+ https://towardsdatascience.com/understanding-actor-critic-methods-931b97b6df3f