Wk 5 : Prolog Flashcards
Explain this statement :
“any fact produced by an application of modus ponens can be used as input to further rules.”
prolog can get truths about facts and rules that aren’t explicitly stated in the database. They are inferred from the data available. Rules have heads and bodies. If prolog can get the body proved true, it infers the head. this is called modus ponens. If it then encounters a second rule, it can use the truth implied by previous modus ponens to prove this current rule true or false.
what is a clause?
the facts and rules contained in the database.
What types of things exist in prolog?
facts, rules, queries. (facts are rules with empty bodies)
What is a predicate?
kind of like a procedure. it is a concept we find important.
the clauses that we write down concerning them are how we define what they mean and how they inter-relate.
what is a goal?
an item in the body of a rule.
whats difference between expressing logical conjunction and logical disjunction?
logical conjunction (‘and’) happens with a comma between goals on the right side of a rule.
logical disjunction (‘or’) happens by having two rules with the same head….. also the ‘;’ is an option as well, but is tradeoff between prolog simplicity and readability.
How do we talk about prolog to putting a value in a variable?
we say that prolog instantiates it, or binds it. Such as in the case:
“X is binded to Mia”
variables can ‘stand for’ or be ‘unified with’ different things.
What is the most awesome part of prolog that lies at the heart of its effectiveness?
The business of unifying variables with information in the knowledge base is the heart of Prolog. ….it’s Prolog’s ability to perform unification and return the values of the variable bindings to us that is crucial.