3 ms·
Yes, a modern Prolog with CLP(FD) is very well suited to solve logic puzzles. There are many examples on the web, but you can look at this book on ECLiPSe CLP (
by yaantc 8y ago
Yes, a modern Prolog with CLP(FD) is very well suited to solve logic puzzles. There are many examples on the web, but you can look at this book on ECLiPSe CLP (nothing to do with the IDE, it's a Prolog system with good constraints support):
http://www.anclp.pl/ http://www.anclp.pl/
However, nowadays I'd start with Minizinc and its default solver gecode:
http://www.minizinc.org/ http://www.minizinc.org/
For combinatorial puzzles it's even easier than Prolog and very efficient. Just read the short tutorial and you should be good to go solving the Zebra/Einstein problem or similar:
http://www.minizinc.org/downloads/doc-latest/minizinc-tute.pdf http://www.minizinc.org/downloads/doc-latest/minizinc-tute.p...
Minizinc is purely declarative. When more control is needed then you can use Prolog.