0% found this document useful (0 votes)
59 views44 pages

Chapter 4 Knowledge and Reasoning

Chapter 4 discusses knowledge and reasoning in intelligent agents, covering logical agents that use representations of knowledge about their environment to decide on actions, as well as knowledge-based agents that include a knowledge base and inference mechanism. Techniques of knowledge representation that are discussed include propositional logic, first-order logic, frames, and productions. Logical and knowledge-based agents utilize knowledge representation and reasoning to derive new information and determine appropriate actions.

Uploaded by

hamba Abebe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views44 pages

Chapter 4 Knowledge and Reasoning

Chapter 4 discusses knowledge and reasoning in intelligent agents, covering logical agents that use representations of knowledge about their environment to decide on actions, as well as knowledge-based agents that include a knowledge base and inference mechanism. Techniques of knowledge representation that are discussed include propositional logic, first-order logic, frames, and productions. Logical and knowledge-based agents utilize knowledge representation and reasoning to derive new information and determine appropriate actions.

Uploaded by

hamba Abebe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 44

Chapter 4

Knowledge and Reasoning

•Logical Agents
•Knowledge Based Agents
•Techniques of Knowledge Representation
•Propositional logic
•Inference of Propositional logic
•Predicate( First-Order ) Logic
•Inference in First-Order Logic
•Knowledge based Systems

Chapter 4: knowledge ang Reasoning 1


Logical Agents
• Agents with some representation of complex knowledge about the
world/its environment.
• It has a collection of sentences in logic.
• By using these logical sentences, logical agent decides what to do
by knowledge(conclusions).
• The conclusions are achieved by certain action or set of actions, is
appropriate to achieve its goals.
• Knowledge and reasoning are important to logical agents because
they enable successful behaviors to achieve a desired goal
• Uses inferences to derive new information the knowledge
combined with new inputs.
• Knowledge base:- a set of sentences in formal language
representing facts about the world.

Chapter 4: knowledge ang Reasoning 2


Knowledge-Based Agents
• Intelligent agents need knowledge the world to choose good
actions/decisions.
• Knowledge is sentences in knowledge representation
language (formal language).
• A sentence is an assertion about the world.
• Knowledge-Based Agent is composed of:
1. Knowledge base –domain specific content
2. Inference mechanism- domain independent algorithm

Chapter 4: knowledge ang Reasoning 3


Knowledge-Based Agents
• Central component of a Knowledge-Based
Agent is a Knowledge-Base
– A set of sentences in a formal language
• Sentences are expressed using a knowledge representation
language

• Two generic functions:


– TELL - add new sentences (facts) to the KB
• “Tell it what it needs to know”
– ASK - query what is known from the KB
• “Ask what to do next”

Chapter 4: knowledge ang Reasoning 4


Knowledge-Based Agents
• Knowledge-Based Agents must be able to:
Domain-
– Represent states and actions Independent
Algorithms
– Incorporate new percepts Inference Engine
– Update internal representations of Knowledge-Base
the world
– Deduce hidden properties of the world
– Deduce appropriate actions Domain-
Specific
Content

Chapter 4: knowledge ang Reasoning 5


Architecture of Knowledge-Based Agents

Environment

nment
Enviro
Input
from

KBA
Output

Inference Engine

Learning(updating
 ---------------------------- Knowledge)

Knowledge Base(KB)

Chapter 4: knowledge ang Reasoning 6


Knowledge-Based Agents

Chapter 4: knowledge ang Reasoning 7


Knowledge-Based Agents
• Declarative
– You can build a knowledge-based agent
simply by “TELLing” it what it needs to know

• Procedural
– Encode desired behaviors directly as program
code
• Minimizing the role of explicit representation and
reasoning can result in a much more efficient
system

Chapter 4: knowledge ang Reasoning 8


Techniques of Knowledge Representation

• There are mainly four ways of knowledge


representation
1. Logical representation
2. Semantic representation
3. Frame representation
4. Production representation
Logical representation

• It is a language with some concrete rules which deals


