Skip to content

rjohanek/2048_addAgent

Repository files navigation

Solving 2048 with Value Iteration and Markov Decision Process

Our project is an extension of another repo (https://github.com/voldikss/EE369-2048-AI)

Below is a list of methods/classes that we either created or modified/added to:

Created:

Modified/added to:

This is the original repo's README:

For SJTU EE369 final project.

Use supervised learning (imitation learning) and tree searching approaches to solve the game of 2048.

Code structure

To run the evaluation of the agents

  • To evaluate the supervised learning model, run
# Will play the game for 50 times and return the average score
python evaluate.py --agent=cnnagent

P.S. Currently the max score is 1024, the average score is 541.44.

  • To evaluate the tree searching method, run
python evaluate.py --agent=pagent

P.S. With the depth set to 3, the planning method can reach the score 2048.

To run the web app

python webapp.py 

You can also specify an agent by adding --agent. cnnagent, pagent, emagent are usable, RandomAgent by default.

For example, run the web app with the planning agent

python webapp.py --agent=pagen

To compile the pre-defined ExpectiMax agent

cd game2048/expectimax
bash configure
make

demo

LICENSE

The code is under Apache-2.0 License. pp.

About

Add a markov model agent to voldikss existing repo: https://github.com/voldikss/EE369-2048-AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •