Skip to content

Instantly share code, notes, and snippets.

@yingzwang
Last active July 8, 2022 08:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save yingzwang/2c5b455907942c7bdf3c0fece640095b to your computer and use it in GitHub Desktop.
Save yingzwang/2c5b455907942c7bdf3c0fece640095b to your computer and use it in GitHub Desktop.
Deep-Q learning implementation in Tensorflow and Keras (solving CartPole-v0)
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yingzwang
Copy link
Author

dqn
DQN graph (generated by tensorboard)

@DylanHaiyangChen
Copy link

Hi Ying,
This is a really great approach to solve CartPole problem. I wonder if you would like to support more information about the DQN architecture. Such like report or references.
I am thinking about why your implement is of high efficiency.

@TomeASilva
Copy link

Hi Ying,
This is a really great approach to solve CartPole problem. I wonder if you would like to support more information about the DQN architecture. Such like report or references.
I am thinking about why your implement is of high efficiency.

Hi dylan, HaiyangChen

I'm not associated with yingzwang, but i can give some information, this an implementation of DQN algorithm ( https://deepmind.com/research/dqn/. ) So, the architecture of the algorithm is essentially the same as the one presented in the paper. The difference is a soft-update to the weights of the target network by using exponential moving averages parameterized by tau. She also uses a decreasing exploration strategy, which clearly helps in this problem. The rest is just good hyper parameter tunning.

The code is also very good, good code practices all around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment