Implementing custom Gym environment wrappers

In this section, we will look at a few Gym environment wrappers that are especially very useful for the Gym Atari environments. Most of the wrappers we will implement in this section can be used with other environments as well to improve the learning performance of the agents.

The following table mentions a list of the wrappers will be implementing in the following section with a brief description for each of the wrappers to give you an overview:

Wrapper Brief description of the purpose

ClipRewardEnv

To implement reward clipping
AtariRescale To rescale the screen pixels to a 84x84x1 gray scale image
NormalizedEnv To normalize the images based on the mean and variance observed ...

Get Hands-On Intelligent Agents with OpenAI Gym 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.