Skip to content

MattPutnam/sudoku

Repository files navigation

Sudoku Solver

An interactive Sudoku solver that shows its work. Enter a puzzle (or pick one from the built-in library), hit Solve, and step through the solution one logical deduction at a time. The "Expert" level built-in provides a pretty satisfying solve, and the first two under the "famous puzzles" heading are good too.

Another project that mainly exists due to my curiosity of how well SDD can work for frontend code. Most code generated by Claude+GSD, with a modest amount of manual debugging, refactoring, and UI cleanup. The forcing chain logic is still kinda broken so I made it time out after a few seconds, if clicking "solve" takes a while that's why. Some example puzzles can't be solved by the app and at least one is actually broken.

Features

  • Step-by-step playback — walk forward and backward through the solution with full board visualization, or auto-play at speed
  • 30 solving strategies across 5 difficulty tiers, from naked singles to forcing chains
  • Difficulty rating — each puzzle is rated Trivial through Extreme based on the hardest strategy required
  • Example puzzle library — classic puzzles grouped by difficulty, including Escargot, Platinum Blonde, and Easter Monster
  • Candidate visualization — see the candidate sets narrow as each strategy fires

Strategies

Tier Strategies
Basic Naked Single, Hidden Single
Intermediate Pointing Pair, Claiming, Naked/Hidden Pair, Naked/Hidden Triple, Naked/Hidden Quad
Advanced X-Wing, Swordfish, Jellyfish, Finned X-Wing, Finned Swordfish, Finned Jellyfish, Skyscraper, 2-String Kite, XY-Wing, XYZ-Wing, W-Wing, Unique Rectangle
Expert Simple Coloring, X-Chain, XY-Chain, ALS-XZ, ALS-XY-Wing, Sue de Coq
Extreme AIC, Grouped AIC, Forcing Chains

Tech Stack

React, TypeScript, Vite, CSS Modules. Tested with Vitest (200+ tests).

Development

npm install
npm run dev       # start dev server
npm run test      # run tests
npm run build     # production build
npm run preview   # preview production build

About

A sudoku solver that uses human logic

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages