uvipen / Tetris-deep-Q-learning-pytorch

Deep Q-learning for playing tetris game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[PYTORCH] Deep Q-learning for playing Tetris

Introduction

Here is my python source code for training an agent to play Tetris. It could be seen as a very basic example of Reinforcement Learning's application.


Tetris demo

The demo could also be found at youtube demo

How to use my code

With my code, you can:

  • Train your model from scratch by running python train.py
  • Test your trained model by running python test.py

Trained models

You could find my trained model at trained_models/tetris

Requirements

  • python 3.6
  • PIL
  • cv2
  • pytorch
  • numpy
  • matplotlib

About

Deep Q-learning for playing tetris game

License:MIT License


Languages

Language:Python 100.0%