Skip to content

wenxuanjun/2048

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2048

A simple 2048 game written in V with some AI algorithms.

Prepare

Clone this repository:

git clone https://github.com/wenxuanjun/2048
cd 2048

Install V and just, then use just -l to list available recipes.

Run

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

Build

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

About

Some AI that that play 2048!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •