Chapter 5
Chapter 5
Chapter 5
y: x: loyalto(x, y)
10
x: man(x) person(x)
loyalto(Marcus, Caesar)
11
12
15
Reasoning
1.
2.
3.
Is Marcus alive?
16
Reasoning
1.
2.
3.
17
Reasoning
1.
2.
3.
18
Resolution
Robinson, J.A. 1965. A machine-oriented logic
based on the resolution principle. Journal of ACM
12 (1): 23-41.
19
Resolution
The basic ideas
KB |
KB |false
20
Resolution
The basic ideas
KB |
KB |false
( ) ( )
( )
21
Resolution
The basic ideas
KB |
KB |false
( ) ( )
( )
22
2.
3.
23
24
25
26
28
= {John/y, John/x,
=
=
=
=
{John/y,
{John/y,
{John/y,
{John/y,
Jane/x, Jane/z}
v/x, v/z}
z/x, Jane/v}
z/x}
29
30
Eliminate .
P Q P Q
2.
3.
5.
Eliminate (Skolemization).
x: P(x) P(c)
x: y P(x, y) x: P(x, f(x))
6.
Skolem constant
Skolem function
Drop .
x: P(x) P(x)
7.
8.
9.
Eliminate .
2.
3.
4.
5.
Eliminate (Skolemization).
6.
Drop .
7.
8.
9.
Example
1.
2.
3.
4.
5.
6.
7.
8.
Example
1.
Man(Marcus).
2.
Pompeian(Marcus).
3.
x: Pompeian(x) Roman(x).
4.
ruler(Caesar).
x: y: loyalto(x, y).
8.
tryassassinate(Marcus, Caesar).
35
Example
Prove:
hate(Marcus, Caesar)
36
Question Answering
1. When did Marcus die?
2. Whom did Marcus hate?
3. Who tried to assassinate a ruler?
4. What happen in 79 A.D.?.
5. Did Marcus hate everyone?
37
Question Answering
PROLOG:
38
Question Answering
PROLOG:
39
Question Answering
PROLOG:
Question Answering
PROLOG:
B D, !, E
D
B, C
D, !, E, C
!, E, C
41
Question Answering
PROLOG:
B D, !, E
D
B, C
D, !, E, C
!, E, C
Homework
Exercises 1-13, Chapter 5, Rich&Knight AI Text Book
43