Back to scramble generator

How the scramble generator works

/scramble/gen is the unified scramble entry point. Three modes cover the common needs: "official WCA scramble sheet", "quick N scrambles to practice", "paste my own scrambles for preview". All WCA events go through Lucas Garron's cubing.js random-state scramblers (3×3 can switch to the min2phase-rust engine — cs0x7f Kociemba ported to Rust, ~10× faster; 4×4 routes to cs0x7f Threephase via a Web Worker pool; 5×5 can switch to our server-side cube555 daemon for true random-state). Beyond WCA 21 we plug in three more sources: 5 random-state events from cubing.js twizzleEvents (FTO / Master Tetra / Kilominx / Redi / Baby FTO); 31 events vendored from cs0x7f csTimer (Gear / Ivy / Dino / Sq2 / SSq1 / Pyraminx Crystal / Gigaminx / Helicopter / 5 cuboids / 15-puzzle / 8-puzzle / …); 7 shape mods borrowing WCA scrambles (Mirror Blocks / Fisher / Mastermorphix / Pyramorphix / Axis / Windmill / Ghost / Void). 64 puzzles total; non-WCA ones collapse behind an "Other ▾" chip by default.

The three modes

Comp

tnoodle

A full WCA-style scramble sheet — multi-event, multi-round, multi-group, with format / sets / copies all configurable. Or paste a WCA comp id to pull published scrambles.

  • Mock a competition-day scramble run
  • Make club / weekly-comp scramble sheets
  • Browse real published scrambles from past comps

Output

Web table + tnoodle-style PDF (with preview thumbnails — toggleable).

Batch

quick

Pick one or more events + a count (1-1000). Multi-event runs in parallel; each event reports its own timing.

  • Daily practice scramble sets
  • Seeds for A/B benchmarks or statistical runs
  • Copy 100 scrambles into csTimer / Twisty Timer in one go

Output

Per-event tables (click a row to copy one scramble) + one-click PDF export.

Paste

manual

Bring your own scrambles, get previews. Tolerates leading "1. " / "1) " numbering.

  • Turn scrambles from elsewhere (old comp / a friend) into a PDF
  • Peek at the 2D net of a specific scramble set
  • Sanity-check a paste against its source

Output

Live preview + one-click PDF export.

Comp-mode flow

Configure → background prefetch silently fills a pool → clicking Generate snaps to the view almost instantly because pool drain is free.

1
Pick events
Click one or more of the 21 WCA event icons (orange highlight). Optionally type 8-50 to add a high-order NxN (8×8 to 50×50, beyond WCA's 7).
2
Tune rounds / sets / copies / format
Click the same icon again to add a round (up to 4); each round has its own format (Ao5 / Mo3 / Bo1 …), scrambleSets (groups), and copies (printed copies). MBLD has cubes-per-attempt; FM picks translation languages; clock picks pin colors.
3
Background pool silently tops up
On every config change, the client computes how many scrambles of each type are needed (total attempts × cubes × sets) and fires async fills in the background. No UI noise — but the ~3 s 4×4/5×5 pruning-table build and per-scramble solver cost happens during user think-time instead of after a button click.
4
Click "Generate (N)"
Drain from the pool first (near-zero wait). Anything not yet pooled falls through to live generation. The page then switches to view mode: top selector single-picks an event; sheet table + preview thumbnails below.
5
View / copy / download PDF
Top-right Download PDF emits a tnoodle-style PDF (event grouped, group/sets/copies headers, preview thumbnails). To re-configure: hit the clear button on the left to return to configure mode.

Batch / paste flow

Config is the result. Tweaking events or count triggers an immediate regen; what you see is always live — no "apply" button.

1
Pick events
Multi-pick from the 21 WCA events; high-order NxN works the same as Comp.
2
Pick a count (batch) / paste text (paste)
Batch: type 1-1000 or pick a chip (1 / 5 / 12 / 25 / 50 / 100 / 200 / 1000). Paste: one scramble per line into each event's textarea.
3
Live render
Any change re-renders instantly. Per-event timing (wall / avg / first) lets you see at a glance which scrambler is slow on your machine.

Engine selection

EventEngineWhereNotes
3×3cubing.js (default) or min2phase-rustbrowser (WASM)Default: cubing.js TS impl. Toggle to min2phase-rust (cs0x7f Kociemba ported to Rust, 117 KB WASM lazy-loaded) for ~10× speed, equivalent length distribution.
2×2 / 3×3 BLD / OH / FT / FM / MBLDcubing.jsbrowserrandom-state, millisecond
4×4cs0x7f Threephasebrowser Web Worker poolrandom-state; ~3 s cold table build, then ms once pool is warm
5×5cubing.js (default) or cube555 daemonbrowser / serverDefault is the WCA 60-move random-move; toggle to "random-state" for the server (~70 moves, uniform). details
6×6 / 7×7cubing.jsbrowserWCA 80 / 100 random-move
high-order N×N (N ≥ 8)in-house random-move (linear 20·(N-2))browserNo WCA spec; mirrors the same-axis rejection used by 5/6/7
Pyraminx / Skewb / Sq-1 / Megaminx / Clockcubing.jsbrowserrandom-state (per-puzzle solver)
Non-WCA: FTO / Master Tetra / Kilominx / Redi / Baby FTOcubing.jsbrowserRandom-state (cubing.js twizzleEvents)
Non-WCA: Gear / Ivy / Dino / Sq2 / SSq1 / BSq1 / Gigaminx / Pyraminx Crystal / Helicopter / Curvy Copter / Master Pyra RS / 2×2×3 / 1×3×3 / 2×3×3 / 3×3×4-7 / 15-puzzle / 8-puzzle / Super Floppy / UFO / Icosamate / Crazy 3×3 / Cmetrick / Cmetrick Mini / Bicube / Siamese ×3 / Diamondcs0x7f csTimerbrowser Web WorkerUpstream source vendored at tools/cstimer-scramble/ (GPLv3); classic worker importScripts the full lib + scramble files. 13 random-state (IDA + runtime prune tables), 18 random-move. Cold start ~100-300 ms, hot path < 50 ms.
Shape mods: Mirror Blocks / Fisher / Mastermorphix / Pyramorphix / Axis / Windmill / Ghost / Voidborrows WCA scramblebrowserSticker-shape variants of 3×3 (or 2×2 for Pyramorphix) — same underlying cube state, so we route to the WCA pool with zero extra algorithm. Preview renders the underlying puzzle's unfolded net.

3×3 engine comparison

When 3×3 is selected, a toggle appears to switch between the two engines. Both are Kociemba two-phase; only the implementation differs. Length distribution is essentially identical (±0.1 moves), but generation speed differs by an order of magnitude. Same machine, same tab, post-warmup, 100 random-state scrambles each:

Metriccubing.js (WCA)min2phase-rustm2p speedup
avg20.61 ms1.44 ms14.3×
p5012.42 ms1.21 ms10.3×
p9560.01 ms3.49 ms17.2×
max250.63 ms18.23 ms13.7×
avg length20.4920.53~ same
cold start~3 s (with prewarm ~30 ms)~120 ms (incl. WASM fetch)

Why not just switch defaults? cubing.js is Lucas Garron's implementation, the ecosystem default, and we keep it. Toggle in the 3×3 picker if you want speed; localStorage persists the choice. Switching clears the relevant pool so the next Generate refills with the new engine.

Why it feels fast: three layers of pool

See also