Session 20
Learning about Prolog
I gave you an introduction to using Prolog in the labs, by playing with
this knowledgebase
- hoosier(Schafer)
-
x
hoosier(x) -> likes (x,Basketball)
-
x,y
childOf(x,y) AND likes (y, Basketball) -> likes (x,Basketball)
-
y
likes(y,Basketball) -> likes(y,March)
-
daughterOf(Margaret,Schafer)
-
x,y daughterOf( x, y )-> childOf( x, y )
-
hoosier(Wallingford)
- hoosier(Letterman)
- daughterOf(Sarah,Wallingford)