July 2018
Beginner to intermediate
406 pages
9h 55m
English
Anaconda doesn't ship this package, so it has to be installed though pip:
>>> pip install gym[atari]
From this package, we can create an environment for different games, like this:
env = gym.make('FrozenLake-v0')
This creates a new environment for the text game FrozenLake. It consists of four four-character strings, starting with S and ending up at G, the goal. But there are holes (H) on the way to this goal, and ending up there makes you lose the game:
From the environment, we can get the size of the observation space, env.observation_space.n, which is 16 here (where the player is located) and the size of the action ...
Read now
Unlock full access