Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 946 Bytes

README.md

File metadata and controls

40 lines (28 loc) · 946 Bytes

Tetris genetic algorithm

Tetris genetic algorithm written in C++ inspired by this article, with some changes. This AI is able to clear 21.000+ lines.

Train de AI

If an agent better than the saved one gets generated during training, parameters are automatically updated.

git clone https://www.github.com/msmmb/genetic_tetris
cd genetic_tetris
make train
./train.o

Run the AI on terminal

Alt Text

git clone https://www.github.com/msmmb/genetic_tetris
cd genetic_tetris
make terminal
./terminal.o

Run the AI on a window

Alt Text

To run the AI on a window raylib needs to be installed.

You can take/lose control of the game by pressing the c key.

git clone https://www.github.com/msmmb/genetic_tetris
cd genetic_tetris
make window
./window.o