This is the code for the “How to Make an Evolutionary Tetris Bot” by Siraj Raval on Youtube
They all come prepackaged.
Just open the .html file in your web browser and the AI will start playing Tetris.
The credits for this code go to idressinc. I’ve merelyc created a wrapper to get people started.