Deep reinforcement learning (DRL) is currently taking the world by storm and is seen as the "it" of machine learning technologies, the it goal of reaching some form of general AI. Perhaps it is because DRL approaches the cusp of general AI or what we perceive as general intelligence. It is also likely to be one of the main reasons you are reading this book. Fortunately, this chapter, and the majority of the rest of the book, focuses deeply on reinforcement learning (RL) and its many variations. In this chapter, we start learning the basics of RL and how it can be adapted to deep learning (DL). We will explore the OpenAI Gym environment, a great RL playground, and see how to use it with some simple DRL techniques.
For other readers not familiar with the theoretical background of RL, we will cover several core concepts, but this is the abridged version, so it is recommended you seek theoretical knowledge from other sources when you are ready.
In this chapter, we will start learning about DRL, a topic that will carry through to many chapters. We will start with the basics and then look to explore some working examples adapted to DL. Here is what we will cover in this chapter:
- Reinforcement learning
- The Q-learning model
- Running the OpenAI gym
- The first DRL with Deep Q-Network
- RL experiments
For those of you who like to jump around books: yes, it is OK to start this book from this chapter. However, you may need to go back to previous chapters in order to complete some exercises. We will also assume that your Python environment is configured with TensorFlow and Keras, but if you are unsure, check out the requirements.txt file in the project folder.