A simple 2048 game written in V with some AI algorithms.
Clone this repository:
git clone https://github.com/wenxuanjun/2048
cd 2048Install V and just, then use just -l to list available recipes.
Add -h to those recipes that have optional flags to see full options of the game.
just run -hTo just play without AI:
just run -gUse -A to select the AI algorithm:
just run -A dfsThere are various kinds of AI you can choose:
- dfs
- heuristic
- minmax
- expectimax
- monte
- reinforcement
The default algorithm is dfs.
You can also use -a to enable AI with GUI:
just run -g -a -A expectimaxYou can create production build to gain the performance optimized executable.
just buildAnd replace just run with ./2048 of commands mentioned above.
./2048 -r mt19937 -A monte