I am new to Prolog as a whole and i am learning prolog query.
I am looking at this tutorial. http://www.cs.trincoll.edu/~ram/cpsc352/notes/prolog/factsrules.html and trying to play around with my own database.
Person("Mike", "123456"). //Person(Name,ID)
Info("CA", "123456", "17"). //Info(State, ID, Age)
What I am trying to do:
I am trying to return someone's age by their name and State. by doing the following query, this should return 17.
Age_Of(Name, State, N) :- Info(State, Person(Name, X), N).
i tried the above code and it returns "No". I believe that it is still evaluate as boolean. However, I want the function to return the actual age.
is_olderwould more truly be namedtwice_older. - Will Ness