Tetris ML
This program, written in Python with pygame for the visuals, trains a bot to play Tetris. The tetris clone includes all the mechanics of the original game besides storing blocks. The highest score it has achieved during the training passed 700 lines cleared.
How it works
The bot works by calculating the results of its actions weighed by the variables on the right. The bot learns by randomly adjusting the weights from a parent bot. The most successful child bot will then compete against the parent to determine who will become the next parent bot.
Variable
Explaination
covered
Avoids covering unfilled tiles with another block.
height
Minimizes the height of the blocks placed.
twospace
Tries to leave space for 2-wide blocks to fit in.
edgespace
Attempts to fill in the sides to avoid reliance on lines.