david-parkk / Tetris_DQN_PyTorch

DQN to play tetris game [PyTorch]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[PyTorch] Tetris with DQN(Deep Q-Network)


Results

Epoch 84 1185 2042 3651
total number of rows removed 1 13 42 312
final score 26 201 781 7515
image image image image


Details

✔ Definition of State, Reward, Action in Tetris

image

✔ DQN algorithm (Q-function)


How to run codes

Requirements

imageio==2.13.5
importlib-metadata==4.8.2
matplotlib==3.5.0
numpy==1.18.1
opencv-python==4.5.4.60
Pillow==8.4.0
tensorboard==1.15.0
tensorboardX==2.4.1
tensorflow==1.15.5
torch==1.10.0
torchvision==0.11.1
tqdm==4.62.3

Installing Packages

$ pip install -r requirements.txt

Train & Save model

$ python3 train.py

Test & Save the results in gif format

$ python3 test.py


About

DQN to play tetris game [PyTorch]


Languages

Language:Python 100.0%