Artificial Intelligence:: First-Order Logic
Artificial Intelligence:: First-Order Logic
First-Order Logic
Course V231
Department of Computing
Imperial College, London
Jeremy Gow
AI & Logic
Observation of environment
Logical reasoning
Deduction (mathematician)
{A, AB} so B
Abduction (detective)
{B, AB} so A
Induction (scientist)
This lecture
Brackets: ( and )
Connectives
not (negation) also -
/ and (conjunction) also & , . (or just PQ)
\ or (disjunction) also | ; +
if then (implication) also = .
if & only if (equivalence) also =
Propositional Sentence
A sentence is either
1. A constant or variable
2. P, P / Q, P \ Q, P Q, P Q or (P)
for formulae P and Q
(A / B) (B / A)
A / A
/ A A
Propositional Semantics
When is (P Q) (P \ Q) true?
P: 5 is even, Q: 7 is even
M = Is Monday, W = Is Wednesday
and became or
A term is
quantifiers V, H
father(john), colour(apple), (1 + 2) + 3
(p):
n
{true, false} for predicate p
= (equality) is a predicate
Ground Formulae
Terms: father(X), (X + 2) + Y
For model (, )
Not procedural
Logic programming
P
1
/ ... / P
m
is the body, H is the head
Often assume Vs
brother(john, X)
Prolog Programs
In Prolog:
students_awake(X) :- good_lecturer(X), interesting_subject(X)
students_listening(X) :- good_lecturer(X), interesting_subject(X)
Search in Prolog
So pm(brown) is false
AND-parallelism
P1 takes brother(X, F)