with propositions and has no ambiguity
representation
• It consists of precisely defined syntax and semantics
which supports the sound ,inferences.
• Each sentences can be translated into logics syntax
and semantics.
• Syntax defines well-formed sentence in the language.
• Semantics defines the truth of meaning of sentences.
Cont…

• Example:
Syntax
x + 2• >=
Sentences are well formed
y is a sentence
Semantics
x2 +•yThe
> is“meaning” of the sentence
not a sentence
• The truth of each sentence with respect to each possible world
(model)
x + 2 >= y is true iff x + 2 is no less than y

x + 2 >= y is true in a world where x = 7, y=1

x + 2 >= y is false in world where x = 0, y =6

Chapter 4: knowledge ang Reasoning 11


Cont…
• Logical representation can be explained by:
1. Propositional logic
2. First-order(predicate) logic
1. Propositional logic
• It is the simplest logic.
• A propositional logic is a declarative statement
that is either true or false.
• It can not be predicate, it can say either true or
false
Example
A- It is hot
B- It is humid
C- It is raining
Conditions
If it is humid, then it is hot
Corresponding propositional logic will be B A
If it is hot and humid, then it is not raining A B C
 So, proposition is a statement of a fact.
Syntax of propositional logic
Connectives Symbols Example
• Not A
• AND A B
• OR A B
• Implies A B
• (Biconditional If) A B
Cont…
• Negation Conjuction Disjunction
P P P q P q p q p q
T F T T T T T T
F T T F F T F T
F T F F T T
F T F F F F
Implication Bi-implication
p q p q p q p q
T T T T T T
T F F T F F
F T T F T F
F F T F F T
Inference rules
• Logical inference is used to create new sentences that
logically follow from a given set of predicate calculus
sentences (KB).
• An inference rule is sound if every sentence X
produced by an inference rule operating on a KB
logically follows from the KB. (That is, the inference
rule does not create any contradictions)
• An inference rule is complete if it is able to produce
every expression that logically follows from (is
entailed by) the KB. (Note the analogy to complete
search algorithms.)

Chapter 4: knowledge ang Reasoning 16


Example
• Consider the problem of representing the
following information:
– Every person is mortal.
– Confucius is a person.
– Confucius is mortal.
• How can these sentences be represented
so that we can infer the third sentence
from the first two?

Chapter 4: knowledge ang Reasoning 17


Inference Rule in Propositional logic
Limitations of propositional Logic

 We can not represent relationships like all, some or


none with propositional logic
Example
A-all the girls are intelligent
B-some apples are sweet
 Propositional logic has limited expressive power
 In propositional logic, we can not describe
statement in terms of their properties of logical
relationships.
2. First-order logic
• It also known as predicate logic i.e
• Programming by description
• describe the problem’s facts
• built in inference engine combines and uses facts and rules to make
inferences
• It is powerful language that develops
information's about the objects in a more easy
way and can also express the relationships
between those objects.
• It does not only assume that the world contains
facts like propositional logic but also assumes
objects,relations,functions.
First-order logic
• It models the world in terms of
– Objects, which are things with individual identities
– Properties of objects that distinguish them from other objects
– Relations that hold among sets of objects
– Functions, which are a subset of relations where there is only
one “value” for any given “input”
• Examples:
– Objects: Students, lectures, companies, cars ...
– Relations: Brother-of, bigger-than, outside, part-of, has-color,
occurs-after, owns, visits, precedes, ...
– Properties: blue, oval, even, large, ...
– Functions: father-of, best-friend, second-half, one-more-than ...

Chapter 4: knowledge ang Reasoning 28


Syntax of First-order logic
• Constant symbols, which represent individuals in the world
– Mary
– 3
– Green
– 1,2,A,Hamba…
• Function symbols, which map individuals to individuals
– father-of(Mary) = John
– color-of(Sky) = Blue
– Sqrt , ….
• Predicate symbols, which map individuals to truth values
– greater(5,3)
– green(Grass)
– color(Grass, Green)
– Brother, father,…

Chapter 4: knowledge ang Reasoning 29


