yuanoook commited on
Commit
8a4282c
ยท
verified ยท
1 Parent(s): 92caa39

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +77 -54
README.md CHANGED
@@ -1,89 +1,112 @@
1
- ---
2
- license: mit
3
- task_categories:
4
- - zero-shot-classification
5
- language:
6
- - en
7
- pretty_name: Game 2048 Board-Move Pairs
8
- size_categories:
9
- - 100M<n<1B
10
- ---
11
-
12
  # Game 2048 Dataset
13
 
14
- Total board-move pairs:
 
 
15
 
16
- 25,153,774 (excluding 1570 game over boards without any moves)
 
 
 
17
 
18
- Total games:
19
 
20
- 1,570
21
 
22
- Github Repo [https://github.com/yuanoook/2048AI](https://github.com/yuanoook/2048AI)
23
 
 
24
 
25
- ## Games 1570
26
 
27
- Why I created this dataset?
 
 
28
 
29
- I want to build neural network to play game 2048, for me to learn basic AI. Found out that it takes forever to get the data I wanted.
30
 
31
- It takes 7 mins to 1 hour to generate/play 1 game, with mac m1 chip by the algo provided by nneonneo/2048-ai .
32
- The 1570 games takes more than 1 week, with 2 m1 mackbook air, and 1 intel i5 macbook air.
33
 
34
- ## Highest record - 3,766,860
 
 
 
 
35
 
36
- the /records folder contains the highest score (3,766,860) I've ever seen on the internet.
37
 
38
- Played by using UNDO when stuck and switching different strategies, and with mannual move.
 
 
 
 
39
 
 
40
 
41
- ## Data Structure
42
 
43
- ### Games 1570 Data Structure
44
 
45
  ```
46
- 0, 0, 0, 0
47
- 0, 0, 0, 0
48
- 0, 2, 0, 0
49
- 0, 0, 4, 0
50
- 1, 0, up, โ†‘
51
 
52
  ...
53
 
54
- 16, 64, 2048, 8192
55
- 4, 16, 512, 4096
56
- 0, 0, 4, 16
57
- 2, 2, 4, 2
58
- 6805, 165680, right, โ†’
 
59
 
60
- ...
 
 
 
 
 
 
 
 
61
 
62
- 2, 4, 2, 4
63
- 8, 64, 16, 2
64
- 128, 512, 2048, 8192
65
- 256, 1024, 4096, 16384
66
- 14943, 387388, _, _
67
  ```
68
 
69
- For each game, every 4 rows to show the board, following 1 row to show the ```index, score, move, arrow```.
 
 
70
 
71
- The last row is the end of the game, no move and no arrow, _ as placeholder.
72
 
73
- I found it's the most understandable way for humans, probably not the most efficient for machine, which I don't care.
 
 
74
 
75
- ### High Record Games Data Structure
76
 
77
- ```
78
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, up, 0
 
 
79
 
80
- ...
81
 
82
- 25508, 32, 32, 4, 2, 512, 256, 2, 0, 16384, 2048, 0, 0, 32768, 4096, 0, 2, up, 733188
83
 
84
- ...
85
 
86
- 114499, 8, 2, 2, 2, 512, 256, 32, 4, 32768, 16384, 1024, 4, 131072, 65536, 4096, 16, down, 3766860
87
- ```
88
 
89
- High Record Games data is splited into files by 100 board-move pairs in each. Every row is ```index, board, move, score```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Game 2048 Dataset
2
 
3
+ A high-quality dataset of board-move pairs collected from 1570 full games of the popular puzzle game **2048**, created for training and evaluating AI models. The data includes over 25 million board-move pairs, carefully generated using AI agents and augmented with manual intervention and strategy switching to reach high scores.
4
+
5
+ ## ๐Ÿ“ˆ Dataset Statistics
6
 
7
+ * **Total Board-Move Pairs**: 25,153,774
8
+ *(Excludes 1570 terminal boards without available moves)*
9
+ * **Total Games**: 1,570
10
+ * **Record Score**: **3,766,860** โ€” the highest known score, achieved through strategy switching and selective manual play.
11
 
12
+ ## ๐Ÿ“ Project Repository
13
 
14
+ **GitHub**: [yuanoook/2048AI](https://github.com/yuanoook/2048AI)
15
 
16
+ ## ๐Ÿง  Motivation
17
 
18
+ This dataset was created as part of a personal project to explore the use of neural networks in learning to play 2048. During development, it became clear that generating high-quality training data was the main bottleneck. Even with an optimized AI (based on [nneonneo/2048-ai](https://github.com/nneonneo/2048-ai)), generating one game can take 7 minutes to 1 hour on an Apple M1 chip.
19
 
20
+ To build this dataset:
21
 
22
+ * 2ร— MacBook Air (M1)
23
+ * 1ร— MacBook Air (Intel i5)
24
+ * Over **1 week of continuous data collection**
25
 
26
+ ## ๐Ÿ“Š Game Statistics (Across 1570 Games)
27
 
28
+ **Moves (Steps):**
 
29
 
30
+ * Min: 1,587
31
+ * Max: 29,774
32
+ * Mean: 16,022.51
33
+ * Median: 14,875
34
+ * Std Dev: 5,529.86
35
 
36
+ **Scores:**
37
 
38
+ * Min: 31,260
39
+ * Max: 839,912
40
+ * Mean: 432,174.94
41
+ * Median: 387,152
42
+ * Std Dev: 169,184.62
43
 
44
+ ## ๐Ÿงพ Data Format
45
 
46
+ ### Standard Games (1570 Files)
47
 
48
+ Each file represents a complete game. The format is designed for readability:
49
 
50
  ```
51
+ 0, 0, 0, 0
52
+ 0, 0, 0, 0
53
+ 0, 2, 0, 0
54
+ 0, 0, 4, 0
55
+ 1, 0, up, โ†‘
56
 
57
  ...
58
 
59
+ 16, 64, 2048, 8192
60
+ 4, 16, 512, 4096
61
+ 0, 0, 4, 16
62
+ 2, 2, 4, 2
63
+ 6805, 165680, right, โ†’
64
+ ```
65
 
66
+ * **Every 4 lines**: One 4ร—4 game board
67
+ * **Followed by 1 line**: `step_index, cumulative_score, move_name, arrow_symbol`
68
+ * **Last row** (when game is over): Uses `_` as placeholder for move and arrow.
69
+
70
+ This format favors human readability over storage or computational efficiency.
71
+
72
+ ### High Score Records (`/records` folder)
73
+
74
+ Files split into chunks of 100 board-move pairs per file. Each line contains a flattened board and metadata:
75
 
76
+ ```
77
+ 25508, 32, 32, 4, 2, 512, 256, 2, 0, 16384, 2048, 0, 0, 32768, 4096, 0, 2, up, 733188
 
 
 
78
  ```
79
 
80
+ * `step_index, 16 board tiles (row-major), move, score`
81
+ * Final record:
82
+ `114499, ..., down, 3766860`
83
 
84
+ These high-score games were played with enhanced strategies, including:
85
 
86
+ * Using the UNDO function when stuck
87
+ * Dynamically switching AI heuristics
88
+ * Occasional manual interventions
89
 
90
+ ## ๐Ÿ“ฆ Use Cases
91
 
92
+ * Supervised learning: Train models to predict the best move given a board state.
93
+ * Reinforcement learning: Use as an offline dataset for imitation learning.
94
+ * Benchmarking: Evaluate AI agents against real, high-scoring human-guided trajectories.
95
+ * Data compression and representation research: Efficiently encode board states.
96
 
97
+ ---
98
 
 
99
 
 
100
 
101
+ ---
 
102
 
103
+ ```yaml
104
+ license: mit
105
+ task_categories:
106
+ - zero-shot-classification
107
+ language:
108
+ - en
109
+ pretty_name: Game 2048 Board-Move Pairs
110
+ size_categories:
111
+ - 100M<n<1B
112
+ ```