April 2018
Intermediate to advanced
334 pages
10h 18m
English
To understand the basics of importing Gym packages, loading an environment, and other important functions associated with OpenAI Gym, here's an example of a Frozen Lake environment.
Load the Frozen Lake environment in the following way:
import Gym env = Gym.make('FrozenLake-v0') #make function of Gym loads the specified environment
Next, we come to resetting the environment. While performing a reinforcement learning task, an agent undergoes learning through multiple episodes. As a result, at the start of each episode, the environment needs to be reset so that it comes to its initial situation and the agent begins from the start state. The following code shows the process for resetting an environment: ...