/tf-a3c-gpu-python3.6.5

Tensorflow implementation of A3C algorithm

Primary LanguagePythonMIT LicenseMIT

Tensorflow implementation of A3C algorithm using GPU (haven't tested, but it would be also trainable with CPU).

On the original paper, "Asynchronous Methods for Deep Reinforcement Learning", suggests CPU only implementations, since environment can only be executed on CPU which causes unevitable communication overhead between CPU and GPU otherwise.

This source could run on python 3.6.5.

I think his work(t3-a3-gpu) is nice because of saving my time more three times. Thank you!

Hyperparamter

Hyperparameter
Optimization ADAM
Learning rate 1e-4
Gradient Clipping Global gradient clipping: 1.0
Reward Average Reward: 418.8 Maximum Reward: 851.0

Requirements

  • Python 3.6.5
  • Tensorflow v1.8
  • OpenAI Gym v0.9
  • scipy, pip (for image resize)
  • tqdm(optional)
  • better-exceptions(optional)
  • opencv-python (pip)

Training from scratch

  • All the hyperparmeters are defined on a3c.py file. Change some hyperparameters as you want, then execute it.
python ac3.py

Validation with trained models

  • If you want to see the trained agent playing, use the command:
python ac3-test.py --model ./models/breakout-v0/last.ckpt --out /tmp/result

Notes & Acknowledgement