Created
November 10, 2011 12:02
-
-
Save fedelebron/1354704 to your computer and use it in GitHub Desktop.
Part of a puzzle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
is_color(red). | |
is_color(blue). | |
is_color(yellow). | |
is_color(ivory). | |
is_color(green). | |
is_person(englishman). | |
is_person(spaniard). | |
is_person(norwegian). | |
is_person(japanese). | |
is_person(ukranian). | |
is_drink(coffee). | |
is_drink(milk). | |
is_drink(tea). | |
is_drink(orange_juice). | |
is_drink(water). | |
is_smoke(kools). | |
is_smoke(chesterfield). | |
is_smoke(old_gold). | |
is_smoke(lucky_strike). | |
is_smoke(parliament). | |
is_pet(fox). | |
is_pet(horse). | |
is_pet(snails). | |
is_pet(dog). | |
is_pet(zebra). | |
is_house(X) :- X < 5, X >= 0. | |
color(X, red) :- is_house(X), house(englishman, X). | |
owner(dog, spaniard). | |
drink(X, coffee) :- is_person(X), house(X, Y), color(Y, green). | |
drink(ukranian, tea). | |
color(X, green) :- is_house(X), Y is X - 1, color(Y, ivory). | |
owner(snails, X) :- is_person(X), smokes(X, old_gold). | |
smokes(X, kools) :- is_person(X), house(X, Y), color(Y, yellow). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment