Where can I found the document about gym spaces?

  • Document

When I read the sample, there is a import of “spaces”:

from gym import spaces

where can I find the documentation about “spaces”?

  • NameSpace

in class VecEnvBase, method
action_space: gym.spaces.space.Space[gym.core.ActType]

The spaces. space. Space respectively refer to which one?

Hi @liuyuanyuan.sh

Thank you Toni. ^_^


The spaces module from gym provides a set of predefined spaces that can be used to describe possible observation and action outputs from environments. The documentation for spaces can be found on the official Gym documentation: Spaces - Gym Documentation. It offers detailed explanations about different types of spaces like Box, Discrete, and others. For your VecEnvBase class, gym.spaces.space.Space might refer to the abstract base class for all spaces, which provides a generic interface. Always good to cross-reference with the Gym docs to ensure correct implementation!



Ahmad, Thank you for your detail explanation. (>‿◠)
I will program and try to see what the returned result is.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.