2 ms·
> I'd be very interested to see what an algorithm that solves any valid sudoku puzzle looks like. You might be interested in the article linked to by this post
by jules 16y ago
> I'd be very interested to see what an algorithm that solves any valid sudoku puzzle looks like.
You might be interested in the article linked to by this post.
- ondrasej 16y agoThe code in the post is based on depth-first search, which basically is a trial and error approach. A well implemented and effective one thanks to constraint propagation, but it is still trial and error. And there are cases, in which backtracking (trial and error) is necessary - at least one of them is documented in the post (the puzzle "hard1" that took 188 seconds).
- jules 16y agoThere is no meaningful difference between trial and error and without trial and error. It makes this no less of an algorithm.