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

Migration to Gymnasium + bug fixes + QOL features #34

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

Conversation

Moonflower2022
Copy link

@Moonflower2022 Moonflower2022 commented Apr 2, 2024

Changes

Fixed bug (random.sample doesnt work on sets)
Migration to Gymnasium
Changed name from SnakeEnv to SnakeEnvCNN and SnakeEnvMLP
added win rewards for MLP
made win detection better in snake_game.py
added print variable to testing scripts to disable prints
Small QOL features:

  • Added option to disable sound but still render
  • updated default delays on testing scripts to make sure sound plays correctly
  • hamiltonian_agent.py checks if board_size is even
  • added support for different board sizes (for some reason the CNN observation shape has to be (84, 84, 3) and 4x4 doesn't work so it can only support board sizes that are factors of 84 greater than 4)
  • removed check for eating fruit and colliding at the same time because that cant happen
  • made tensor board logs specific to the model instead of just "PPO_{some number}"

Not sure how to get rid of the warnings that come up while training:

UserWarning: WARN: env.action_masks to get variables from other wrappers is deprecated and will be removed in v1.0, to get this variable you can do env.unwrapped.action_masks for environment variables or env.get_wrapper_attr('action_masks') that will search the reminding wrappers.

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