Syntax of First-order logic
• Variable symbols
– E.g., x, y, foo
• Connectives
– Same as in Propositional Logic: not (), and (), or
(), implies (), if and only if (biconditional )
• Quantifiers
– Universal x or (Ax)
– Existential x or (Ex)

Chapter 4: knowledge ang Reasoning 30


Inference Rule in First-order logic
• Inference in First-order logic is used to deduce new facts sentences from
existing sentences.
• Some terminologies used in First-order logic:
Substitution: It is a fundamental operation performed on terms and formulas.
• It occurs in all inference system in First-order logic
E.g F[a/x] substitute a constant a in place of variable x
Equality: First-order logic does not only use predicate and terms for making atomic
sentences but also uses another way, which is equality.
E.g Brother(John)=smith
Here object referred by Brother(John) is similar to object referred by smith
The equality symbol can also be used with negation to represent that two terms are
not the same objects
E.g (x=y) ,which is equivalent to x = y
Rule or Production Representations

• Rules are called productions


• Rule have two parts
– condition part, premise -> IF
– action part ,conclusion-> THEN
• The action can add a fact to the knowledge
base, start a procedure or display a screen

Chapter 4: knowledge ang Reasoning 32


Representing knowledge

• Abstracting with rules


– translate quantitative to qualitative
– define technical terms
– support generalized reasoning
• make rules for user
– easy to understand
– help user follow decision logic

Chapter 4: knowledge ang Reasoning 33


Definitional Rules
• Help communicate and train users
• Help user understand vocabulary
• Promotes common agreement on terms for
expert, user and knowledge engineer
• IF you want more than one source file of
classes THEN use package keyword

Chapter 4: knowledge ang Reasoning 34


Rules support Generalizations
• Allow reasoning with from specialization
to generalizations
• Support classification of objects at higher
levels
• Support refinements

Chapter 4: knowledge ang Reasoning 35


Rules
Advantages Disadvantages
• Modular
May be difficult
style - easy
to understand
to add, update and
• delete
may demonstrate unpredictable behavior
•• natural for many
extra effort requiredproblem domains
to representing
• uncertain knowledge
structural knowledge may be represented

Chapter 4: knowledge ang Reasoning 36


Frame - natural representation
• Can accommodate a taxonomy of
knowledge
• contains defaults expectations
• represent procedural and declarative
knowledge

Chapter 4: knowledge ang Reasoning 37


knowledge-based system (KBSs) &
Knowledge
• What is a knowledge-based system?
– A system which is built around a knowledge
base. i.e. a collection of knowledge, taken
from a human, and stored in such a way that
the system can reason with it.
• What is knowledge?
– Knowledge is the sort of information that
people use to solve problems.

Chapter 4: knowledge ang Reasoning 38


Knowledge
• Knowledge includes:
– facts, concepts, procedures, models, heuristics,
examples.
• Knowledge may be:
– specific or general
– exact or fuzzy
– procedural or declarative

Chapter 4: knowledge ang Reasoning 39


Knowledge engineering
• The term “knowledge engineering” is often
used to mean the process of
– designing
– building
– installing
an expert system or other knowledge-based
system.
• Some authors use the term to mean just the
knowledge acquisition phase.
Chapter 4: knowledge ang Reasoning 40
Types of Knowledge
• Simple facts
• Complex organized knowledge
• procedure - how to knowledge
• meta-knowledge

Chapter 4: knowledge ang Reasoning 41


Experts
• An expert is an experienced practitioner in
his/her particular field. More than that,
he/she is a highly effective problem-solver
and decision-taker in that field.
• Experts have three qualities:
– They make good decisions
– They make those decisions quickly
– They are able to cope with a wide range of
problems.
As a result, they are valuable, highly-paid, and tend
to be overworked.
Chapter 4: knowledge ang Reasoning 42
Experts and expert systems
• Note that:
– The task that an expert system performs will
generally be regarded as difficult.
– An expert system almost always operates in a
rather narrow field of knowledge. The field of
knowledge is called the knowledge domain of
the system.
– There are many fields where expert systems can
usefully be built.
– There are many fields where they can’t.
Chapter 4: knowledge ang Reasoning 43
Thank You!!!!.

You might also like