action_spec()

Similar to the observation_spec() the action_spec() method returns a list containing the min, max, and a name for each of the elements in the space. The min and max values respectively represent the minimum and maximum value that the corresponding element in the action space can be set to. The length of this list will equal the dimension/shape of the action space. This is analogous to env.action_space, which we have been using with the Gym environments.

The following code snippet gives us a quick look into what the return values from a call to this method will look like:

import deepmind_labimport pprintenv = deepmind_lab.Lab('tests/empty_room_test', [])
action_spec = env.action_spec()
pprint.pprint(action_spec)
# Outputs:

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.