Types & Supertypes

Types and Supertypes can be used to extend Agents and Environments in experiments.

See the Supertypes page for more detailed information.

class phantom.supertype.Supertype[source]
to_obs_space(low=-inf, high=inf)[source]

Converts the parameters of the Supertype into a gym.Space representing the space.

All elements of the space span the same range given by the low and high arguments.

Parameters:
  • low – Optional ‘low’ bound for the space (default is -∞)

  • high – Optional ‘high’ bound for the space (default is ∞)

Return type:

Space

to_obs_space_compatible_type()[source]

Converts the parameters of the Supertype into a dict for use in observation spaces.

Return type:

Dict[str, Union[dict, list, ndarray, tuple]]