Update README.md
Browse files
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 |
-
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
25,153,774
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
-
|
| 23 |
|
|
|
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
| 32 |
-
The 1570 games takes more than 1 week, with 2 m1 mackbook air, and 1 intel i5 macbook air.
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
-
|
| 37 |
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
|
|
|
| 40 |
|
| 41 |
-
##
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
```
|
| 46 |
-
0,
|
| 47 |
-
0,
|
| 48 |
-
0,
|
| 49 |
-
0,
|
| 50 |
-
|
| 51 |
|
| 52 |
...
|
| 53 |
|
| 54 |
-
16,
|
| 55 |
-
4,
|
| 56 |
-
0,
|
| 57 |
-
2,
|
| 58 |
-
|
|
|
|
| 59 |
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
128, 512, 2048, 8192
|
| 65 |
-
256, 1024, 4096, 16384
|
| 66 |
-
14943, 387388, _, _
|
| 67 |
```
|
| 68 |
|
| 69 |
-
|
|
|
|
|
|
|
| 70 |
|
| 71 |
-
|
| 72 |
|
| 73 |
-
|
|
|
|
|
|
|
| 74 |
|
| 75 |
-
##
|
| 76 |
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
| 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 |
-
|
| 87 |
-
```
|
| 88 |
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
```
|