step(action, num_steps=1)

This is similar to the Gym interface's step(action) method, but like with the reset(...) method, the call to this method does not return the next observation (or reward, done, and info). Calling this method advances the environment by num_steps number of frames, executing the action defined by action in every frame. This action-repeat behavior is useful in cases where we would like the same action to be applied for four or so consecutive frames, which was actually foundby several researchers to help with learning. There are Gym environment wrappers that accomplish this action-repeat behavior.

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.