Skip to content

[Proposal] Make the Tuple space a generic class #1476

Description

@AlexPasqua

Proposal

Allow developers to specify the "sub-types" when dealing with a Tuple space.
E.g., observation_space: spaces.Tuple[spaces.MultiDiscrete, spaces.Box]

Motivation

It's more clear and many libraries, e.g., stable-baselines3, are implementing strict type checking. Observation and action spaces are not that flexible, as environments normally expect something specific, so it's a bit weird that you're only allowed to specify "Tuple" without explicitly mentioning what's inside this Tuple.

Pitch

I'd like spaces.Tuple to be specifiable in type hints like typing.Tuple is.

Alternatives

No response

Additional context

No response

Checklist

  • I have checked that there is no similar issue in the repo

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions