Skip to content

fmaroli/fpTetris-rl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tetris-reinforcement learning

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.

Project Structure

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.

Interactive Controls for the algorithm version:

  • Space Bar: Drop the tetromino
  • R: Restart
  • Q: Quit
  • Y: Change to manual play (A, S to move; K, L to rotate)

image

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages