In the official Q-Learning example, what does the env.unwrapped do exactly?

You can go through the code here:

As far as I know, there is a core super class called gym.Env and there are other sub classes of this to implement different environments (CartPoleEnv, MountainCarEnv etc). This unwrapped property is used to get the underlying gym.Env object from other environments.

2 Likes