sudoku-studio.tsx
Completed

Sudoku Studio

Generate, solve & explain Sudoku from 4×4 to 64×64

  1. 1// Sudoku Studio
  2. 2export const project = {
  3. 3 status: "completed",
  4. 4 timeline: "2025",
  5. 5 role: "Solo",
  6. 6 language: "TypeScript",
  7. 7 stack: [
  8. 8 "Angular 19",
  9. 9 "TypeScript",
  10. 10 "Algorithm X (DLX)",
  11. 11 "Backtracking",
  12. 12 ],
  13. 13};

Two traced solvers and a narrated step-through player over boards from 4×4 to 64×64.

  • Boards from 4×4 up to 64×64
  • DFS (MRV) and Dancing Links / Algorithm X
  • Move-by-move narrated explanation

Overview

Sudoku Studio generates, solves, and explains Sudoku of any size (sub-grid n from 2 to 8, giving boards from 4×4 up to 64×64) across four difficulties controlled by how aggressively clues are carved from a full solution (uniqueness verified for n ≤ 4).

It ships two solvers, both fully traced: DFS backtracking with the Minimum-Remaining-Values heuristic (distinguishing forced deductions from guesses), and Knuth's Dancing Links / Algorithm X, which models Sudoku as an exact-cover problem over four constraint families and typically solves hard boards with zero guesses. A step-through player lets you scrub, play/pause and read a narrated log of every placement, deduction, guess and backtrack, with the touched cell highlighted. Boards can be imported/exported as JSON, and big boards get guardrails (time limits, trace caps).

Key features

  • Unique-solution generation for n ≤ 4
  • Exact-cover modelling with O(1) cover/uncover
  • JSON import/export & hand entry
  • Time & trace guardrails for large boards

Notes

/**
* @importance Why it matters

A clear demonstration of algorithms & data structures, and of making a hard algorithm legible by narrating exactly how it reasons.

*/
/**
* @technicality The hard parts

Two complete solvers, including a Dancing Links exact-cover implementation with Knuth's S-heuristic, plus generation with uniqueness verification.

*/
/**
* @clarity How it's organised

A traced engine with a headless correctness harness separate from the Angular UI, so the algorithms can be tested without a browser.

*/
Completed
TypeScript Repo