OpenAI Gym methods

OpenAI Gym provides the env class, which encapsulates the environment and its possible internal dynamics. The class has different methods and attributes to implement to create a new environment. The most important methods are called reset, step, and render, let's look at them briefly:

  • The reset method has the task of resetting the environment, initializing it to the initial state. Within the reset method, the definitions of the elements that make up the environment must be contained, in this case the definition of the mechanical arm, of the object to be grasped and its support.
  • The step method has the task of moving the environment forward by one step. It requires the action to be performed as input, and returns the new ...

Get Hands-On Reinforcement Learning with R now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.