An ai implementation for the game 2048