I came across a very interesting site that goes into detail on how to program your computer to play Tetris. I’m always interested in artificial intelligence related matters so I found this particularly interesting:
“This article […] describes how to use a USB ‘web camera’, a personal computer,a relay board, and custom software, to form a system that is capable of playing the video game Tetris running on a separate personal computer. The novelty of this system is how closely it imitates a human player; the camera essentially looks at the game display, and the relay board essentially presses keys on a keyboard.” (emphasis mine)
He’s even got a 2.3mb video showing the computer playing Tetris.