Created
January 24, 2020 06:54
-
-
Save gilbert/a2afe0e258f3a8059a688286e4165f3f to your computer and use it in GitHub Desktop.
Prolog learning
This file contains hidden or 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
dog(rover). | |
dog(felix). | |
dog(benny). | |
has_owner(rover). | |
has_owner(benny). | |
is_happy(Dog) :- has_owner(Dog). | |
is_happy(Dog) :- breed(Dog, poodle). | |
breed(rover, pug). | |
breed(felix, poodle). | |
breed(benny, beagle). | |
adjacent_to(a, b). | |
adjacent_to(e, f). | |
adjacent_to(X, Y) :- adjacent_to(Y, X). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment