-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Allow arbitrary size of graphics display #75
Comments
@joschu what do you think? |
Seems reasonable, though I'm not sure if it's worth the extra complexity. |
I've been running some tests with resizing the SimpleImageViewer used by the atari environment and it looks like it would be reasonably straight forward. It would probably just be an additional function in atari env called set_display_dimensions(width, height) (in order to keep it seperate from the _render function) that would set the dimensions used by SimpleImageViewer to display but not alter the inputs. I'll put up a pull request if I can get something working pretty soon |
After looking at the implementation, I agree with John that we shouldn't support this right now. If there's lots of demand, we can support something, but otherwise we'll be maintaining something that's a bit complicated and isn't obviously universally needed. Thanks for raising this, however! If you end up writing some code to render the rgb_array yourself, please make sure to post it somewhere (this issue is fine, or alternatively a Gist writeup in gym). |
@gdb @joschu Edit: Nevermind, I think it should be relevant. There are two solutions as I see them, one of them part of the gym and one an outside edit. The latter would grab the rgb array, do some interpolation and use SimpleImageViewer to display the array. I'll pop a gist when I do some experiments with interpolating the games. Edit 2: So, i backed off from doing any heavy computation and decided to keep it simple by just repeating the x and y axes of the rgb matrix by a whole factor. The rendering is then large enough for demonstrative purposes. I've tested it on most of the environments (100 iters of random agent) and it works fine. I didn't test on MuJoCo ones since I didn't get the license. I couldn't test on the ones that just have text display (obviously). For some of the games there's a double rendering - something (the monitor?) renders the original sized rgb array before I render the upscaled one, and the two renders are seen in parallel. I've reproduced this with For my needs, this is enough, so I'll leave it like this for now. |
Some of the games (e.g., MsPacman, MontezumaRevenge) are rendered in very small windows which can't be changed - it would make sense to allow a size parameter when rendering to allow for the graphics to possibly be upscaled (even at the cost of pixelating) for presentation / demonstrative purposes.
The text was updated successfully, but these errors were encountered: