What is Gym?

OpenAI Gym is a toolkit of environments for building RL algorithms. In the context of RL, an environment refers to the actual task (a Markov decision process or MDP) that is to be solved by the algorithm. The state and action spaces of the task are defined by the environment.

Be careful not to get the RL use of the word environment confused with others that we might use in different contexts, such as a Python development environment or a Unix/Linux environment. Those terms refer to very different things.

The following diagram shows the basic structure of a Gym environment:

The agent that you build will take actions against the ...

Get Hands-On Q-Learning with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.