observations()

This is the method we would use after the call to reset(...) or step(action) to receive the observations from DM Lab environments. This method returns a Python dictionary object with every type of observation that we specified from the list of available types for the environment. For example, if we wanted RGBD (Red-Green-Blue-Depth) information about the environment as the observation type, we can specify that when we initialize the environment using the 'RGBD' key, we can then retrieve this information from the returned observation dictionary using the same 'RGBD' key. A simple example to illustrate this is shown here:

env = deepmind_lab.Lab('tests/empty_room_test', ['RGBD'])env.reset()obs = env.observations()['RGBD']

There ...

Get Hands-On Intelligent Agents with OpenAI Gym now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.