Reinforcement Learning applied to Tetris
An agent that learns to play Tetris — a genuinely fun excuse to get hands-on with reward shaping.
- Type
- School
- Year
- 2020
- Built with
- Python · Reinforcement learning
A school project with a classmate, and one of the more purely enjoyable things I have built.
Tetris is a good teaching problem for reinforcement learning because the reward is so easy to get wrong. Score per line cleared sounds obvious, and produces an agent that stacks recklessly and dies. The learning is in the shaping: how much to punish height, how much to punish holes, and how much to leave alone so the agent can discover something you did not think of.