yuanoook commited on
Commit
805c375
Β·
verified Β·
1 Parent(s): 64cfc83

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +59 -61
README.md CHANGED
@@ -1,102 +1,100 @@
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 generated by AI agents based on search algorithms (not trained models) 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 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
- * 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
 
 
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