Skip to content

DCSHGAI/HGAITetris

Repository files navigation

HGAITetris

Instructions to Run

  1. Install git for your operating system from https://git-scm.com/downloads
  2. Once git is installed a program called git bash will be available to use or you can use the terminal of your OS to complete the following step.
  3. Clone this Tetris repository using the command: git clone https://github.com/DCSHGAI/HGAITetris this can be copy and pasted into the terminal or typed. If you don't wish to use git you can always download the zipped files from https://github.com/DCSHGAI/HGAITetris
  4. Install Python 3 from https://www.python.org/downloads/ for the development of this program Python 3.9.7 was used.
  5. The PyGame package is required to run the code a guide to install packages can be found here https://packaging.python.org/en/latest/tutorials/installing-packages/
  6. Tensorflow is required to run the TAMER implementation of the A.I it can be installed via the command pip install tensorflow or through https://www.tensorflow.org/install
  7. Run the RunTetrisGames.py to spool up multiple games either in editor or by double clicking on the RunTetrisGames.py script
  8. (OR) Run Tetris.py to run a single instance of the game either in editor or by double clicking on it

Key Controls Up Arrow = Rotate Piece Down Arrow = Move Piece Down Left Arrow = Move Left Right Arrow = Move Right Escape = Restart Game K = Encourage A.I J = Discourage A.I A = Load A.I data S = Save A.I data W = Save Weights B = Tamer Batch Backwards Q = Toggle Run Speed Fast/Slow R = Toggle Randomization T = Toggle QPlan G = Write Game Stats to file 0-9 = Switch to numbered window

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages