Datasets:

Modalities:
Text
Formats:
parquet
ArXiv:
Libraries:
Datasets
Dask
License:
Kanzoet97 jsseely commited on
Commit
7de39f0
·
verified ·
0 Parent(s):

Duplicate from SakanaAI/Sudoku-CTC-Reasoning

Browse files

Co-authored-by: Jeffrey Seely <jsseely@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mds filter=lfs diff=lfs merge=lfs -text
13
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
14
+ *.model filter=lfs diff=lfs merge=lfs -text
15
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
16
+ *.npy filter=lfs diff=lfs merge=lfs -text
17
+ *.npz filter=lfs diff=lfs merge=lfs -text
18
+ *.onnx filter=lfs diff=lfs merge=lfs -text
19
+ *.ot filter=lfs diff=lfs merge=lfs -text
20
+ *.parquet filter=lfs diff=lfs merge=lfs -text
21
+ *.pb filter=lfs diff=lfs merge=lfs -text
22
+ *.pickle filter=lfs diff=lfs merge=lfs -text
23
+ *.pkl filter=lfs diff=lfs merge=lfs -text
24
+ *.pt filter=lfs diff=lfs merge=lfs -text
25
+ *.pth filter=lfs diff=lfs merge=lfs -text
26
+ *.rar filter=lfs diff=lfs merge=lfs -text
27
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
28
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar filter=lfs diff=lfs merge=lfs -text
31
+ *.tflite filter=lfs diff=lfs merge=lfs -text
32
+ *.tgz filter=lfs diff=lfs merge=lfs -text
33
+ *.wasm filter=lfs diff=lfs merge=lfs -text
34
+ *.xz filter=lfs diff=lfs merge=lfs -text
35
+ *.zip filter=lfs diff=lfs merge=lfs -text
36
+ *.zst filter=lfs diff=lfs merge=lfs -text
37
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
38
+ # Audio files - uncompressed
39
+ *.pcm filter=lfs diff=lfs merge=lfs -text
40
+ *.sam filter=lfs diff=lfs merge=lfs -text
41
+ *.raw filter=lfs diff=lfs merge=lfs -text
42
+ # Audio files - compressed
43
+ *.aac filter=lfs diff=lfs merge=lfs -text
44
+ *.flac filter=lfs diff=lfs merge=lfs -text
45
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
46
+ *.ogg filter=lfs diff=lfs merge=lfs -text
47
+ *.wav filter=lfs diff=lfs merge=lfs -text
48
+ # Image files - uncompressed
49
+ *.bmp filter=lfs diff=lfs merge=lfs -text
50
+ *.gif filter=lfs diff=lfs merge=lfs -text
51
+ *.png filter=lfs diff=lfs merge=lfs -text
52
+ *.tiff filter=lfs diff=lfs merge=lfs -text
53
+ # Image files - compressed
54
+ *.jpg filter=lfs diff=lfs merge=lfs -text
55
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
56
+ *.webp filter=lfs diff=lfs merge=lfs -text
57
+ # Video files - compressed
58
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
59
+ *.webm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ dataset_info:
4
+ - config_name: processed
5
+ features:
6
+ - name: youtube_id
7
+ dtype: string
8
+ - name: text
9
+ dtype: string
10
+ - name: puzzle_data
11
+ struct:
12
+ - name: author
13
+ dtype: string
14
+ - name: cols
15
+ dtype: int64
16
+ - name: date
17
+ dtype: string
18
+ - name: encoded_puzzle
19
+ dtype: string
20
+ - name: initial_board
21
+ dtype: string
22
+ - name: lgc_timestamp
23
+ dtype: float64
24
+ - name: puzzle_id
25
+ dtype: string
26
+ - name: rows
27
+ dtype: int64
28
+ - name: rules
29
+ dtype: string
30
+ - name: sequential_number
31
+ dtype: int64
32
+ - name: solution
33
+ dtype: string
34
+ - name: sudokupad_url
35
+ dtype: string
36
+ - name: title
37
+ dtype: string
38
+ - name: visual_elements
39
+ dtype: string
40
+ - name: youtube_id
41
+ dtype: string
42
+ - name: initial_board_ascii
43
+ dtype: string
44
+ - name: initial_board_serialized
45
+ dtype: string
46
+ splits:
47
+ - name: train
48
+ num_bytes: 23216253
49
+ num_examples: 451
50
+ - name: valid
51
+ num_bytes: 144090
52
+ num_examples: 3
53
+ download_size: 9942917
54
+ dataset_size: 23360343
55
+ - config_name: raw
56
+ features:
57
+ - name: puzzle_id
58
+ dtype: string
59
+ - name: youtube_id
60
+ dtype: string
61
+ - name: action_data
62
+ list:
63
+ - name: actions
64
+ sequence: string
65
+ - name: frame
66
+ dtype: int64
67
+ - name: idx
68
+ dtype: int64
69
+ - name: serialized_state
70
+ dtype: string
71
+ - name: time
72
+ dtype: float64
73
+ - name: asr_data
74
+ struct:
75
+ - name: language
76
+ dtype: string
77
+ - name: segments
78
+ list:
79
+ - name: avg_logprob
80
+ dtype: float64
81
+ - name: compression_ratio
82
+ dtype: float64
83
+ - name: end
84
+ dtype: float64
85
+ - name: id
86
+ dtype: int64
87
+ - name: no_speech_prob
88
+ dtype: float64
89
+ - name: seek
90
+ dtype: int64
91
+ - name: start
92
+ dtype: float64
93
+ - name: temperature
94
+ dtype: float64
95
+ - name: text
96
+ dtype: string
97
+ - name: tokens
98
+ sequence: int64
99
+ - name: words
100
+ list:
101
+ - name: end
102
+ dtype: float64
103
+ - name: probability
104
+ dtype: float64
105
+ - name: start
106
+ dtype: float64
107
+ - name: word
108
+ dtype: string
109
+ - name: text
110
+ dtype: string
111
+ - name: puzzle_data
112
+ struct:
113
+ - name: author
114
+ dtype: string
115
+ - name: cols
116
+ dtype: int64
117
+ - name: date
118
+ dtype: string
119
+ - name: encoded_puzzle
120
+ dtype: string
121
+ - name: initial_board
122
+ dtype: string
123
+ - name: lgc_timestamp
124
+ dtype: float64
125
+ - name: puzzle_id
126
+ dtype: string
127
+ - name: rows
128
+ dtype: int64
129
+ - name: rules
130
+ dtype: string
131
+ - name: sequential_number
132
+ dtype: int64
133
+ - name: solution
134
+ dtype: string
135
+ - name: sudokupad_url
136
+ dtype: string
137
+ - name: title
138
+ dtype: string
139
+ - name: visual_elements
140
+ dtype: string
141
+ - name: youtube_id
142
+ dtype: string
143
+ splits:
144
+ - name: train
145
+ num_bytes: 1924808922
146
+ num_examples: 1351
147
+ download_size: 365262005
148
+ dataset_size: 1924808922
149
+ configs:
150
+ - config_name: processed
151
+ data_files:
152
+ - split: train
153
+ path: processed/train-*
154
+ - split: valid
155
+ path: processed/valid-*
156
+ - config_name: raw
157
+ data_files:
158
+ - split: train
159
+ path: raw/train-*
160
+ ---
161
+ <h1 align="center">
162
+ <b>Sudoku-Bench</b><br>
163
+ </h1>
164
+
165
+ <p align="center">
166
+ 📝 <a href="https://pub.sakana.ai/sudoku">[Leaderboard]</a>
167
+ 📝 <a href="https://arxiv.org/abs/2505.16135">[Technical Report]</a>
168
+ 📝 <a href="https://sakana.ai/sudoku-bench">[Blog Post]</a><br>
169
+ 🤗 <a href="https://huggingface.co/datasets/SakanaAI/Sudoku-Bench">[Sudoku-Bench puzzle dataset]</a>
170
+ 🤗 <a href="https://huggingface.co/datasets/SakanaAI/Sudoku-CTC-Reasoning">[Sudoku-CTC-Reasoning dataset]</a>
171
+ </p>
172
+
173
+ ## Sudoku-CTC-Reasoning dataset
174
+
175
+ The Sudoku-CTC-Reasoning dataset contains the reasoning traces of 1351 puzzles featured in the [Cracking the Cryptic](https://www.youtube.com/c/CrackingTheCryptic) YouTube channel, and thus provides rich learning signals for training LMs to learn reasoning in a Sudoku game or for a broader range of reasoning-intensive tasks.
176
+
177
+ > [!NOTE]
178
+ > This dataset is provided with permission from [Cracking the Cryptic](https://www.youtube.com/c/CrackingTheCryptic).
179
+
180
+ ## Data statistics
181
+
182
+ - Videos with reasoning traces: 1351
183
+ - Total actions: 3539008
184
+ - Total actions (excluding highlights): 818145
185
+ - Total words: 8921707
186
+
187
+ > [!NOTE]
188
+ > There will be updates to the dataset with more reasoning traces, so please stay tuned.
189
+
190
+ ## Combined ASR and Action Dataset
191
+
192
+ <img width="1403" alt="Image" src="https://github.com/user-attachments/assets/e8ff55ef-ebbe-4488-a045-57ba8c1f8d64" />
193
+
194
+ For each video we provide `action_data` and `asr_data`. The `action_data` is extracted from the youtube video using a video-to-actions pipeline (described below) and consists of a sequence of actions taken in the SudokuPad app as the host solves the puzzle. The `asr_data` is extracted from the youtube video using [Whisper](https://github.com/openai/whisper).
195
+
196
+ ## Loading the dataset
197
+
198
+ The dataset has two subsets. We document the `raw` subset here, and the `processed` subset is described in the [Sudoku-Bench's data_processing README](https://github.com/SakanaAI/Sudoku-Bench/tree/main/src/ctc_processing).
199
+
200
+ ```python
201
+ import datasets
202
+
203
+ dataset = datasets.load_dataset('SakanaAI/Sudoku-CTC-Reasoning', 'raw')
204
+ ```
205
+
206
+ Each entry of `dataset` contains the following fields:
207
+ - `youtube_id`: the id of the youtube video
208
+ - `action_data`: the Sudokupad actions from the video
209
+ - `asr_data`: the audio transcript of the puzzle
210
+ - `puzzle_id`: the id of the puzzle
211
+ - `puzzle_data`: the puzzle data following the format of the Sudoku puzzle datasets.
212
+
213
+ ## Actions format
214
+
215
+ The `action_data` for each video is a list of action groups. Each action group has the following fields:
216
+ - `idx`: the index of the action group in the video
217
+ - `frame`: the frame number of the corresponding frame in the video
218
+ - `time`: the time in seconds of the action group using the video's time axis
219
+ - `actions`: a list of strings of (serialized actions) taken on the SudokuPad board that occurred between the previous frame and the current frame.
220
+ - `serialized_state`: the serialized state of the SudokuPad board.
221
+
222
+ Typically each action group contains a single action.
223
+
224
+ ### Serialized action format
225
+
226
+ The serialized action `'cd:+:7:r3c5'` denotes "add a candidate 7 to cell r3c5". In general we use the following action types:
227
+
228
+ Action type:
229
+ - `vl`: value (i.e. the actual proposed value of the cell)
230
+ - `cd`: candidate or center pencilmark
231
+ - `pm`: corner pencilmark
232
+ - `co`: color
233
+ - `sl`: select
234
+ - `ds`: deselect
235
+
236
+ Operation type:
237
+ - `+`: add to the current list
238
+ - `-`: remove from the current list
239
+
240
+ Value:
241
+ - `1-9`: for value, candidates, and pencilmarks
242
+ - `0-9`: for color, with mapping [here](https://github.com/SakanaAI/Sudoku-Bench/blob/main/src/sudokupad_interaction/app.py#L26).
243
+
244
+ Coordinates:
245
+ - `rxcy`: row and column of the action. In `sl` and `ds` actions, `rxcy` is a comma-separated list.
246
+
247
+ ### Serialized state format
248
+
249
+ The serialized state can be loaded into [SudokuPad](https://github.com/SakanaAI/Sudoku-Bench/tree/main/src/sudokupad_interaction) by
250
+ ```python
251
+ import requests
252
+
253
+ # with sudokupad_interaction/app.py running
254
+ response = requests.put("http://localhost:8000/set_state", json={"serialized_state": serialized_state})
255
+ ```
256
+
257
+ The format of serialized state follows that used internally by SudokuPad: For each cell, use `/` to separate value, candidate, pencilmark, color, highlight, pen-tool, respectively, with trailing `/`s removed.
258
+
259
+ Example: A `serialized_state` of `{"cells":["6","/1,2,4,5", ...` indicates that `r1c1` has a value of 6, and `r1c2` has candidates (center small digits)1, 2, 4, 5.
260
+
261
+ ## ASR format
262
+
263
+ The `asr_data` is the output of Whisper ASR using `model.transcribe(audio_file, language="en", task="transcribe", word_timestamps=True)` for `model = whisper.load_model("turbo")`. Please see [Whisper's documentation](https://github.com/openai/whisper) for details.
264
+
265
+ ## Video-to-actions summary
266
+
267
+ Extracting sudokupad actions from the video is a multi-step process:
268
+
269
+ 1. Detect the x, y, height, width of the Sudoku board in the video
270
+ 2. Detect the x, y, height, width of the corresponding Sudoku board in the SudokuPad app with the same puzzle loaded
271
+ 3. Using 1. and 2. and the location of individual cell rendering in the browser window in SudokuPad (the lines that make up the typically 9x9 grid), determine the corresponding cell locations in the youtube video.
272
+ 4. Take a sequence of keyframes from the video cropped to the Sudoku board. A keyframe is where a pixel-wise change occured above a threshold. A keyframe is a candidate for when an action was taken.
273
+ 5. For each keyframe, use a trained resnet classifier to map the pixel input to a multiclass prediction each of the (typically 81) SudokuPad cell states, which includes the colors, pencilmarks (corner small digits), candidates (center small digits), and current value (center large digit). The resnet was trained on synthetic data from the SudokuPad app. The exact images to feed into the resnet are determined by the cell locations from 1. and 2. Combine the individual cell state predictions to obtain a single board state for this keyframe.
274
+ 6. From the sequence of states, determine the state-diffs to get the sequence of actions, saved as `action_data`.
275
+
276
+ > [!NOTE]
277
+ > The code for the video-to-actions pipeline itself is not open-sourced as part of [Sudoku-Bench](https://github.com/SakanaAI/Sudoku-Bench).
278
+
279
+ ## References
280
+
281
+ - [CTC YouTube channel](https://www.youtube.com/c/CrackingTheCryptic)
282
+ - [CTC catalogue](https://ctc-catalogue.com/)
283
+
284
+ ## Citation
285
+ ```bibtex
286
+ @misc{seely2025sudoku-bench,
287
+ title={{Sudoku-Bench}},
288
+ author={Seely, Jeffrey and Imajuku, Yuki and Zhao, Tianyu and Cetin, Edoardo and Jones, Llion},
289
+ howpublished = {\url{https://github.com/SakanaAI/Sudoku-Bench}},
290
+ year={2025}
291
+ }
292
+ ```
processed/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f5ec6b383e7b0abb6336956a07c1c53b66987b92633873db6e5010d55a936822
3
+ size 9848783
processed/valid-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0204b5621155aded668dae3cf17029f5e87122c579b8fe4db6f8a095419e49e0
3
+ size 94134
raw/train-00000-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:beb07bbdbea51ca16848d6b4512538703c32ee9e459a1108f9427d147bccac79
3
+ size 93682891
raw/train-00001-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac08fbaaf4f88868f4eb3e796d991963c538f91ab4788d3165c194a96ccd77b7
3
+ size 91687233
raw/train-00002-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8c0d8d7e83869c6aca6e439a0fed76972e710f1623fb9a4acda3e438b81cacf
3
+ size 88422560
raw/train-00003-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc149e15c17e333fb5a77da6b020564ff35ecfec2048498e33d9e4296a6f7929
3
+ size 91469321