3 ms·
My favorite way to solve constraint satisfaction problems is by using the the excellent CLP(FD) or CLP(Z) libraries for Prolog. A sudoku solver can be written
by cbarrick 5y ago
My favorite way to solve constraint satisfaction problems is by using the the excellent CLP(FD) or CLP(Z) libraries for Prolog.
A sudoku solver can be written in just a few lines [1].
[1]: https://github.com/triska/clpfd/blob/master/sudoku.pl https://github.com/triska/clpfd/blob/master/sudoku.pl