Name   AI-2048
Year   2017
Tech   C / JS / Emscripten
Project homepageSource code

A modification of Gariele Cirulli's 2048 to include an AI. The AI can be used both for playing the game (AI player), and to determine the worst position for new tiles to appear at (AI opponent).

The AI uses an expectiminimax algorithm and a custom scoring function that favors empty tiles, and rows that have an orderly arrangement.

The code powering the AI was written in C and subsequently transpiled to asm.js using Emscripten. This provides a boost to performance on modern browsers that optimizes for asm.js.

Back to My workNext: Web-reader