Solving the Zebra puzzle (aka. Einstein puzzle) using the clpfd Prolog library
I have been given an exercise to solve the zebra puzzle using a constraint solver of my choice, and I tried it using the Prolog clpfd library . I am aware that there are other more idiomatic ways to solve this problem in Prolog, but this question is specifically about the clpfd package! So the specific variation of the puzzle (given that there are many of them) I'm trying to solve is this one: There are five houses The Englishman lives in the red house The Swedish own a dog The Danish likes to drink tea The green house is left to the white house The owner of the green house drinks coffee The