Dataset Viewer
Auto-converted to Parquet Duplicate
messages
listlengths
2
4
[ { "role": "user", "content": "Build a single-file HTML/JS tic-tac-toe game I can open in a browser. Two players on the same screen, X and O alternate, highlight the winning line, track wins and draws across rounds, and have a restart button. No libraries." }, { "role": "assistant", "content": "<...
[ { "role": "user", "content": "Make a memory matching card game in one HTML file. 4x4 grid, eight emoji pairs, flip two at a time, mismatches flip back after a short delay, count the moves, and celebrate when all pairs are found. Restart button too." }, { "role": "assistant", "content": "<think>\...
[ { "role": "user", "content": "One-file rock paper scissors game against the computer. Buttons for each throw, show the computer's choice and who won the round, keep a running tally of wins, losses and ties, and let me reset the tally." }, { "role": "assistant", "content": "<think>\nWe need rock-...
[ { "role": "user", "content": "Single HTML file hangman game. Random word from a built-in list, on-screen A-Z buttons plus guessed-letter tracking, a canvas-drawn gallows that gains a body part with each wrong guess, and a new-game button." }, { "role": "assistant", "content": "<think>\nWe need a...
[ { "role": "user", "content": "Whack-a-mole in one HTML file. 3x3 grid of holes, moles pop up randomly and stay up briefly, click to whack, 30 second round, score counter, start and play-again flow." }, { "role": "assistant", "content": "<think>\nWe need whack-a-mole in one HTML file: a 3x3 grid ...
[ { "role": "user", "content": "Build a Simon memory game in a single HTML file. Four colored pads that light up and play tones, the sequence grows by one each round, you have to repeat it, and it shows your level. Lives or a game-over screen when you slip." }, { "role": "assistant", "content": "<...
[ { "role": "user", "content": "Single file minesweeper, 9x9 board with 10 mines. Left click to reveal, right click or flag mode to mark mines, flood fill for empty regions, mines-left counter, win and lose states, new game button." }, { "role": "assistant", "content": "<think>\nWe need minesweepe...
[ { "role": "user", "content": "Two player connect four in one HTML file. Click a column to drop a disc, gravity applies, first to four in a row wins (horizontal, vertical, diagonal both ways), show whose turn it is, winning cells highlighted, reset button." }, { "role": "assistant", "content": "<...
[ { "role": "user", "content": "Classic breakout in a single HTML file on a canvas. Paddle with mouse and arrow keys, ball bounces, grid of bricks, score and 3 lives, ball gets faster each brick, win and game-over overlays with restart." }, { "role": "assistant", "content": "<think>\nWe need a bre...
[ { "role": "user", "content": "Lane dodge arcade game in one HTML file. Vertical scrolling, player car near the bottom in one of three lanes, obstacles fall from the top, dodge them, score climbs over time, three hits and you're out, restart on overlay." }, { "role": "assistant", "content": "<thi...
[ { "role": "user", "content": "Cookie clicker clone in a single HTML file. Click the big cookie, buy cursors (+0.1/sec, scaling cost) and grandmas (+1/sec), show cookies and cookies per second, and save progress in localStorage so refresh keeps my bakery." }, { "role": "assistant", "content": "<t...
[ { "role": "user", "content": "Reaction time test in one HTML file. Click to start, wait for the box to turn green, click as fast as you can, track your last time and a running average over 5 attempts, and flag early (anticipation) clicks as failed rounds." }, { "role": "assistant", "content": "<...
[ { "role": "user", "content": "Flappy Bird style clone as a single HTML file with canvas. Click or space to flap, pipes come from the right with a gap, score one per pipe, gravity and jump tuning feel right, best score saved to localStorage, game over overlay with restart." }, { "role": "assistant", ...
[ { "role": "user", "content": "3x3 sliding number puzzle (the 8-puzzle) as a single HTML file. Shuffle to a guaranteed-solvable board, click a tile adjacent to the blank to slide it, show move count, and detect when it's solved." }, { "role": "assistant", "content": "<think>\nWe need the 3x3 slid...
[ { "role": "user", "content": "Speed math quiz in one HTML file. Random arithmetic questions, 60 seconds on the clock, type the answer and hit Enter, score as many as you can, show your best score in localStorage, and a start overlay." }, { "role": "assistant", "content": "<think>\nWe need a spee...
[ { "role": "user", "content": "Typing speed test in a single HTML file. Show a paragraph, I type it into a textarea, start the clock on my first keystroke, and when I finish compute words per minute and accuracy. Restart button with a new paragraph." }, { "role": "assistant", "content": "<think>\...
[ { "role": "user", "content": "Stroop effect test as one HTML file. Show a color word printed in a mismatching ink color, four buttons for the ink colors, click the button that names the INK, 30 seconds on the clock, report score and accuracy." }, { "role": "assistant", "content": "<think>\nWe ne...
[ { "role": "user", "content": "A 2048 clone in a single HTML file, 4x4 grid, arrow keys to slide and merge tiles, new random 2 or 4 after each valid move, score counter, game over when no moves remain, and a restart button." }, { "role": "assistant", "content": "<think>\nWe need a 2048 clone in a...
[ { "role": "user", "content": "N-back brain trainer in one HTML file. 2-back with letters A–J, 25 trials, press Space or a button when the current letter matches the letter from two steps ago, report hits, misses, and false alarms at the end." }, { "role": "assistant", "content": "<think>\nWe nee...
[ { "role": "user", "content": "Coin catching arcade game on a canvas in one HTML file. Move a basket along the bottom with arrow keys or mouse, coins fall from random spots, catch them for points, miss three and it's over, 45 second cap too, restart overlay." }, { "role": "assistant", "content": ...
[ { "role": "user", "content": "Stack the blocks game in one HTML file with canvas. A block slides side to side, click or press space to drop it on the stack, overhang gets trimmed, missing the tower ends the run, and the speed ramps up. Show how many blocks you stacked." }, { "role": "assistant", ...
[ { "role": "user", "content": "Aim trainer game in a single HTML file with canvas. Targets pop up at random spots, click them as fast as you can, 30 seconds on the clock, count hits and missed clicks, show accuracy at the end, restart button." }, { "role": "assistant", "content": "<think>\nWe nee...
End of preview. Expand in Data Studio

code-reasoning-distillation

178 SFT / distillation coding samples for small language models, in one train split:

  • 150 single-turn (user → assistant) reasoning-focused coding samples
  • 28 multi-turn (user ↔ assistant × 2) browser-game samples

Every assistant reply starts with a <think> block that derives the solution from first principles (zero-knowledge style, no template phases), followed by a concise explanation and a complete, runnable program.

Format

Single Parquet file (code-reasoning-distillation.parquet, zstd compression), one row per sample, schema:

messages: list<struct<role: string, content: string>>

Each messages is [user, assistant] for the 150 single-turn samples and [user, assistant, user, assistant] for the 28 multi-turn games. Single-turn rows: the user turn is a coding task/brief and the assistant turn is one complete program. Multi-turn rows: the first pair builds a complete browser game, the second pair adds a feature or fixes a bug and returns the full updated file.

<think>
We need ... Let's figure out ... (first-person derivation, no section headers)
... state transitions written with real values, e.g. dq: [] -> [0] ...
... at least two explicit "if I had done X instead, here is the wrong result" fixes ...
</think>

<2-4 sentence explanation>

<complete runnable code in one fenced block>

Think-block style (zero-knowledge derivation)

The think block is written as if the author has no memorized solution and derives everything from the problem statement:

  • First person, exploratory voice ("Let's figure out...", "Wait - ..."). No numbered phases, no headings, no fixed DECONSTRUCTION / ARCHITECTURE template.
  • Every constant, coordinate, index, and boundary is derived from literal arithmetic on the concrete demo input, not asserted.
  • Loop boundaries and off-by-one cases are tested with real numbers (first iteration, last iteration, empty input).
  • State changes are spelled out as before -> after with actual values; each block contains at least six such transitions.
  • At least two explicit wrong-behaviour corrections: what a plausible wrong implementation would return, and why that is wrong.
  • Every variable, function, and DOM id mentioned is defined in the code that follows.
  • 350-550 words, plain ASCII.

Games: 28 multi-turn game samples

Every row in the games slice is a four-message conversation that builds a playable browser game and then extends or repairs it:

user      -> build brief for a single-file HTML/CSS/JS game
assistant -> think block + explanation + complete game file
user      -> one feature request or bug report
assistant -> think block + explanation + complete updated game file
Slice Games
Retro action snake, tetris, pong, breakout, space-invaders, asteroids
Arcade flappy-bird, doodle-jump, frogger, pac-man-lite, bomberman-lite
Board chess, checkers, connect-four-ai, tic-tac-toe-ai
Puzzle/logic sudoku, 2048, minesweeper, memory-match, lights-out, sokoban
Misc blackjack, simon, whack-a-mole, tower-defense-lite
3D / simulation maze-escape-3d (ray caster), solar-system-3d (software projection), stack-3d (orthographic projection)

All games are vanilla, single-file, dependency-free, and expose a small window.__game debug API (state(), start(), reset(), tick(ms), plus game actions) so the core rules can be exercised without a browser driver. Every game was loaded in Chromium with zero console errors and smoke-tested through the debug API (input, ticks, scoring, lives, persistence). Think blocks follow the same zero-knowledge style as the single-turn samples.

Composition

Slice Count Language Delivery
Games 53 HTML/JS + 3D/canvas 25 single-turn games + 28 multi-turn browser games
Apps 50 HTML/JS (single file, vanilla) timers, calculators, converters, localStorage tools
Interactive tools/viz 25 HTML/JS + Canvas + Web Audio sort/pathfinding visualizers, Web Audio synths
Algorithms 50 Python 3 (stdlib only) DP, parsing, graphs, heaps, with if __name__ == "__main__" demos

No external libraries, fonts, images, CDNs, or assets anywhere in the samples. localStorage access is wrapped in try/catch; preventDefault on game keys.

Loading

from datasets import load_dataset

ds = load_dataset("bunnycore/code-reasoning-distillation", split="train")
print(ds)          # Dataset({features: ['messages'], num_rows: 178})
print(ds[0]["messages"][0]["content"][:200])

Rows with exactly 2 messages are the single-turn coding tasks; rows with exactly 4 are the multi-turn browser games. Filter with ds.filter(lambda r: len(r["messages"]) == 4).

Or directly:

import pandas as pd
df = pd.read_parquet("code-reasoning-distillation.parquet")

Verification performed

Every row was machine-checked before upload:

  • <think>…</think> tags present; exactly one fenced code block per assistant turn; no TODO/FIXME markers in code.
  • HTML entries: all <script> blocks pass node --check; every getElementById('x') resolves to an id="x" in the same entry's markup.
  • Python entries: code blocks pass ast.parse; every embedded if __name__ == "__main__": demo executes and prints the annotated expected output.
  • No duplicate topics or duplicate user prompts; think blocks 350-550 words with at least six -> transitions each.

Honest limitations

  • Not human-reviewed. These are machine-generated and machine-checked samples. The 28 browser games were smoke-tested in Chromium through a window.__game debug API; the other 150 entries have no browser testing — canvas/audio behavior there is traced, not observed.
  • Two near-duplicate mechanics (stroop-test, color-reaction) slipped through review.
  • Small sample (n=178) — a seed set to iterate on, not a training-ready corpus. Expect several percent of entries to need manual repair before training.
  • Assistant code follows the stated constraints (single file, stdlib-only) and encodes one reference style; style diversity is low by construction.

License

CC-BY-4.0.

Downloads last month
69