Chapter 5 Part-I Intro&Wumpus World
Chapter 5 Part-I Intro&Wumpus World
Prepared By
Ms Lalita Randive
MIT (E), Aurangabad
A) Logical Agents: Knowledge Based Agents
Issues, Propositional Logic
Introduction: Knowledge
• Knowledge is a general term.
• knowing "that something is true or false". e.g. "that is the speed limit for
a car on a motorway" is a Declarative knowledge.
Knowledge Representation
• Knowledge and Representation are two distinct entities. They play central
but distinguishable roles in intelligent system.
• The doted line on top indicates the abstract reasoning process that a program
is intended to model.
• The solid lines on bottom indicates the concrete reasoning process that the
program performs
Approaches to knowledge Representation
1. Representational adequacy:- the ability to represent all of the kinds of knowledge that are
needed in that domain.
2. Inferential Adequacy: - the ability to manipulate the representation structures in such a way as
to derive new structures corresponding to new knowledge inferred from old
3. Inferential Efficiency: - the ability to incorporate into the knowledge structure additional
information that can be used to focus the attention of the inference mechanism in the most
promising directions.
4. Acquisitional Efficiency: - The ability to acquire new knowledge using automatic methods
wherever possible rather than reliance on human intervention
Note : To date no single system can optimizes all of the above properties.
Types of Knowledge Representation
1. Relational
2. Inheritable
3. Inferential
4. Declarative/Procedural.
1. Relational Knowledge
• provides a framework to compare two objects based on equivalent
attributes.
• any instance in which two different objects are compared is a relational type
of knowledge.
We can ask things like who "bats – left" and "throws – right".
2. Inheritable Knowledge
• Example : Baseball-player
isa : Adult-Male
Height : 6.1
Batting-average : 0.252
Algorithm : Property Inheritance
• Retrieve a value V for an attribute A of an instance object O. Steps to follow:
3. Else, if there is a value for the attribute instance; If not, then fail.
4. Else, move to the node corresponding to that value and look for a value for the
attribute A; If one is found, report it.
5. Else, do until there is no value for the “isa” attribute or until an answer is found :
(a) Get the value of the “isa” attribute and move to that node.
(b) See if there is a value for the attribute A; If yes, report it.
• This can be applied to the example of knowledge base
illustrated, in the previous slide, to derive answers to the
following queries :
–average(Three-Finger-Brown) = 0.106
• This new information does not require further data gathering form source, but does
require analysis of the given information to generate new knowledge.
• Given a set of relations and values, one may infer other values or relations.
• inference through predicate logic uses a set of logical operations to relate individual
data.
• the symbols used for the logic operations are : → " (implication), " ¬ " (not), " V "
(or), " Λ " (and), " ∀ " (for all), " ∃ " (there exists).
Examples of predicate logic statements :
Note :If more information is made available about these objects and their relations,
then more knowledge can be inferred.
4. Declarative/Procedural Knowledge
• Differences between Declarative/Procedural knowledge is not very clear.
Declarative knowledge:
Here, the knowledge is based on declarative facts about axioms and domains.
−axiom and domains thus simply exists and serve as declarative statements that
can stand alone.
• Procedural knowledge:
Here, the knowledge is a mapping process between domains that specify “what to do
when” and the representation is of “how to make it” rather than “what it is”.
−may have inferential efficiency, but no inferential adequacy and acquisitional efficiency.
−are represented as small programs that know how to do specific things, how to
proceed.
Example : A parser in a natural language has the knowledge that a noun phrase may
contain articles, adjectives and nouns. It thus accordingly call routines that know how to
1. Important Attributes : Any attribute of objects so basic that they occur in almost every
problem domain ?
2. Relationship among attributes: Any important relationship that exists among object
attributes ?
5. Finding Right structure : Given a large amount of knowledge stored, how can
relevant parts be accessed ?
1.Important Attributes
• There are attributes that are of general significance.
• There are two attributes "instance" and "isa", that are of general importance.
−High-level facts may not be adequate for inference while Low-level primitives may
require a lot of storage.
Example of Granularity : −
• Suppose we are interested in following facts
• John spotted Merry.
−This could be represented as Spotted (agent(John), object (Merry))
−Such a representation would make it easy to answer questions such are
Who spotted Merry ?
• Suppose we want to know
• Did John see Merry ?
−Given only one fact, we cannot discover that answer.
−We can add other facts,
such as Spotted (x , y) → saw (x , y)
and
• To describe these facts, the only way is to attach assertion to the sets
representing people, sheep, and English.
4. Set of objects
• The reason to represent sets of objects is :
−in hierarchical structure where node represent sets, the inheritance propagate set level assertion
down to individual.
−how to find a better structure if the one chosen initially turns out not to be appropriate.
• There is no good, general purpose method for solving all these problems. Some knowledge
representation techniques solve some of them
The Wumpus World Problem
• The Wumpus World’s agent is an example of a knowledge-based agent that represents
Knowledge representation, reasoning and planning.
• Knowledge-Based agent links general knowledge with current percepts to infer hidden
characters of current state before selecting actions.
2. The agent is given one arrow which it can use to kill the wumpus when facing it
(Wumpus screams when it is killed)
3. The adjacent rooms of the room with pits are filled with breeze
1. Performance measures:
•Agent gets the gold and return back safe = +1000 points
•Agent dies = -1000 points
•Each move of the agent = -1 point
•Agent uses the arrow = -10 points
2. Environment: A cave with 16(4×4) rooms
•Rooms adjacent (not diagonally) to the Wumpus are smelly
•Rooms adjacent (not diagonally) to the pit are breezy
•The room with the gold glitters
•Agent’s initial position – Room[1, 1] and facing right side
3. Actuators:
Devices that allow the agent to perform the following actions in the environment.
•Move forward
•Turn right
•Turn left
•Shoot
•Grab
•Release
4. Sensors:
Devices which helps the agent in sensing the following from the environment
• Breeze
• Stench
• Glitter
• Shout (When the Wumpus is killed)
• Crash (when the agent hits a wall)
Wumpus world
characterization
• Fully Observable
• Deterministic
• Episodic
• Static
• Discrete
• Single-agent?
Wumpus world
characterization
• Fully Observable No – only local perception
• Deterministic
• Episodic
• Static
• Discrete
• Single-agent?
Wumpus world
characterization
• Fully Observable No – only local perception
• Episodic
• Static
• Discrete
• Single-agent?
Wumpus world
characterization
• Fully Observable No – only local perception
• Static
• Discrete
• Single-agent?
Wumpus world
characterization
• Fully Observable No – only local perception
• Discrete
• Single-agent?
Wumpus world
characterization
• Fully Observable No – only local perception
• Discrete Yes
• Single-agent?
Wumpus world
characterization
• Fully Observable No – only local perception
• Discrete Yes
– going to have to reason to figure out where the gold is without getting killed!
Exploring the Wumpus World
Initial situation:
In each case where the agent draws a conclusion from the available Information, that
conclusion is guaranteed to be correct if the available Information is correct…