Instructions to Run
- Install git for your operating system from https://git-scm.com/downloads
- 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.
- 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
- Install Python 3 from https://www.python.org/downloads/ for the development of this program Python 3.9.7 was used.
- 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/
- 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
- Run the RunTetrisGames.py to spool up multiple games either in editor or by double clicking on the RunTetrisGames.py script
- (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