This repository contains two agents. The first agent-algorithm
, has a pre-programmed behaviour. The second agent-rl
, uses DQN Reinforcement Learning to learn how to play.
- To execute the first agent, run the file
tetris.py
. Space Bar to drop the tetromino, R to restart, Q to Quit, Y to change to manual play(A,S Move)(K,L Rotate). - To execute the second agent, run the file
test.py
, this will load an agent from the folder models. I have pre-selected the best-performing agent, which cleared more than 100k lines.
Pre-programmed Agent: Uses predefined rules to play Tetris.
Reinforcement Learning Agent: Learned to play Tetris using DQN, capable of clearing over 100,000 lines.
- Space Bar: Drop the tetromino
- R: Restart
- Q: Quit
- Y: Change to manual play (A, S to move; K, L to rotate)