Hacker News new | comments | show | ask | jobs | submit login
Swift Sudoku Solver (realm.io)
25 points by astigsen on Nov 13, 2017 | hide | past | web | favorite | 4 comments

As the author mentioned, it cannot solve any boards where all unfilled cells have more than one possible value within the cell's domain. More information about the algorithm here:


You would need to implement something like forward checking or backtracking algorithm to solve all possible boards with higher cost.

Here is one in Swift I did a few years ago that does:


This one solves all 50 from Euler: https://projecteuler.net/problem=96

And here is a classic one in Python from Norvig:


Shameless plug, my OCaml implementation: https://github.com/eprochasson/norvig-ocaml

So this can't solve anything more than the most trivial boards? :/

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact