What is the optimal algorithm for the game 2048??

I have recently stumbled upon the game 2048. You merge similar tiles by moving them in any of the four directions to...