Since the hyped Alpha Zero, deep reinforcement learning has been all over the news.

Although A3C is becoming the go-to approach for RL, for beginners, DQN is still the better way to know the RL basics.

However, there are few tutorials that work for the aspiring RL developers.

A lot of the existing deep reinforcement learning tutorials (falls in 1 or more):

  • Don’t have code :(
  • Use high-level packages like tf_agent which abstract necessary concepts
  • Don’t explain the connection between the high-level concepts and implementation details

This post aims to be a highly actionable step-by-step tutorial that:

  • Demonstrates how to build a complete DQN model
  • Doesn’t use anything higher-level than TensorFlow 2 and OpenAI Gym
  • Explains how to go from high-level concepts to implementation one step at a time which aligns with the real development flow

For code ninjas that read code better than posts, the code is in this repository, and a more sophisticated and complicated version is in this repository.

#machine-learning #programming #tensorflow #deep-learning

DQN from Scratch with TensorFlow 2
5.75 GEEK