CSE 440 · Artificial Intelligence · North South University

One constraint engine.
Watch it think.

LogicPuzzleX solves Sudoku from 4×4 to 16×16 as a constraint satisfaction problem, with backtracking search, constraint propagation and propositional logic. It shows every deduction live in your browser.

Six ways to explore the solver

Each one is a tab in the app. They all share one puzzle, so you can load the world's hardest Sudoku and watch every technique take it on.

🎮

Play

Solve it yourself. After every move the engine checks that the board can still be finished, and its hints come with reasons.

🧠

Watch it think

An animated replay of the search. Candidates vanish as constraints propagate, and cells flash red on a backtrack.

🏁

Algorithm race

Naive backtracking vs forward checking vs MRV vs MAC, side by side on the same puzzle.

💬

Explain

Every deduction in plain English, e.g. “r5c3 = 7: only place in box 4 for a 7”.

✨

Generate

Fresh puzzles that are proved to have exactly one solution, graded Easy to Extreme.

📊

Benchmarks

The reproducible experiments behind every figure in our report, charted live.

How it works

Each puzzle becomes a factor graph: variables Xi with domains, and factors fj(x) ∈ {0, 1}. A complete assignment solves the puzzle when every factor is satisfied:

weight(x) = f1(x) · f2(x) · … · fm(x) = 1

A 9×9 Sudoku has 81 variables and 810 binary “≠” factors. The solver works up an algorithm ladder, adding one technique at each step:

bt naive backtracking fc + forward checking mrv + minimum remaining values lcv + least constraining value mac arc consistency (AC-3) mac+ + hidden singles dpll CNF + DPLL

What each technique buys

1000 rated puzzles, 250 per difficulty bucket, 10 s limit per run. The solvers are pure Python, so the times compare techniques rather than measure raw speed.

23×fewer search nodes from MRV than from forward checking, the biggest single step
100%of puzzles solved by MAC, with a median of 44 ms
67 msfor the slowest puzzle with mac+, the fastest configuration
208 msmedian to solve a 16×16 with mac+, the only algorithm that finishes them
AlgorithmMedian nodesMedian msTimed out
bt17,8904,18532.9%
fc5,4464062.3%
mrv210270%
lcv219300%
mac113440%
mac+58240%
dpll4481030%
Search nodes per algorithm in each difficulty bucket
Search nodes per algorithm in each difficulty bucket. The bt and fc figures are lower bounds, because runs that hit the time limit count only the nodes they reached.

Ready to watch it think?

Load the world's hardest Sudoku, race four algorithms on it, or try to beat the engine yourself.

Open LogicPuzzleX →

Team

CSE 440, Section 1, Group 2

Md Shihabul Alam Shihab

CSP engine and search

Rayed Riasat Rabbi

Puzzle modeling, propagation, generator

Rifat Imtiaze Ruddro

Logic track, explanations, experiments

Sayma Akhter Snigdha

Web app, demo video, integration