Exhibit views
Overview
Sudoku Online is an interactive web-based Sudoku platform built with React, Tailwind CSS, and plain JavaScript. Puzzle input, validation, the solving engine, and output rendering are separated into clean modules; a constraint-based backtracking solver with heuristic search keeps even harder boards fast and reliable.
What it does
- Clean modular architecture: input/validation, solving engine, and rendering separated
- Constraint-based backtracking solver balancing correctness and performance
- Deterministic, testable solving flow — every puzzle follows the same path
- Lightweight build with minimal dependencies, focused on algorithm quality
Key decisions
- Chose a clean, modular architecture: puzzle input/validation, solving engine, and output rendering are separated.
- Implemented a constraint-based backtracking solver to balance correctness and performance.
- Designed the solver to be deterministic and testable, so each puzzle always follows the same solving flow.
- Kept the project lightweight with minimal dependencies to focus on algorithm quality.
Difficult problem
The hardest challenge was preventing brute-force explosion on harder puzzles. A naive solver worked for easy boards but slowed down on complex ones. I solved this by combining constraint propagation with heuristic search (choosing the next cell with the fewest candidates first), which reduced unnecessary branches and made solving much faster and more reliable
Lessons learned
- A clear data model (rows, columns, boxes, candidates) makes complex logic much easier to reason about.
- Performance improved significantly after adding early pruning and smarter candidate ordering.
- Edge cases matter: invalid puzzles, multiple solutions, and unsolvable states require explicit handling.
- Small projects still benefit from strong engineering practices: modular design, testing, and readable logic.