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

Added support for rendering with pygame #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

elliottower
Copy link

@elliottower elliottower commented Feb 14, 2023

In this commit I added working code to render the environment using pygame. render_mode="human" now defaults to pygame, whereas render_mode="pyplot" uses pyplot as previously used.

User interaction will require an overhaul of the environment.step() function to not do two moves at a time (AI and bot moves), so I decided not to do that yet. The best way to do this would be to wrap the gymnasium environment with PettingZoo and have that handle the turns (or rewrite it as a PettingZoo environment) but I don't have time for that now.

I made this on top of the previous changes like gymnasium and working requirements.txt, but if you don't want to do the gymnasium changes that should be easy to alter and revert them.

elliottower and others added 6 commits February 11, 2023 14:17
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.

1 participant