Prolog really blows my mind.

I recently released a match-burning logic puzzle app[1] based on a mensa calendar puzzle I saw and it took me a while to develop an (imperfect) solver algorithm in C#. Someone then told me that the general class of these puzzles is called "Thermometer Puzzles" and that there are a ton of Prolog-based solvers[2] out there.

This class of puzzle is not mentioned in the article, but I'm truly amazed at how versatile Prolog is at solving logic puzzles with so little code. I'm guessing the Prolog compiler is super complex compared to, say, a C compiler to be able to give developers that much power.

[1] https://play.google.com/store/apps/details?id=com.umvirate.e...

[2] https://github.com/zettca/ist.lp.thermometers/blob/master/th...

Norvig constructs a version of Prolog in his book - https://github.com/norvig/paip-lisp , see ch.11

Here - https://github.com/prolog8/awkprolog - is an interesting example of Prolog written in AWK. Not too long and neither too dense code.