Sorry folks, you will never beat Tetris. Even a bot specifically programmed to be amazing at Tetris will never beat the popular block-stacking game. Why? Because maths means you will inevitably muck things up.
It all because of the dimensions of the the tetromino blocks and the playing space, or 'well'. The blocks may fit together quite well, the combined space they take up is eight tiles wide. The playing space, however, is ten tiles wide, so according to the laws of probability there are eventually going to be spaces that you can't fill, which is even more likely if you get a run of those pesky S and Z shapes. In fact the game is rigged to make sure that this does happen from time to time.