The computer "learns" to play tetris! The program has caused quite the stir on YouTube, with almost 50 000 video views :)
The AI works as follows: first, a Breadth-first search finds all positions and orientations that the current block can be dropped in.
Then, A linear score function is computed for every position/rotation and the argmax move is selected. The features used in the weighted sum are hand-designed: For example, one feature returns a number from 0 to 1 based on how high the position that is being evaluated is. Another feature may evaluate how well the block fits into its surroundings, etc. The weights that are given to every feature are evolved using a genetic algorithm.
The AI can also look ahead to the next piece, by computing the best score for it, given a hypothetical placement for the current block.
The AI can usually last on the order of 10-20 minutes before it dies. The longest I've seen it go was about 2 hours. Unfortunately, it is known that Tetris cannot be "solved", because there exists at least one known sequence of blocks that forces a loss.