0% found this document useful (0 votes)
22 views66 pages

Unit 3 Topic 1 Knowledge Representation Reasoning

Uploaded by

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

Unit 3 Topic 1 Knowledge Representation Reasoning

Uploaded by

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

Knowledge Representation

& Reasoning

Dr. Gaurav Srivastav


CSE(AI)
Basic
• Humans are best at understanding, reasoning, and interpreting knowledge.

• Human knows things, which is knowledge and as per their knowledge they
perform various actions in the real world.

• But how machines do all these things comes under knowledge


representation and reasoning.

2
Conti…
Hence we can describe Knowledge representation as following:

•Knowledge representation and reasoning is the part of Artificial


intelligence which concerned with AI agents thinking and how
thinking contributes to intelligent behavior of agents.

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.

• Knowledge representation is not just storing data into some database,


but it also enables an intelligent machine to learn from
that knowledge and experiences so that it can behave intelligently like a
human.

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.

• Knowledge-Base: The central component of the knowledge-based


agents is the knowledge base. It is represented as KB. The
Knowledgebase is a group of the Sentences (Here, sentences are used as
a technical term and not identical with the English language).

• Knowledge: Knowledge is awareness or familiarity gained by


experiences of facts, data, and situations.
8
Requirements for knowledge Representation
system
• A good knowledge representation system must possess the following properties.

1. Representational Accuracy: KR system should have the ability to represent all kind of
required knowledge.

2. Inferential Adequacy: KR system should have ability to manipulate the representational


structures to produce new knowledge corresponding to existing structure.

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:

•Declarative knowledge is to know about something.

•It includes concepts, facts, and objects.

•It is also called descriptive knowledge and expressed in


declarative sentences.

•It is simpler than procedural language.

11
Conti…
2. Procedural Knowledge

•It is also known as imperative knowledge.

•Procedural knowledge is a type of knowledge which is


responsible for knowing how to do something.

•It can be directly applied to any task.

•It includes rules, strategies, procedures, agendas, etc.

•Procedural knowledge depends on the task on which it


can be applied.
12
Conti…
3. Meta-knowledge:

•Knowledge about the other types of knowledge is


called Meta-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:

•Structural knowledge is basic knowledge to problem-


solving.

•It describes relationships between various concepts


such as kind of, part of, and grouping of something.

•It describes the relationship that exists between


concepts or objects.

14
Knowledge Representation
• Knowledge Representation in AI describes the
representation of knowledge.

• Basically, it is a study of how the beliefs, intentions,


and judgments of an intelligent agent can be
expressed suitably for automated reasoning.

• One of the primary purposes of Knowledge


Representation includes modeling intelligent
behavior for an agent.

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.

• Also, it defines how to respond when any sense has


been detected.

18
Conti…
• Then, there is the Learning Component that learns
from the captured data by the perception component.

• The goal is to build computers that can be taught


instead of programming them.

• Learning focuses on the process of self-


improvement. In order to learn new things, the
system requires knowledge acquisition, inference,
acquisition of heuristics, faster searches, etc.

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.

• Instead of trying to understand or build brains from the


bottom up, its goal is to understand and build intelligent
behavior from the top-down and focus on what an agent
needs to know in order to behave intelligently.

• Also, it defines how automated reasoning procedures can


make this knowledge available as needed.

20
Conti…
• The Planning and Execution components depend
on the analysis of knowledge representation and
reasoning.

• Here, planning includes giving an initial state,


finding their preconditions and effects, and a
sequence of actions to achieve a state in which a
particular goal holds.

• Now once the planning is completed, the final stage


is the execution of the entire process.
21
Types of Knowledge
Representation
Four Fundamental Types of Knowledge
Representation

• 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.

• Logical representation means drawing a conclusion


based on various conditions. This representation lays
down some important communication rules.

• It consists of precisely defined syntax and semantics


which supports the sound inference.

• Each sentence can be translated into logics using syntax


and semantics. 24
Conti…
Syntax
• Syntaxes are the rules which decide how we can
construct legal sentences in the logic.
• It determines which symbol we can use in
knowledge representation.
• How to write those symbols.

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.

• Here, represented the different type of knowledge in the


form of nodes and arcs. Each object is connected with
another object by some relation.
28
Conti…

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:

1. Simple relational knowledge


2. Inheritable knowledge
3. Inferential knowledge
4. Procedural knowledge

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.

• Example: Let's suppose there are two statements:


• Marcus is a man
• All men are mortal
Then it can represent as;
man(Marcus)
∀x = man (x) ----------> mortal (x)s 49
Conti…
4. Procedural knowledge
• Procedural knowledge approach uses small programs
and codes which describes how to do specific things, and
how to proceed.
• In this approach, one important rule is used which is If-
Then rule.
• In this knowledge, we can use various coding languages
such as LISP language and Prolog language.
• We can easily represent heuristic or domain-specific
knowledge using this approach.
• But it is not necessary that we can represent all cases in
this approach.
50
Reasoning
• Reasoning is a way to infer facts from existing
data
• It is a general process of thinking rationally, to find
valid conclusions.
• In artificial intelligence, the reasoning is essential so
that the machine can also think rationally as a human
brain, and can perform like a human.

51
Types of Reasoning

In artificial intelligence, reasoning can be divided into


the following categories:
1.Deductive reasoning
2.Inductive reasoning
3.Abductive reasoning
4.Common Sense Reasoning
5.Monotonic Reasoning
6.Non-monotonic 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…

• Deductive reasoning mostly starts from the general


premises to the specific conclusion, which can be
explained as below example.

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…

• In inductive reasoning, premises provide probable


supports to the conclusion, so the truth of premises
does not guarantee the truth of the conclusion.

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…

4. Common Sense Reasoning


•Common sense reasoning is an informal form of
reasoning, which can be gained through experiences.
•Common Sense reasoning simulates the human
ability to make presumptions about events which
occurs on every day.
•It relies on good judgment rather than exact logic and
operates on heuristic knowledge and heuristic rules.

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.

The above two statements are the examples of common sense


reasoning which a human mind can easily understand and
assume.

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…

• Monotonic reasoning is used in conventional reasoning


systems, and a logic-based system is monotonic.
• Any theorem proving is an example of monotonic
reasoning.

Example
• Earth revolves around the Sun.

It is a true fact, and it cannot be changed even if we add


another sentence in knowledge base like, "The moon
revolves around the earth" Or "Earth is not round," etc.
61
01/27/25 By- Ms. Richa Singh
Conti..
Advantages
• In monotonic reasoning, each old proof will always
remain valid.
• If we deduce some facts from available facts, then it will
remain valid for always.
Disadvantages
• We cannot represent the real world scenarios using
Monotonic reasoning.
• Hypothesis knowledge cannot be expressed with
monotonic reasoning, means facts should be true.
• Since we can only derive conclusions from the old
proofs, so new knowledge from the real world cannot be
added.

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

So from the above sentences, we can conclude that Pitty


can fly.

However, if we add one another sentence into knowledge


base "Pitty is a penguin", which concludes "Pitty
cannot fly", so it invalidates the above conclusion.
64
01/27/25 By- Ms. Richa Singh
Conti…

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

You might also like