In this chapter, we will use the PacMan game as an example, known as MsPacman-v0. Let's explore this game a bit further:
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)
- 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 is the number of game plays. We shall set it to one, for now, indicating that we just want to play the game once. Since every episode is stochastic, in actual production...