Description
Proposal
Gymnasium/gymnasium/vector/sync_vector_env.py
Lines 251 to 266 in 8333df8
Gymnasium/gymnasium/vector/async_vector_env.py
Lines 576 to 596 in 8333df8
Currently, these methods checks if all the observation and action spaces in a vector environment are identical, and raises an error if they are not. I'm assuming this is the case because we want to ensure that we can stack the observations and actions into one numpy array. I'm proposing a change to allow differences in the observation and action spaces as long as the shapes are consistent (e.g. the values in the low
and high
portions of a Box space).
The change can be implemented with an optional parameter to enable/disable it when creating the vector environments to preserve current default behaviours for now.
Motivation
I want to vectorize environments with different action space boundaries but the current implementation of vector environments does not allow for that.
Pitch
No response
Alternatives
No response
Additional context
No response
Checklist
- I have checked that there is no similar issue in the repo