The "Einstein" Problem

2016/09/19 code prolog

Ever since I heard about Prolog, I wanted to try out the so-called Einstein Puzzle in it.

So, after finishing the Prolog chapter in Seven Languages in Seven Weeks, I tried to make as clean an implementation as possible ("Just state the rules, and you'll get a solution").

It's... not far from truth, to be honest. The auxiliary functions are a bit funky, but the truth is that the program is about as concise as advertised.

See also: The solution that I worked off of, after I requested some assistance on IRC, written by Eazar