/ReinforcementTetris

This is my dissertation project i did in 2021. It involves various Deep Reinforcement Learning Agents using different techniques to experiment which one performs better and why. Also experimented with the Reward Function which appeared to have the biggest role in the best performing agent.

Primary LanguageJupyter Notebook

Learning to play Tetris with Deep Reinforcement Learning

The main environment use was tetrisActions.py

The main folder used was Variation B agents.

Variation A and C make use of the tetris.py file and tetrisb.py which correspond to the full and small board respectively.

To replicate any of the results, make a new folder with the files:

  • tetrisActions.py
  • plotting.py
  • all of the .py files of the agent of your choice or all of the agents in the same folder.
  • the notebook file.

Training ,evaluation plots and video generation are all in the notebook file.

The notebook file creates the repository and selects any of the agents based on the parameters you want to use.

For example by running the main.py in the folder "demo run" can replicate the training of the best performing agent.

Notes:

  • Variation Names and what is exactly used in each case, is hopefully explained thoroughly in the Dissertation Document 😄
  • To see some videos of how the agents played the game, click the link in the appendix of the dissertation document.
  • No pre-Trained agents models are included in this repository.