/deep-q-learning

Minimal deep q learning (DQN) implementation in Keras for playing the Cartpole game

Primary LanguagePythonMIT LicenseMIT

deep-q-learning

animation

Minimal and Simple Deep Q Learning Implemenation in Keras and Gym

The code itself is 78 lines and is self documenting.

The explanation for the code is covered in the blog article https://keon.io/rl/deep-q-learning-with-keras-and-gym/

I made minor tweaks to this repository.

I made the memory a deque instead of just a list. This is in order to limit the maximum number of the memory so we can give more weights to the more recent memories.

I also added a load and save function for convinience.