Skip to content

ViktorHavrysh/ai2048

Repository files navigation

ai2048

This repository contains a modified 2048 game

Unlike the original, this version adds an AI written in Rust and compiled into WASM.

The repository also contains a commandline runner for the AI, mostly for debugging and benchmarking purposes.

Building

You'll need Rust in order to build the AI. Get it here.

To compile it to WASM, you'll need wasm-pack. Installation instructions here.

Finally, to build the website, you'll need NPM.

After all the prerequisites are installed:

chmod +x build.sh && ./build.sh

Acknowledgements

The original is written by Gabriele Cirulli. You can find it here.

The AI uses techniques and heuristics inspired by this AI implementation:

https://github.com/nneonneo/2048-ai

This is a very good AI written in C++.