Update README.md
Browse files
README.md
CHANGED
|
@@ -1,102 +1,100 @@
|
|
| 1 |
-
# Game 2048 Dataset
|
| 2 |
|
| 3 |
-
A high-quality dataset of board-move pairs collected from
|
| 4 |
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
| 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 with UNDO.
|
| 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 |
-
|
| 23 |
-
* 1Γ MacBook Air (Intel i5)
|
| 24 |
-
* Over **1 week of continuous data collection**
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
*
|
| 29 |
|
| 30 |
-
|
| 31 |
-
* Max: 29,774
|
| 32 |
-
* Mean: 16,022.51
|
| 33 |
-
* Median: 14,875
|
| 34 |
-
* Std Dev: 5,529.86
|
| 35 |
|
| 36 |
-
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
##
|
| 47 |
|
| 48 |
-
Each
|
| 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 |
-
|
| 60 |
-
|
| 61 |
-
0, 0, 4, 16
|
| 62 |
-
2, 2, 4, 2
|
| 63 |
-
6805, 165680, right, β
|
| 64 |
```
|
| 65 |
|
| 66 |
-
*
|
| 67 |
-
*
|
| 68 |
-
*
|
|
|
|
| 69 |
|
| 70 |
-
|
| 71 |
|
| 72 |
-
##
|
| 73 |
|
| 74 |
-
|
| 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 |
-
*
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
| 82 |
`114499, ..., down, 3766860`
|
| 83 |
|
| 84 |
-
These
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
-
|
| 87 |
-
* Dynamically switching AI heuristics
|
| 88 |
-
* Occasional manual interventions
|
| 89 |
|
| 90 |
-
##
|
| 91 |
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
---
|
| 98 |
|
|
|
|
| 99 |
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
---
|
| 102 |
|
|
|
|
| 1 |
+
# π§ Game 2048 Board-Move Pairs Dataset
|
| 2 |
|
| 3 |
+
A high-quality dataset of **25M+ board-move pairs** collected from **1,570 full games** of the classic puzzle game [**2048**](https://en.wikipedia.org/wiki/2048_%28video_game%29). This dataset was designed for training and evaluating AI agents, particularly in supervised or imitation learning scenarios.
|
| 4 |
|
| 5 |
+
The board states were generated using **search-based AI agents** (not neural networks), leveraging heuristics and expectimax-style algorithms. To reach top scores, the collection process also involved **manual strategy switching** and **UNDO-based corrections**.
|
| 6 |
|
| 7 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
+
## π Dataset Overview
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
| Item | Value |
|
| 12 |
+
| ---------------------- | -------------------------------------------- |
|
| 13 |
+
| Total Games | 1,570 |
|
| 14 |
+
| Total Board-Move Pairs | 25,153,774 |
|
| 15 |
+
| Highest Score Recorded | 3,766,860 |
|
| 16 |
+
| Avg Moves per Game | \~16,022 |
|
| 17 |
+
| Collection Time | \~1 Week |
|
| 18 |
+
| Devices Used | 2Γ M1 MacBook Air<br>1Γ Intel i5 MacBook Air |
|
| 19 |
|
| 20 |
+
> β οΈ *The final board in each game contains no move β only a board snapshot with `_` as placeholder.*
|
| 21 |
|
| 22 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
+
## π Game Statistics (1570 Files)
|
| 25 |
|
| 26 |
+
| Metric | Steps (Moves) | Score |
|
| 27 |
+
| ------ | ------------- | ---------- |
|
| 28 |
+
| Min | 1,587 | 31,260 |
|
| 29 |
+
| Max | 29,774 | 839,912 |
|
| 30 |
+
| Mean | 16,022.51 | 432,174.94 |
|
| 31 |
+
| Median | 14,875 | 387,152 |
|
| 32 |
+
| StdDev | 5,529.86 | 169,184.62 |
|
| 33 |
|
| 34 |
+
---
|
| 35 |
|
| 36 |
+
## π§Ύ File Format (Standard Games)
|
| 37 |
|
| 38 |
+
Each game is stored as a standalone `.csv`-like file, readable by both humans and programs. Format per move:
|
| 39 |
|
| 40 |
```
|
| 41 |
+
# 4Γ4 Board (4 rows)
|
| 42 |
0, 0, 0, 0
|
| 43 |
0, 0, 0, 0
|
| 44 |
0, 2, 0, 0
|
| 45 |
0, 0, 4, 0
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
# Metadata
|
| 48 |
+
1, 0, up, β
|
|
|
|
|
|
|
|
|
|
| 49 |
```
|
| 50 |
|
| 51 |
+
* 4 rows = board state
|
| 52 |
+
* 5th row = `step_index, cumulative_score, move_name, arrow`
|
| 53 |
+
* Final row uses `_` and no move:
|
| 54 |
+
`14943, 387388, _, _`
|
| 55 |
|
| 56 |
+
---
|
| 57 |
|
| 58 |
+
## π
High Score Records (`/records` Folder)
|
| 59 |
|
| 60 |
+
Games with scores exceeding **3 million** are included as flattened vectors:
|
| 61 |
|
| 62 |
```
|
| 63 |
25508, 32, 32, 4, 2, 512, 256, 2, 0, 16384, 2048, 0, 0, 32768, 4096, 0, 2, up, 733188
|
| 64 |
```
|
| 65 |
|
| 66 |
+
* Format:
|
| 67 |
+
`step_index, board[0..15], move, score`
|
| 68 |
+
* One row per move
|
| 69 |
+
* Split into files of 100 moves each
|
| 70 |
+
* Final score row example:
|
| 71 |
`114499, ..., down, 3766860`
|
| 72 |
|
| 73 |
+
These records include:
|
| 74 |
+
|
| 75 |
+
* UNDO usage for recovery
|
| 76 |
+
* Strategy switching between agents
|
| 77 |
+
* Some human-curated decision making
|
| 78 |
|
| 79 |
+
---
|
|
|
|
|
|
|
| 80 |
|
| 81 |
+
## π‘ Use Cases
|
| 82 |
|
| 83 |
+
| Task | Application |
|
| 84 |
+
| ------------------------------ | ------------------------------------------------------- |
|
| 85 |
+
| Supervised Learning | Train a model to choose the best move for a given board |
|
| 86 |
+
| Offline Reinforcement Learning | Imitation learning from expert trajectories |
|
| 87 |
+
| AI Benchmarking | Compare heuristic vs ML agents |
|
| 88 |
+
| Data Compression Research | Encode 2048 boards efficiently |
|
| 89 |
+
| Curriculum Learning | Study learning from low to high score trajectories |
|
| 90 |
|
| 91 |
---
|
| 92 |
|
| 93 |
+
## π Resources
|
| 94 |
|
| 95 |
+
* π **GitHub Repository**: [yuanoook/2048AI](https://github.com/yuanoook/2048AI)
|
| 96 |
+
* π¬ Based on [nneonneo/2048-ai](https://github.com/nneonneo/2048-ai) (used for baseline agents)
|
| 97 |
+
* π§ No neural nets used in generation β this dataset is ready to train one
|
| 98 |
|
| 99 |
---
|
| 100 |
|