2048 and Expectiminimax search

Code, algorithms, languages, construction...
Post Reply
BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

2048 and Expectiminimax search

Post by BB+ » Tue Mar 18, 2014 9:04 pm

The Game "2048" has been getting some play lately. The first answer on the StackOverflow post below, mentions how alpha-beta pruning and static heuristics seem to form a quite viable AI.

http://stackoverflow.com/questions/2234 ... -game-2048
Since the game is a discrete state space, perfect information, turn-based game like chess and checkers, I used the same methods that have been proven to work on those games, namely minimax search with alpha-beta pruning. Since there is already a lot of info on that algorithm out there, I'll just talk about the two main heuristics that I use in the static evaluation function and which formalize many of the intuitions that other people have expressed here.
In fact, there is a serious random element in the game (indeed, if there were truly an "opponent" in placing new 2s and 4s it would be nigh impossible), but it seems that the expectiminimax variants work sufficiently well here.

Post Reply