A simple 2048 game written in V with some AI algorithms.
Clone this repository:
git clone https://github.com/wenxuanjun/2048
cd 2048
Install 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 -h
To just play without AI:
just run -g
Use -A
to select the AI algorithm:
just run -A dfs
There 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 expectimax
You can create production build to gain the performance optimized executable.
just build
And replace just run
with ./2048
of commands mentioned above.
./2048 -r mt19937 -A monte