Skip to content
Bot for 2048 web game
JavaScript
Branch: master
Clone or download
Zong Zheng Li
Zong Zheng Li Fix bracket spacing
Latest commit 149a0b6 Aug 4, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes 🎪 Added .gitattributes & .gitignore files Aug 17, 2015
.gitignore 🎪 Added .gitattributes & .gitignore files Aug 17, 2015
LICENSE.md Add LICENSE.md Aug 21, 2015
README.md Update README again Aug 4, 2017
bot.js Fix bracket spacing Aug 4, 2017

README.md

2048-Bot

This is a bot for the game 2048. To run it, paste the raw code from bot.js into the developer console of the game page. Note that it's only been tested to work with the official game linked above.

It's quite fast and can reach the 4096 tile consistently. Here is a gameplay video. The bot chooses moves using shallow depth-first search and simple position evaluation. It speeds up the search using a one-sided modification of alpha-beta pruning as well as a transposition table for caching search results. It interfaces with the game by looking at the DOM and dispatching key presses.

You can’t perform that action at this time.