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

Refactor classic control rendering to use pygame #2599

Merged
merged 4 commits into from
Feb 11, 2022

Conversation

andrewtanJS
Copy link
Contributor

This PR refactors the rendering function of the two environments to use pygame instead of pyglet. The refactored rendering is consistent with the previous pyglet rendering.

Here is a side by side comparison of the two environments. Left is the old pyglet version, and right is the new pygame version.
Acrobot:
image

Cartpole:
image

MountainCar:
image

MountainCarContinuous:
image

Pendulum:
image

One point to note is that the output array of the render method where mode == rgb_array now has the same dimensions as the specified dimensions of the pygame display. Prior, the corresponding output array had a shape with dimensions double that of the dimensions of the pyglet viewer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants