In this chapter, you will build and test your first Q-learning agent, a smartcab, using the Taxi-v2 environment from the OpenAI Gym package in Python.
Your agent is a self-driving taxicab whose job it is to collect passengers from a starting location and drop them off at their desired destination in the fewest steps possible. The taxi collects a reward when it drops off a passenger and gets penalties for taking other actions.
Gym provides the environment with all available states and actions and the attributes and functions you will need to use, and you provide the Q-learning algorithm that finds the optimal solution to the task.
Using Gym will allow you to build reinforcement learning models, compare their performance in a standardized setting, and keep track of updated versions. It will also allow others to track your work and...