Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for observations as RGB array #6

Closed
planetceres opened this issue Apr 14, 2018 · 4 comments
Closed

Option for observations as RGB array #6

planetceres opened this issue Apr 14, 2018 · 4 comments

Comments

@planetceres
Copy link

It would allow for a greater range of use cases if there was an option that could be passed to train using RGB arrays instead of only the image encodings. The readme describes a way to do this with get_obs_render, but it would be nice if it could be included as an argument.

Would you consider adding something like this?

planetceres@9c2ae3c

@maximecb
Copy link
Contributor

I think that the cleanest way to do this would be to create a separate wrapper that just produces an RGB image, and maybe also drops the text string if you don't need it. I would create a separate wrapper rather than setting some boolean variable on the environment. If you create that, I would merge it.

@planetceres
Copy link
Author

Optionally dropping the text string for baseline comparisons was another priority for me, so I'm glad you mentioned that. I had started with the wrapper approach and agree it makes more sense, but I was trying to avoid creating multiple wrappers for each variant of image type along with optional text. This may not be a concern though if the observation wrappers are more meant as a temporary solution to deal with dict observations.

@planetceres
Copy link
Author

This makes sense to me based on the current wrapper syntax, although could use some refactoring later at some point:

planetceres@b16c3f6

@maximecb
Copy link
Contributor

I don't think the wrappers are just a temporary solution. I think different people will want different inputs for their use cases. I think it's just cleaner to separate the environment from wrappers that format the output however you want it.

I would just create an RGBImageWrapper, which doesn't flatten the image and doesn't include the text (no boolean argument).

d3sm0 added a commit to d3sm0/gym-minigrid that referenced this issue Oct 13, 2018
…Farama-Foundation#22)

* Add Classical-v0 4 rooms env #

* Add image wrapper

* Add full state wrapper
maximecb pushed a commit that referenced this issue Oct 15, 2018
* Classical env and wrappers (#6, #13, #22)

* Add Classical-v0 4 rooms env #

* Add image wrapper

* Add full state wrapper

* Updated according to #24

* Changed name to FourRooms

* Fix obs space in ObsWrapper

* Add test for FullObsWrapper

* revert

* Updated according to #24

* Changed name to FourRooms

* Fix obs space in ObsWrapper

* Add test for FullObsWrapper

* Removed doors

* Removed test env #24

* Revert minigrid
maximecb pushed a commit that referenced this issue Oct 23, 2018
* Classical env and wrappers (#6, #13, #22)

* Add Classical-v0 4 rooms env #

* Add image wrapper

* Add full state wrapper

* Updated according to #24

* Changed name to FourRooms

* Fix obs space in ObsWrapper

* Add test for FullObsWrapper

* revert

* Updated according to #24

* Changed name to FourRooms

* Fix obs space in ObsWrapper

* Add test for FullObsWrapper

* Removed doors

* Removed test env #24

* Revert minigrid

* Efficient full obs wrapper

* Update wrappers.py

* Fix as in #27

* Accepted changes in #27

* Merged
jysdoran pushed a commit to jysdoran/Minigrid that referenced this issue Jun 28, 2023
jysdoran pushed a commit to jysdoran/Minigrid that referenced this issue Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants