I found this prolog program to solve the five houses puzzle (Einestine's puzzle) on the net. Given that I don't know Prolog bsides that it's a predicative language, I started to learn it last night.