Some ugly codes of TD-Learning and Expectimax Search for game 2048.
(Developed by K.H Yeh and I.C Wu from CGI-Lab @NCTU).
We use TD-Lambda and several features to train 2048 by self-playing.
Those features includes:
-
Number of large tiles
-
Number of pairs of merge-able tiles
-
Number of disintinct tiles
-
Number of empty tiles
-
Number of layered tiles (Twice larger or smaller than neighbors)
-
Axe-shape six-tuples
-
Rectangular six-tuples
The download link for the trained features weights for this program:
Performances: (1000 games)
The AI is on the website: http://2048.aigames.nctu.edu.tw/
To see the record of reaching 65536: http://2048.aigames.nctu.edu.tw/replay.php
Metrics | Values |
---|---|
Average | 446116 |
Max | 833300 |
2048 rate | 100% |
4096 rate | 99.8% |
8192 rate | 99.5% |
16384 rate | 93.6% |
32768 rate | 33.5% |
Speed | 500 moves/sec |
Search depth | 2.5 (5) |
The program's result along with other experiments are in the IEEE Journal Paper: http://ieeexplore.ieee.org/document/7518633/