Unit 3 Topic 1 Knowledge Representation Reasoning
Unit 3 Topic 1 Knowledge Representation Reasoning
& Reasoning
• Human knows things, which is knowledge and as per their knowledge they
perform various actions in the real world.
2
Conti…
Hence we can describe Knowledge representation as following:
3
Conti…
• It is responsible for representing information about the real
world so that a computer can understand and can utilize this
knowledge to solve the complex real world problems such as
diagnosis a medical condition or communicating with humans in
natural language.
4
Conti…
• It is also a way which describes how we can represent knowledge in
artificial intelligence.
5
Conti…
Following are the kind of knowledge which needs to be
represented in AI systems:
• Object
• Events
• Performance
• Meta-knowledge
• Facts
• Knowledge-Base
• Knowledge
6
Conti…
• Object: All the facts about objects in our world domain. E.g.,
Guitars contains strings, trumpets are brass instruments.
• Events: Events are the actions which occur in our world.
• Performance: It describe behavior which involves knowledge
about how to do things.
• Meta-knowledge: It is knowledge about what we know.
7
Conti…
• Facts: Facts are the truths about the real world and what we represent.
1. Representational Accuracy: KR system should have the ability to represent all kind of
required knowledge.
3. Inferential Efficiency: The ability to direct the inferential knowledge mechanism into the
most productive directions by storing appropriate guides.
4. Acquisitional efficiency: The ability to acquire the new knowledge easily using automatic
methods.
9
Types of knowledge
Knowledge is the information about a domain that can be used to
solve problems in that domain.
10
Conti…
1. Declarative Knowledge:
11
Conti…
2. Procedural Knowledge
4. Heuristic knowledge:
•Heuristic knowledge is representing knowledge of
some experts in a filed or subject.
•Heuristic knowledge is rules of thumb based on
previous experiences, awareness of approaches, and
which are good to work but not guaranteed.
13
Conti…
5. Structural knowledge:
14
Knowledge Representation
• Knowledge Representation in AI describes the
representation of knowledge.
15
Conti….
16
01/27/25 By- Ms. Richa Singh
Conti….
17
Conti…
• The Perception component retrieves data or
information from the environment. with the help of
this component, you can retrieve data from the
environment, find out the source of noises and check
if the AI was damaged by anything.
18
Conti…
• Then, there is the Learning Component that learns
from the captured data by the perception component.
19
Conti…
• The main component in the cycle is Knowledge
Representation and Reasoning which shows the
human-like intelligence in the machines. Knowledge
representation is all about understanding intelligence.
20
Conti…
• The Planning and Execution components depend
on the analysis of knowledge representation and
reasoning.
• Logical Representation
• Semantic Network
• Frame Representation
• Production Rules
22
Conti…
23
By- Ms. Richa Singh
Conti…
1. Logical Representation
• Logical representation is a language with some concrete
rules which deals with propositions and has no
ambiguity in representation.
Semantics
• Semantics are the rules by which we can interpret the
sentence in the logic.
• Semantic also involves assigning a meaning to each
sentence.
25
Conti…
Logical representation can be categorized into mainly two logics:
• Propositional Logics
• Predicate logics
Advantages
• Logical representation enables us to do logical reasoning.
• Logical representation is the basis for the programming languages.
Disadvantages
• Logical representations have some restrictions and are challenging to
work with.
• Logical representation technique may not be very natural, and
inference may not be so efficient.
26
Conti…
2. Semantic Network Representation
• Semantic networks are alternative of predicate logic
for knowledge representation.
• In Semantic networks, we can represent our
knowledge in the form of graphical networks.
• This network consists of nodes representing objects
and arcs which describe the relationship between
those objects.
• Semantic networks can categorize the object in
different forms and can also link those objects.
• Semantic networks are easy to understand and can be
easily extended.
27
Conti…
Example: Following are some statements which we need
to represent in the form of nodes and arcs.
Statements:
• Jerry is a cat.
• Jerry is a mammal
• Jerry is owned by Priya.
• Jerry is White colored.
• All Mammals are animal.
29
Conti…
Advantages
• Semantic networks are a natural representation of
knowledge.
• Semantic networks convey meaning in a transparent
manner.
• These networks are simple and easily understandable.
Drawbacks
• Semantic networks try to model human-like memory
(Which has millions of neurons and links) to store the
information, but in practice, it is not possible to build
such a vast semantic network.
30
Conti…
Drawbacks
• Semantic networks take more computational time at
runtime as we need to traverse the complete network tree
to answer some questions. It might be possible in the
worst case scenario that after traversing the entire tree,
we find that the solution does not exist in this network.
• These types of representations are inadequate as they do
not have any equivalent quantifier, e.g., for all, for some,
none, etc.
• Semantic networks do not have any standard definition
for the link names.
• These networks are not intelligent and depend on the
creator of the system.
31
Conti…
3. Frame Representation
• A frame is a record like structure which consists of a
collection of attributes and its values to describe an
entity in the world.
• Frames are the AI data structure which divides
knowledge into substructures by representing
stereotypes situations.
• It consists of a collection of slots and slot values.
These slots may be of any type and sizes.
• Slots have names and values which are called facets.
32
Conti…
Facets
• The various aspects of a slot is known as Facets.
• Facets are features of frames which enable us to put
constraints on the frames.
• Example: IF-NEEDED facts are called when data of
any particular slot is needed.
• A frame may consist of any number of slots, and a
slot may include any number of facets and facets
may have any number of values.
• A frame is also known as slot-filter knowledge
representation in artificial intelligence.
33
Conti…
• Frames are derived from semantic networks and later
evolved into our modern-day classes and objects.
• A single frame is not much useful.
• Frames system consist of a collection of frames
which are connected.
• In the frame, knowledge about an object or event can
be stored together in the knowledge base.
• The frame is a type of technology which is widely
used in various applications including Natural
language processing and machine visions.
34
Conti…
• Example 1: Let's take an example of a frame for a
book
Slots Filters
Title Artificial Intelligence
Genre Computer Science
Author Peter Norvig
Edition Third Edition
Year 1996
Page 1152
35
Conti…
• Example 2: Let's suppose we are taking an entity,
Peter. Peter is an engineer as a profession, and his
age is 25, he lives in city London, and the country is
England. So following is the frame representation for
this:
Slots Filter
Name Peter
Profession engineer
City London
Country England
Age 25
36
Conti…
Advantages
• The frame knowledge representation makes the
programming easier by grouping the related data.
• The frame representation is comparably flexible and
used by many applications in AI.
• It is very easy to add slots for new attribute and
relations.
• It is easy to include default data and to search for
missing values.
• Frame representation is easy to understand and
visualize.
37
Conti…
Disadvantages
• In frame system inference mechanism is not be
easily processed.
• Inference mechanism cannot be smoothly proceeded
by frame representation.
• Frame representation has a much generalized
approach.
38
Conti…
4. Production Rules
• Production rules system consist of (condition,
action) pairs which mean, "If condition then action".
• It has mainly three parts:
The set of production rules
Working Memory
The recognize-act-cycle
39
Conti…
• In production rules agent checks for the condition
and if the condition exists then production rule fires
and corresponding action is carried out.
• The condition part of the rule determines which rule
may be applied to a problem.
• And the action part carries out the associated
problem-solving steps.
• This complete process is called a recognize-act
cycle.
40
Conti…
• The working memory contains the description of the
current state of problems-solving and rule can write
knowledge to the working memory.
• This knowledge match and may fire other rules.
• If there is a new situation (state) generates, then
multiple production rules will be fired together, this
is called conflict set.
• In this situation, the agent needs to select a rule from
these sets, and it is called a conflict resolution.
41
Conti…
Example
• IF (at bus stop AND bus arrives) THEN action (get
into the bus)
• IF (on the bus AND paid AND empty seat) THEN
action (sit down).
• IF (on bus AND unpaid) THEN action (pay charges).
• IF (bus arrives at destination) THEN action (get
down from the bus).
42
Conti…
Advantages
• The production rules are expressed in natural language.
• The production rules are highly modular, so we can
easily remove, add or modify an individual rule.
Disadvantages
• Production rule system does not exhibit any learning
capabilities, as it does not store the result of the problem
for the future uses.
• During the execution of the program, many rules may be
active hence rule-based production systems are
inefficient.
43
Approaches to knowledge
representation
• There are mainly four approaches to knowledge
representation, which are given below:
44
Conti…
1. Simple relational knowledge
• It is the simplest way of storing facts which uses the
relational method, and each fact about a set of the
object is set out systematically in columns.
• This approach of knowledge representation is
famous in database systems where the relationship
between different entities is represented.
• This approach has little opportunity for inference.
Player Weight Age
Example: Player1 65 23
Player2 58 18
Player3 75 24
45
Conti…
2. Inheritable knowledge
• In the inheritable knowledge approach, all data must
be stored into a hierarchy of classes.
• All classes should be arranged in a generalized form
or a hierarchal manner.
• In this approach, we apply inheritance property.
• Elements inherit values from other members of a
class.
• This approach contains inheritable knowledge which
shows a relation between instance and class, and it is
called instance relation.
46
01/27/25 By- Ms. Richa Singh
Conti…
• Every individual frame can represent the collection
of attributes and its value.
• In this approach, objects and values are represented
in Boxed nodes.
• We use Arrows which point from objects to their
values.
47
Conti…
• Example
48
Conti…
3. Inferential knowledge:
• Inferential knowledge approach represents
knowledge in the form of formal logics.
• This approach can be used to derive more facts.
• It guaranteed correctness.
51
Types of Reasoning
52
Conti…
1. Deductive reasoning
•Deductive reasoning is deducing new information
from logically related known information.
•It is the form of valid reasoning, which means the
argument's conclusion must be true when the premises
are true.
•Deductive reasoning is a type of propositional logic
in AI, and it requires various rules and facts.
•It is sometimes referred to as top-down reasoning,
and contradictory to inductive reasoning.
•In deductive reasoning, the truth of the premises
guarantees the truth of the conclusion.
53
Conti…
Example:
• Premise-1: All the human eats veggies
• Premise-2: Suresh is human.
• Conclusion: Suresh eats veggies.
• The general process of deductive reasoning is given
below:
54
Conti…
2. Inductive Reasoning
•Inductive reasoning is a form of reasoning to arrive at
a conclusion using limited sets of facts by the process
of generalization.
•It starts with the series of specific facts or data and
reaches to a general statement or conclusion.
•Inductive reasoning is a type of propositional logic,
which is also known as cause-effect reasoning or
bottom-up reasoning.
•In inductive reasoning, we use historical data or
various premises to generate a generic rule, for which
premises support the conclusion.
55
Conti…
Example:
• Premise: All of the pigeons we have seen in the zoo
are white.
• Conclusion: Therefore, we can expect all the pigeons
to be white.
56
01/27/25 By- Ms. Richa Singh
Conti…
3. Abductive reasoning
•Abductive reasoning is a form of logical reasoning which
starts with single or multiple observations then seeks to
find the most likely explanation or conclusion for the
observation.
•Abductive reasoning is an extension of deductive
reasoning, but in abductive reasoning, the premises do not
guarantee the conclusion.
Example
•Implication: Cricket ground is wet if it is raining
•Axiom: Cricket ground is wet.
Conclusion It is raining.
57
01/27/25 By- Ms. Richa Singh
Conti…
58
01/27/25 By- Ms. Richa Singh
Conti…
Example
• One person can be at one place at a time.
• If I put my hand in a fire, then it will burn.
59
01/27/25 By- Ms. Richa Singh
Conti…
5. Monotonic Reasoning
•In monotonic reasoning, once the conclusion is taken,
then it will remain the same even if we add some other
information to existing information in our knowledge
base.
•In monotonic reasoning, adding knowledge does not
decrease the set of prepositions that can be derived.
•To solve monotonic problems, we can derive the valid
conclusion from the available facts only, and it will not be
affected by new facts.
•Monotonic reasoning is not useful for the real-time
systems, as in real time, facts get changed, so we cannot
use monotonic reasoning.
60
01/27/25 By- Ms. Richa Singh
Conti…
Example
• Earth revolves around the Sun.
62
01/27/25 By- Ms. Richa Singh
Conti…
6. Non-monotonic Reasoning
•In Non-monotonic reasoning, some conclusions may
be invalidated if we add some more information to our
knowledge base.
•Logic will be said as non-monotonic if some
conclusions can be invalidated by adding more
knowledge into our knowledge base.
•Non-monotonic reasoning deals with incomplete and
uncertain models.
•"Human perceptions for various things in daily life,
"is a general example of non-monotonic reasoning.
63
01/27/25 By- Ms. Richa Singh
Conti…
Example
Let suppose the knowledge base contains the following
knowledge:
• Birds can fly
• Penguins cannot fly
• Pitty is a bird
Advantages
• For real-world systems such as Robot navigation, we
can use non-monotonic reasoning.
• In Non-monotonic reasoning, we can choose
probabilistic facts or can make assumptions.
Disadvantages
• In non-monotonic reasoning, the old facts may be
invalidated by adding new sentences.
• It cannot be used for theorem proving.
65
01/27/25 By- Ms. Richa Singh
Thanks
66
01/27/25 By- Ms. Richa Singh