/gym-breakout-pygame

Gym Breakout environment using Pygame

Primary LanguagePythonMIT LicenseMIT

gym-breakout-pygame

PyPI PyPI - Python Version PyPI - Status PyPI - Implementation PyPI - Wheel GitHub

test lint docs codecov

Gym Breakout environment using Pygame.

Install

Install with pip:

pip3 install gym_breakout_pygame

Or, install from source:

git clone https://github.com/whitemech/gym-breakout-pygame.git
cd gym-breakout-pygame
pip install .

Development

  • clone the repo:

      git clone https://github.com/whitemech/gym-breakout-pygame.git
      cd gym-breakout-pygame
    
  • Create/activate the virtual environment (using Poetry):

      poetry shell
      poetry install
    
  • Run a short demo:

      python gym_breakout_pygame --random --record
    

Check for an .mp4 file in videos/. You should get:

  • Enable fire:

      python gym_breakout_pygame --fire
    

Tests

To run tests: tox

To run only the code tests: tox -e py3.10

To run only the linters:

  • tox -e flake8
  • tox -e mypy
  • tox -e black-check
  • tox -e isort-check

Please look at the tox.ini file for the full list of supported commands.

Docs

To build the docs: mkdocs build

To view documentation in a browser: mkdocs serve and then go to http://localhost:8000

License

gym-breakout-pygame is released under the GNU General Public License v3.0 or later (GPLv3+).

Copyright 2019-2022 Marco Favorito, Luca Iocchi

Authors

The code is largely inspired by RLGames