In this chapter, we wrote code to conduct reinforcement learning using deep Q-learning. We noted that while Q-learning is a simpler approach, it requires a limited and known environment. Applying deep Q-learning allows us to solve problems at a larger scale. We also defined our agent, which required creating a class. The class defined our agent and we instantiated an object with the attributes defined in our class to solve the reinforcement learning challenge. We then created a custom environment using functions that defined boundaries, as well as the range of moves the agent could take and the target or objective. Deep Q-learning involves adding a neural network to select actions, rather than relying on the Q matrix, as in Q-learning. We then added a neural network to our agent class.
Lastly, we put it all together by placing our agent object in our custom environment...