
Training Reinforcement Learning Agents Using OpenAI Gym
The OpenAI Gym provides a lot of virtual environments to train your reinforcement learning agents. In reinforcement learning, the most difficult task is to create the environment. This is where OpenAI Gym comes to the rescue, by providing a lot of toy game environments to provide users with a platform to train and benchmark their reinforcement learning agents.
In other words, it provides a playground for the reinforcement learning agent to learn and benchmark their performance, where the agent has to learn to navigate from the start state to the goal state without undergoing any mishaps.
Thus, in this chapter, we will be learning to understand and use environments from OpenAI Gym and trying to implement basic Q-learning and the Q-network for our agents to learn.
OpenAI Gym provides different types of environments. They are as follows:
- Classic control
- Algorithmic
- Atari
- Board games
- Box2D
- Parameter tuning
- MuJoCo
- Toy text
- Safety
- Minecraft
- PyGame learning environment
- Soccer
- Doom
For the details of these broad environment categories and their environmental playground, go to https://Gym.openai.com/envs/.
We will cover the following topics in this chapter:
- The OpenAI Gym environment
- Programming an agent using an OpenAI Gym environment
- Using the Q-Network for real-world applications