Skip to content

Deep RL toy example based on gym package with several methods

Notifications You must be signed in to change notification settings

weiyx16/RL_Toy_Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mountain car RL task

Env from gym and compare different methods on two tasks: Mountain car v0 and Continuous mountain car 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)
# 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:

RENDER = True  # Show GUI

Mountain Car v0

Result: DQN>Sarsa-lambda>Sarsa~QTable

$ 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

$ cd MountainCar_Continuous
# Run A2C
$ python A2C_MountainCar.py
# Run A3C
$ python A3C_MountainCar.py

Citation

@misc{RLYixuan2020, 
    author = {Yixuan, Wei},
    title = {Mountain car RL task},
    howpublished = {\url{https://github.com/weiyx16/RL_Toy_Example}},
    year = {2020}
}

Thanks

Releases

No releases published

Packages

No packages published

Languages