In this chapter, we will use the PacMan game as an example, known as MsPacman-v0. Let's explore this game a bit further:
- Create the env object with the standard make function, as shown in the following command:
env=gym.make('MsPacman-v0')
- Let's print the action space of the game with the following code:
print(env.action_space)
The preceding code generates the following output:
Discrete(9)
Discrete 9 refers to the nine actions, such as up, down, left, and right.
- We can now see the observation space, as shown in the following example:
print(env.observation_space)
The preceding code generates the following output:
Box(210, 160, 3)
Thus, the observation space has three color channels and is of size 210 x 160. The observation space gets rendered as in the following screenshot:
- The number of episodes...