An Artificial Intelligence Algorithm for the game TETRIS