AI for the 2048 game. This uses expectimax optimization, along with a highly-efficient bitboard representation to search upwards of 10 million moves per second on recent hardware. Heuristics used include bonuses for empty squares and bonuses for placing large values near edges and corners.
Run make
. Any relatively recent C++ compiler should be able to build the output.
Run bin/2048
if you want to see the AI by itself in action.
Install Remote Control for Firefox.
Open up the 2048 game or any compatible clone and start remote control.
Run 2048.py
and watch the game!