Add support for MultiDiscrete/MultiBinary observation spaces
See original GitHub issuepreprocessing.py
andpolicy.py
need to be updated (cf Stable-Baselines for the preprocessing)- tests using envs from
identity_env.py
@rolandgvc is working that one
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
openai gym - what is an agent I can use with a multi-discrete ...
I have a custom environment with a multi-discrete action space. The action and observation spaces are as follows: Action: MultiDiscrete([ 3 121 ...
Read more >how to create an OpenAI Gym Observation space with multiple ...
python - how to create an OpenAI Gym Observation space with multiple features - Stack Overflow. Stack Overflow for Teams – Start collaborating ......
Read more >RL Algorithms — Stable Baselines3 1.7.0a5 documentation
This table displays the rl algorithms that are implemented in the Stable Baselines3 project, along with some useful characteristics: support for discrete/ ...
Read more >Spaces - Gym Documentation
Superclass that is used to define observation and action spaces. ... mask – An optional mask for multi-discrete, expects tuples with a np.ndarray...
Read more >Create custom gym environments from scratch — A stock ...
__init__() # Define action and observation space # They must be gym.spaces objects # Example when using discrete actions: self.action_space = spaces.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So, yes and no. Yes, because what you describe is equivalent to
MultiDiscrete
space. No, because supportingMultiDiscrete
separately is cleaner and would be anyway a building block, as done in theflatdim()
method:https://github.com/openai/gym/blob/b2727d6fd396f7fe2b19a541ef3a6ea47559cdb3/gym/spaces/utils.py#L24
Also,
MultiDiscrete
is a very special case when all the sub-spaces are of the same type. Usually, in that case, you don’t needDict
orTuple
spaces (e.g. multiplesBox
spaces can be re-combined into one).so, this method is only used in the buffer, good catch, this should return a tuple 😕 (so
1,
instead of1
normally) I have to check again, otherwise, we will need to change slightly the type hint.