reset(episode=-1, seed=None)

This is similar to the reset() method we saw in the Gym interface, but unlike Gym environments, DM Lab's reset method call does not return the observation. We will see later how to get observations, so for now, we will discuss DM Lab's reset(episode=-1, seed=None) method. It resets the environment to an initial state and needs to be called at the end of every episode, in order for a new episode to be created. The optional episodeargument takes an integer value to specify the level in a specific episode. If the episodevalue is not set, or is set to -1, the levels are loaded in numerical order. The seedargument is also optional and is used to seed the environment's random number generator for reproducibility purposes. ...

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.