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

Update the CarRacing main method to the new rendering API. #3085

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

foxik
Copy link
Contributor

@foxik foxik commented Sep 12, 2022

Update the CarRacing main method to the new rendering API.

  • The manual env.render() calls are removed; instead, render_mode="human" is passed to environment construction.
  • The pygame.QUIT event is handled, instead of relying on env.render() to return the isopen flag.
  • Additionally, the pygame.K_ESCAPE also stops the running application (using the same code path as the pygame.QUIT).

Fixed #3082.

Description

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Additionally, the running application can be stopped not just by
closing the window, but also by pressing the Escape key.

Fixed openai#3082.
@pseudo-rnd-thoughts
Copy link
Contributor

pseudo-rnd-thoughts commented Sep 13, 2022

Thanks for the PR, looks good to merge
I think in the future, we will want to remove these functions, but thanks for the bug fix

@jkterry1 jkterry1 merged commit af14749 into openai:master Sep 13, 2022
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.

[Bug Report] CarRacing module crashes when executed directly and no longer stops after closing the window
3 participants