Skip to content

An artificial intelligence agent that can beat the game 2048 by performing expectation over possible tile spawns.

License

Notifications You must be signed in to change notification settings

and1hof/Expectimax-2048-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expectimax-2048-AI

An AI agent which can routinely beat the game 2048 by expecting several tile spawns in the future and calculating optimal moves based on a number of heuristics.

PREREQUISITES

A JavaScript-enabled web browser is all that is needed to play this variation of 2048.

GETTING STARTED

Download the repo as a .zip, unzip it on your desktop and double-click the index.html.

USAGE

The AI agent itself is contained within the /js subdirectory in the file "agent.js".

WHATS IMPLEMENTED

  • Agent regularly achieves the 2048 tile, resulting in a winning game state
  • Agent is fast, moving as much as 15 times per second depending on hardware

TODO

  • Optimize the agent to reach the 4096 tile
  • Perform expectation several moves ahead, instead of expecting possible tile spawns at immediate next move

CONTRIBUTE

If you think you can improve this project, please feel free to make a branch followed by a pull request!

SOURCES

Original codebase borrowed from: http://gabrielecirulli.github.io/2048/

LEGAL

This software is provided free of any license, and you are entirely responsible for how you choose to use it.

SCREENSHOTS

2048

About

An artificial intelligence agent that can beat the game 2048 by performing expectation over possible tile spawns.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published