Lecture 20
Logical Agents
Marco Chiarandini
Department of Mathematics & Computer Science University of Southern Denmark
Logical Agents Marco Chiarandini Department of Mathematics & - - PowerPoint PPT Presentation
Lecture 20 Logical Agents Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Slides by Stuart Russell and Peter Norvig Knowledge-based Agents Course Overview Logic in General Introduction
Department of Mathematics & Computer Science University of Southern Denmark
Knowledge-based Agents Logic in General
◮ Knowledge representation and
◮ Propositional logic ◮ First order logic ◮ Inference ◮ Plannning 2
Knowledge-based Agents Logic in General
3
Knowledge-based Agents Logic in General
4
Knowledge-based Agents Logic in General
5
Knowledge-based Agents Logic in General
Breeze Breeze Breeze Breeze Breeze Stench Stench Breeze
PIT PIT PIT
1 2 3 4 1 2 3 4 START
Gold Stench
7
Knowledge-based Agents Logic in General
Breeze Breeze Breeze Breeze Breeze Stench Stench Breeze
PIT PIT PIT
1 2 3 4 1 2 3 4
START
Gold Stench
8
Knowledge-based Agents Logic in General
9
Knowledge-based Agents Logic in General
11
Knowledge-based Agents Logic in General
12
Knowledge-based Agents Logic in General
13
Knowledge-based Agents Logic in General
x x x x x x x x x x x x x x x x x x x x x x x x x xx x x x x x x x x x x xx x x x x x x x x
14
Knowledge-based Agents Logic in General
A A B
15
Knowledge-based Agents Logic in General
21
Propositional Logic Inference in PL
22
Propositional Logic Inference in PL
23
Propositional Logic Inference in PL
24
Propositional Logic Inference in PL
26
Propositional Logic Inference in PL
27
Propositional Logic Inference in PL
28
Propositional Logic Inference in PL
29
Propositional Logic Inference in PL
30
Propositional Logic Inference in PL
31
Propositional Logic Inference in PL
33
Propositional Logic Inference in PL
34
Propositional Logic Inference in PL
35
Propositional Logic Inference in PL
36
Propositional Logic Inference in PL
OK OK OK A A B P? P? A S OK
A
38
Propositional Logic Inference in PL
39
Propositional Logic Inference in PL
40
Propositional Logic Inference in PL
41
Propositional Logic Inference in PL
◮ assign false to Pi if there is a clause in RC(S) containing literal ¬Pi and
◮ otherwise, assign Pi true.
42
Propositional Logic Inference in PL
44
Propositional Logic Inference in PL
45
Propositional Logic Inference in PL
47
Propositional Logic Inference in PL
◮ FC reaches a fixed point where no new atomic sentences are derived ◮ Consider the final state as a model m, assigning true/false to symbols ◮ Every clause in the original KB is true in m
◮ Hence m is a model of KB ◮ If KB |
48
Propositional Logic Inference in PL
49
Propositional Logic Inference in PL
50
Propositional Logic Inference in PL
51
Propositional Logic Inference in PL
52
Propositional Logic Inference in PL
53
Propositional Logic Inference in PL
54
Propositional Logic Inference in PL
55
First Order Logic Situation calculus
56
First Order Logic Situation calculus
57
First Order Logic Situation calculus
58
First Order Logic Situation calculus
60
First Order Logic Situation calculus
61
First Order Logic Situation calculus
62
First Order Logic Situation calculus
◮ Objects: people, houses, numbers, theories, Ronald McDonald, colors,
◮ Relations/Predicates: red, round, bogus, prime, multistoried . . .,
◮ Functions: father of, best friend, successor, one more than, times, end of
63
First Order Logic Situation calculus
64
First Order Logic Situation calculus
65
First Order Logic Situation calculus
66
First Order Logic Situation calculus
67
First Order Logic Situation calculus
68
First Order Logic Situation calculus
69
First Order Logic Situation calculus
71
First Order Logic Situation calculus
72
First Order Logic Situation calculus
73
First Order Logic Situation calculus
74
First Order Logic Situation calculus
75
First Order Logic Situation calculus
◮ ∀ x ∀ y
◮ ∃ x ∃ y
◮ ∃ x ∀ y
◮ ∃ x ∀ y Loves(x, y)
◮ Quantifier duality: each can be expressed using the other
76
First Order Logic Situation calculus
77
First Order Logic Situation calculus
78
First Order Logic Situation calculus
79
First Order Logic Situation calculus
80
First Order Logic Situation calculus
81
First Order Logic Situation calculus
82
First Order Logic Situation calculus
PIT PIT PIT
G
d
PIT PIT PIT
G
d
83
First Order Logic Situation calculus
◮ “Effect” axiom—describe changes due to action
◮ “Frame” axiom—describe non-changes due to action
84
First Order Logic Situation calculus
85
First Order Logic Situation calculus
86
First Order Logic Situation calculus
87
First Order Logic Situation calculus
◮ Identify the task ◮ Assemble the relevant knowledge ◮ Decide on a vocabulary of predicates, functions, and constants ◮ Encode general knowledge about the domain ◮ Encode a description of the specific problem instance (input data)
◮ Pose queries to the inference procedure and get answers ◮ Debug the knowledge base
88
First Order Logic Situation calculus
89