Figures running hurdles on a circuit board

Logic for Artificial Intelligence

“Logic has both seductive advantages and bothersome disadvantages.”

Patrick Winston, Artificial Intelligence, pp 283

Logic in artificial intelligence can be used to help an agent create rules of inference. It provides a formal framework for creating if-then statements. Formal logic statements can be difficult for beginners because of the symbols and vocabulary used. Below is a cheat sheet for some of the basic symbols and definitions.

SymbolDefinition
Logical conjunction. In most instances it will be used as an AND operator.
Logical disjunction.  In most instances it will be used as an ORoperator.
Universal quantifier. Placed in front of a statement that includes ALL entities in the agent’s universe. 
Existential quantifier. Placed in front of a statement where it applies to at least one entity in the agent’s universe.
¬ Negation. The statement is only true if the condition is false.
WordDefinition
ConjunctionAnd. Means the truth of a set of operands is true if and only if all of its operands are true. Symbol used to represent this operator is typically ∧ or &.
ConjuctAn operand of a conjunction.
DisjunctionOr. Means the truth of a set of operands is true if and only if one or more of its operands is true.
DisjunctAn operand of a disjunct. 
PredicatesA boolean valued function or a relationship. A ∧ B = True or A and B have a specific relationship.
modus ponusThe rule of inference. Given A is true and B is true then (A and B) is true
monotonicA property that states a “function is monotonic if, for every combination of inputs, switching one of the inputs from false to true can only cause the output to switch from false to true and not from true to false”

Logic focuses on using knowledge in a provable and correct way. When it is used in AI it does not prove out that the claims are true. If an agent is taught that all birds can fly, it will be able to use logic to infer that a dog is not a bird. However, it will run into problems when classifying a penguin. 

It is important to keep in mind that logic is a weak representation of certain kinds of knowledge. The difference between water and ice is an example of knowledge that would be difficult to represent using logic. Determining how good a “deal” is would also be better suited to a different knowledge representation. If dealing with a change of state or ranking options, using a different knowledge system would be more appropriate.

Leave a Comment