Knowledge Based Agent
Knowledge Based Agent
Intelligence
Lecturer
Rabiya Tahir
[email protected]
Lecture # 09
Knowledge Based Agent
Today’s Lecture
• A knowledge-based agent
• The Wumpus World
• Syntax , semantics
• What is logic?
3
Big Idea
• Knowledge Level.
• The most abstract level: describe agent by saying what it knows.
• Example: A taxi agent might know that the Golden Gate Bridge
connects San Francisco with the Marin County.
• Logical Level.
• The level at which the knowledge is encoded into sentences.
• Example: Links(GoldenGateBridge, SanFrancisco, MarinCounty).
• Implementation Level.
• The physical representation of the sentences in the logical level.
• Example: ‘(links goldengatebridge sanfrancisco
marincounty) 6
The Wumpus World environment
• go forward
• turn right 90 degrees
• turn left 90 degrees
• grab means pick up an object that is in the same square as the agent
• shoot means fire an arrow in a straight line in the direction the agent is
looking. The arrow continues until it either hits and kills the wumpus or
hits the wall. The agent has only one arrow. Only the first shot has any
effect.
• climb is used to leave the cave. Only effective in start field.
• die, if the agent enters a square with a pit or a live wumpus. (No take-
backs!)
10
Wumpus goal
The agent’s goal is to find the gold and bring it back to the start as quickly
as possible, without getting killed.
11
Wumpus world characterization
14
Later
15
Exploring a wumpus world
AA agent
agent
BB breeze
breeze
GG glitter
glitter
OK
OK safe
safecell
cell
PP pit
pit
SS stench
stench
WW wumpus
wumpus
16
Exploring a wumpus world
AA agent
agent
BB breeze
breeze
GG glitter
glitter
OK
OK safe
safecell
cell
PP pit
pit
SS stench
stench
WW wumpus
wumpus
17
Exploring a wumpus world
AA agent
agent
BB breeze
breeze
GG glitter
glitter
OK
OK safe
safecell
cell
PP pit
pit
SS stench
stench
WW wumpus
wumpus
18
Exploring a wumpus world
AA agent
agent
BB breeze
breeze
GG glitter
glitter
OK
OK safe
safecell
cell
PP pit
pit
SS stench
stench
WW wumpus
wumpus
19
Exploring a wumpus world
AA agent
agent
BB breeze
breeze
GG glitter
glitter
OK
OK safe
safecell
cell
PP pit
pit
SS stench
stench
WW wumpus
wumpus
20
Exploring a wumpus world
AA agent
agent
BB breeze
breeze
GG glitter
glitter
OK
OK safe
safecell
cell
PP pit
pit
SS stench
stench
WW wumpus
wumpus
21
Exploring a wumpus world
AA agent
agent
BB breeze
breeze
GG glitter
glitter
OK
OK safe
safecell
cell
PP pit
pit
SS stench
stench
WW wumpus
wumpus
22
Representing Knowledge
how to drive .
Inference, Soundness, Completeness
• KB ├i α , sentence α can be derived from KB by
procedure i
• Soundness: i is sound if whenever KB ├i α, it is also true
that KB╞ α
• Completeness: i is complete if whenever KB╞ α, it is
also true that KB ├i α
• Preview: we will define a logic (first-order logic) which is
expressive enough to say almost anything of interest,
and for which there exists a sound and complete
inference procedure. That is, the procedure will answer
any question whose answer follows from what is known
by the KB.
28
Logic as a KR language
Higher Order
Probabilistic
Logic First Order
29
Ontology and epistemology
30
Summery of Today’s Lecture
• A knowledge-based agent
• The Wumpus World
• Syntax , semantics
31