SlideShare a Scribd company logo
10/05/2024
By:Bifa H.
1
KNOWLEDGE REPERSENATION
AND
REASONING IN ARTFICIAL INTELLEGENCE
By:
Inst. Bifa H. (MSc)
CHAPTER THREE
10/05/2024
By:Bifa H.
2
Outline:
 Logic and Inference
 Logical Agents
 Propositional Logic
 Predicate (First-Order)Logic
 Inference in First-Order Logic
 Knowledge Representation
 Knowledge Reasoning
 Bayesian reasoning
 Probabilistic reasoning
 Temporal reasoning
 Knowledge-based Systems
10/05/2024
By:Bifa H.
3
INTRODUCTION
What is Knowledge?
10/05/2024
By:Bifa H.
4
Cont..
10/05/2024
By:Bifa H.
5
WHAT IS KNOWLEDGE REPRESENATION?
 Knowledge representation and reasoning (KR, KRR) is the part of
Artificial intelligence which concerned with:
 AI agents thinking and
 How thinking contributes to intelligent behavior of agents.
 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.
10/05/2024
By:Bifa H.
6
Cont…
 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.
 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.
10/05/2024
By:Bifa H.
7
Cont..
10/05/2024
By:Bifa H.
8
What to Represent:?
 Following are the kind of knowledge which needs to be
represented in AI systems:
 Object: All the facts about objects in our world domain
 Events: Events are the actions which occur in our world.
 Performance: It describes behavior which involves knowledge about
how to do things.
 Meta-knowledge: It is knowledge about what we know.
 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.
10/05/2024
By:Bifa H.
9
How we represent Knowledge?
10/05/2024
By:Bifa H.
10
Picture and symbols
10/05/2024
By:Bifa H.
11
Graphic representation
10/05/2024
By:Bifa H.
12
Numbers
10/05/2024
By:Bifa H.
13
Types of knowledge
Knowledge: Knowledge is awareness or familiarity gained by
experiences of facts, data, and situations.
 Following are the types of knowledge in artificial intelligence:
10/05/2024
By:Bifa H.
14
Types of knowledge
Mainly there are two types of knowledge (Tacit and explicit )
 Tacit knowledge – usually gets embedded in human mind through
experience Includes awareness, perceptions, and feelings
 Explicit knowledge- is codified and digitized in documents, books,
reports, spreadsheets, memos etc.
We can convert explicit knowledge to tacit knowledge
10/05/2024
By:Bifa H.
15
Tacit knowledge Explicit Knowledge
 Un-codified
 Subjective
 Personal
 Context specific
 Difficult to share
 Codified
 Objective
 Impersonal
 Context independent
 Easy to share
Tacit vs Explicit
10/05/2024
By:Bifa H.
16
Other types of knowledge
 Declarative Knowledge – It includes concepts, facts, and objects
and expressed in a declarative sentence.
 Structural Knowledge – It is a basic problem-solving knowledge
that describes the relationship between concepts and objects.
 Procedural Knowledge – This is responsible for knowing how to
do something and includes rules, strategies, procedures, etc.
 Meta Knowledge – Meta Knowledge defines knowledge about
other types of Knowledge.
 Heuristic Knowledge – This represents some expert knowledge in
the field or subject.
10/05/2024
By:Bifa H.
17
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.
10/05/2024
By:Bifa H.
18
Cont…
10/05/2024
By:Bifa H.
19
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.
10/05/2024
By:Bifa H.
20
Cont…
10/05/2024
By:Bifa H.
21
3. Meta-knowledge:
 Knowledge about the other types of knowledge is called Meta-
knowledge.
 A study of planning, tagging and learning are some of the examples of
meta knowledge
10/05/2024
By:Bifa H.
22
4. Heuristic knowledge:
 Heuristic knowledge is representing knowledge of some experts in a
filed or subject.
 This knowledge is also known as Shallow knowledge and it follows the
principle of thumb rule.
 It is very efficient in reasoning process as it solves the problems based
on the records of past problems or the problems which are compiled by
experts.
 It provides knowledge based on the experiences it gathered during the
past problems
10/05/2024
By:Bifa H.
23
Cont…
10/05/2024
By:Bifa H.
24
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.
10/05/2024
By:Bifa H.
25
Cont…
10/05/2024
By:Bifa H.
26
AI knowledge cycle:
 An Artificial intelligence system
has the following components for
displaying intelligent behavior:
 Perception
 Learning
 Knowledge Representation
and Reasoning
 Planning
 Execution
10/05/2024
By:Bifa H.
27
What is the Relation between Knowledge &
Intelligence
In the real world, knowledge plays a vital role in
intelligence as well as creating artificial intelligence.
 It demonstrates the intelligent behavior in AI agents
or systems.
It is possible for an agent or system to act accurately on
some input only when it has the knowledge or
experience about the input.
10/05/2024
By:Bifa H.
28
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
10/05/2024
By:Bifa H.
29
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.
10/05/2024
By:Bifa H.
30
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.
 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
10/05/2024
By:Bifa H.
31
Inheritable knowledge….
10/05/2024
By:Bifa H.
32
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
∀
10/05/2024
By:Bifa H.
33
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.
10/05/2024
By:Bifa H.
34
Techniques of knowledge representation
10/05/2024
By:Bifa H.
35
Techniques of knowledge representation…
 There are mainly four ways of knowledge representation which are
given as follows:
 Logical Representation
 Semantic Network Representation
 Frame Representation
 Production Rules
10/05/2024
By:Bifa H.
36
Requirements for knowledge Representation system:
 A good knowledge representation system must have properties
such as:
 Representational Accuracy: It should represent all kinds of required
knowledge.
 Inferential Adequacy: It should be able to manipulate the
representational structures to produce new knowledge corresponding to
the existing structure.
 Inferential Efficiency: The ability to direct the inferential knowledge
mechanism into the most productive directions by storing appropriate
guides.
 Acquisition efficiency: The ability to acquire new knowledge easily
10/05/2024
By:Bifa H.
37
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.
10/05/2024
By:Bifa H.
38
Cont…
10/05/2024
By:Bifa H.
39
Cont…
 Logical representation is of two types:
 Propositional Logic: Propositional logic is also known as
statement logic or propositional calculus that works in a
Boolean, which means a method of True or False.
 First-order Logic: First-order logic is a type of logical
knowledge representation that you can also term First Order
Predicate Calculus Logic (FOPL).
 This representation of logical knowledge represents the predicates and objects in
quantifiers.
 It is an advanced model of propositional logic
10/05/2024
By:Bifa H.
40
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 are easy to understand and can be easily extended
 Storing information in the form of graph
10/05/2024
By:Bifa H.
41
Cont…
 This representation consists of mainly two types of relations:
 IS-A relation (Inheritance)
 Kind-of-relation
 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 brown colored.
 All Mammals are animal
10/05/2024
By:Bifa H.
42
Cont…
10/05/2024
By:Bifa H.
43
Cont…
 Advantages:
 Semantic networks are a natural representation of
knowledge.
 Also, it conveys meaning in a transparent manner.
 These networks are simple and easy to understand.
 Disadvantages:
 Semantic networks take more computational time at
runtime.
 Also, these are inadequate as they do not have any
equivalent quantifiers.
 These networks are not intelligent and depend on the
creator of the system.
10/05/2024
By:Bifa H.
44
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.
 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.
10/05/2024
By:Bifa H.
45
Lets take an example of a frame for a book
10/05/2024
By:Bifa H.
46
Cont…
Advantages:
 It makes the programming easier by grouping the related data.
 Frame representation is easy to understand and visualize.
 It is very easy to add slots for new attributes and relations.
 Also, it is easy to include default data and search for missing
values.
 Disadvantages:
 In frame system inference, the mechanism cannot be easily
processed.
 The inference mechanism cannot be smoothly proceeded by
frame representation.
 It has a very generalized approach
10/05/2024
By:Bifa H.
47
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
 In production rules agent checks for the condition and if the condition exists then
production rule fires and corresponding action is carried out.
 Knowledge is in the form of if then statement and machine take decision based on
rules
 And the action part carries out the associated problem-solving steps.
 This complete process is called a recognize-act cycle.
10/05/2024
By:Bifa H.
48
Cont…
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).
.
10/05/2024
By:Bifa H.
49
Cont…
 Advantages:
 The production rules are expressed in natural language.
 The production rules are highly modular and can be easily
removed or modified.
 Disadvantages:
 It does not exhibit any learning capabilities and does not store
the result of the problem for future uses.
 During the execution of the program, many rules may be active.
 Thus, rule-based production systems are inefficient.
10/05/2024
By:Bifa H.
50
REASONING IN ARTIFTIAIL INTELLEGENCE
 Logic is a language of reasoning.
 It is a collection of rules called logic arguments, we
use when doing logical reasoning.
 Reasoning is an act of deriving a conclusion from
certain premises using a given methodology.
 Reasoning is a process of thinking, logically
arguing, drawing inference.
10/05/2024
By:Bifa H.
51
REASONING
10/05/2024
By:Bifa H.
52
1. Deductive reasoning
10/05/2024
By:Bifa H.
53
Cont…
Deductive Reasoning starts with the general and draws
specific conclusions.
This would look like driving past a forest of trees,
noticing all of the leaves on the trees are green, then
making a hypothesis that any given tree in that forest
would also have green leaves.
10/05/2024
By:Bifa H.
54
2. Inductive Reasoning:
10/05/2024
By:Bifa H.
55
Cont….
Inductive reasoning follows a specific pathway.
It begins making a specific observation (the leaves on
the observed tree is green), notices a pattern (this
group of trees in front of me all have green leaves), and
draws a general conclusion all trees have green leaves.
10/05/2024
56
3. Abductive reasoning
By:Bifa H.
10/05/2024
By:Bifa H.
57
Cont…
 Abductive Reasoning happens when an algorithm draws a
conclusion with incomplete data after noticing a pattern.
 Say you want to conclude the temperature outside using only the
clothes people are wearing.
 When people are cold, they typically wear coats.
 When looking outside, no one is wearing a coat so you conclude it
must be warm.
10/05/2024
By:Bifa H.
58
4. Common Sense Reasoning
10/05/2024
By:Bifa H.
59
5. Monotonic Reasoning
10/05/2024
By:Bifa H.
60
6. Non-monotonic Reasoning
10/05/2024
By:Bifa H.
61
Propositional logic in Artificial intelligence
 The simplest kind of logic is propositional logic (PL), in
which all statements are made up of propositions.
 The term "Proposition "refers to a declarative statement
that can be true or false.
 It's a method of expressing knowledge in logical and
mathematical terms.
 Propositional logic is a simple form of logic which is also known
as Boolean logic
10/05/2024
By:Bifa H.
62
Cont…
 proposition has TRUTH values (0 and 1) which means it can
have one of the two values i.e. True or False.
 It is the most basic and widely used logic.
 Example:
 It is Sunday.
 The Sun rises from West (False proposition)
 3 + 3 = 7 (False proposition)
 5 is a prime number.
10/05/2024
By:Bifa H.
63
Its Properties:
 Satisfiable: A atomic propositional formula is satisfiable if
there is an interpretation for which it is true.
 Tautology: A propositional formula is valid or a tautology it is
true for all possible interpretations.
 Contradiction: A propositional formula is contradictory
(unsatisfiable) if there is no interpretation for which it is true.
 Contingent: A propositional logic can be contingent which
means it can be neither a tautology nor a contradiction.
10/05/2024
By:Bifa H.
64
Syntax of propositional logic:
 The syntax of propositional logic defines the allowable sentences for the
knowledge representation.
 There are two types of Propositions:
 Atomic Propositions
 Compound propositions
 Atomic Proposition: Atomic propositions are the simple
propositions.
 It consists of a single proposition symbol.
 These are the sentences which must be either true or false.
10/05/2024
By:Bifa H.
65
Cont…
 a) 2+2 is 4, it is an atomic proposition as it is a true fact
.
 b) "The Sun is cold" is also a proposition as it is a false
fact.
 Compound proposition:
 Compound propositions are constructed by combining simpler or
atomic propositions, using parenthesis and logical connectives.
 a) "It is raining today, and street is wet."
 b) "Ankit is a doctor, and his clinic is in Mumbai."
10/05/2024
By:Bifa H.
66
Logical Connectives and truth table
 Logical connectives are used to connect two simpler
propositions or representing a sentence logically.
 We can create compound propositions with the help of
logical connectives.
 There are mainly five connectives, which are given as follows:
10/05/2024
By:Bifa H.
67
Rules of Inference in Artificial intelligence
 In artificial intelligence, we need intelligent computers which can create
new logic from old logic or by evidence,
 so generating the conclusions from evidence and facts is termed as
Inference.
 Inference rules:
 Inference rules are the templates for generating valid
arguments.
 Inference rules are applied to derive proofs in artificial
intelligence, and the proof is a sequence of the conclusion that
leads to the desired goal.
10/05/2024
By:Bifa H.
68
Cont….
 In inference rules, the implication among all the connectives plays an important
role.
 Following are some terminologies related to inference rules:
 Implication: It is one of the logical connectives which can be represented as P
Q. It is a Boolean expression.
→
 Converse: The converse of implication, which means the right-hand side
proposition goes to the left-hand side and vice-versa. It can be written as Q P.
→
 Contra positive: The negation of converse is termed as contra positive, and it
can be represented as ¬ Q ¬ P.
→
 Inverse: The negation of implication is called inverse. It can be represented as ¬
P ¬ Q.
→
10/05/2024
By:Bifa H.
69
Types of Inference rules:
 1. Modus Ponens:
 The Modus Ponens rule is one of the most important rules of inference,
and it states that if P and P Q is true, then we can infer that Q will be
→
true. It can be represented as:
Example:
Statement-1: "If I am sleepy then I go to bed" ==> P Q
→
Statement-2: "I am sleepy" ==> P
Conclusion: "I go to bed." ==> Q.
Hence, we can say that, if P Q is true and P is true then Q will be true
→ .
10/05/2024
By:Bifa H.
70
2. Modus Tollens:
 the Modus Tollens rule state that if P Q is true and
→ ¬ Q is true, then
¬ P will also true.
 It can be represented as:
10/05/2024
By:Bifa H.
71
3. Hypothetical Syllogism:
 The Hypothetical Syllogism rule state that if P R is true whenever
→
P Q is true, and Q R is true.
→ →
 It can be represented as the following notation:
 Example:
 Statement-1: If you have my home key then you can unlock my
home. P Q
→
 Statement-2: If you can unlock my home then you can take my
money. Q R
→
 Conclusion: If you have my home key then you can take my money. P R
→
10/05/2024
By:Bifa H.
72
Cont….
10/05/2024
By:Bifa H.
73
4. Disjunctive Syllogism:
 The Disjunctive syllogism rule state that if P Q is true, and ¬P is true,
∨
then Q will be true.
 the Disjunctive syllogism rule state that if P Q is true, and ¬P is true,
∨
then Q will be true.
 It can be represented as:
 Example:
 Statement-1: Today is Sunday or Monday. ==>P Q
∨
 Statement-2: Today is not Sunday. ==> ¬P
 Conclusion: Today is Monday. ==> Q
10/05/2024
By:Bifa H.
74
5. Addition:
 the Addition rule is one the common inference rule, and it states that If
P is true, then P Q will be true.
∨
10/05/2024
By:Bifa H.
75
6. Simplification:
10/05/2024
By:Bifa H.
76
7. Resolution:
10/05/2024
By:Bifa H.
77
First-Order Logic in Artificial intelligence
 First-order logic is another way of knowledge representation in artificial
intelligence.
 It is an extension to propositional logic.
 FOL is sufficiently expressive to represent the natural language
statements in a concise way.
 First-order logic is also known as Predicate logic or First-order
predicate logic.
 First-order logic is a powerful language that develops information about
the objects in a more easy way and can also express the relationship
between those objects.
10/05/2024
By:Bifa H.
78
Cont….
 First-order logic (like natural language) does not only assume that the world contains
facts like propositional logic but also assumes the following things in the world:
 Objects: A, B, people, numbers, colors, wars, theories, squares, pits, wumpus
 Relations: It can be unary relation such as: red, round, is adjacent, or n-
any relation such as: the sister of, brother of, has color, comes between
 Function: Father of, best friend, third inning of, end of,
 As a natural language, first-order logic also has two main parts:
Syntax
Semantics
10/05/2024
By:Bifa H.
79
Cont…
 First-order logic statements can be divided into two parts:
 Subject: Subject is the main part of the statement.
 Predicate: A predicate can be defined as a relation, which binds two
atoms together in a statement.
 Consider the statement: "x is an integer.“
 it consists of two parts, the first part x is the subject of the statement
and second part "is an integer," is known as a predicate.
10/05/2024
By:Bifa H.
80
Quantifiers in First-order logic:
 A quantifier is a language element which generates
quantification, and quantification specifies the quantity of
specimen in the universe of discourse.
 These are the symbols that permit to determine or identify the
range and scope of the variable in the logical expression.
 There are two types of quantifier:
 Universal Quantifier: (for all, everyone, everything)
 Existential quantifier:(for some, at least one).
10/05/2024
By:Bifa H.
81
Universal Quantifier:
 Universal quantifier is a symbol of logical representation, which
specifies that the statement within its range is true for everything
or every instance of a particular thing.
 The Universal quantifier is represented by a symbol ∀, which
resembles an inverted A.
If x is a variable, then x is read as:
∀
 For all x
 For each x
 For every x.
10/05/2024
By:Bifa H.
82
Existential Quantifier:
 Existential quantifiers are the type of quantifiers, which express
that the statement within its scope is true for at least one instance
of something.
 It is denoted by the logical operator , which resembles as inverted
∃
E.
 When it is used with a predicate variable then it is called as an
existential quantifier.
 If x is a variable, then existential quantifier will be x or (x). And
∃ ∃
it will be read as:
There exists a 'x.'
 For some 'x.'
 For at least one 'x.'
10/05/2024
By:Bifa H.
83
Knowledge-Based Agent in Artificial intelligence
 An intelligent agent needs knowledge about the real world for taking
decisions and reasoning to act efficiently.
 Knowledge-based agents are those agents who have the capability
of maintaining an internal state of knowledge, reason over that
knowledge, update their knowledge after observations and take actions.
 These agents can represent the world with some formal representation
and act intelligently.
 Knowledge-based agents are composed of two main parts:
 Knowledge-base and
 Inference system.
10/05/2024
By:Bifa H.
84
Cont…
 A knowledge-based agent must able to do the following:
 An agent should be able to represent states, actions, etc.
 An agent Should be able to incorporate new percepts
 An agent can update the internal representation of the world
 An agent can deduce the internal representation of the world
 An agent can deduce appropriate actions.
10/05/2024
By:Bifa H.
85
The architecture of knowledge-based agent:
10/05/2024
By:Bifa H.
86
Cont…
 The knowledge-based agent (KBA) take input from the environment by
perceiving the environment.
 The input is taken by the inference engine of the agent and
 which also communicate with KB to decide as per the knowledge store
in KB.
 The learning element of KBA regularly updates the KB by learning new
knowledge.
10/05/2024
By:Bifa H.
87
Knowledge base:
 Knowledge-base is a central component of a knowledge-based
agent, it is also known as KB.
 It is a collection of sentences (here 'sentence' is a
technical term and it is not identical to sentence in
English).
 These sentences are expressed in a language which is called a
knowledge representation language.
 The Knowledge-base of KBA stores fact about the world.
10/05/2024
By:Bifa H.
88
Inference system
 Inference means deriving new sentences from old.
 Inference system allows us to add a new sentence to the
knowledge base.
 A sentence is a proposition about the world.
 Inference system applies logical rules to the KB to deduce new information.
 Inference system generates new facts so that an agent can update the KB.
 An inference system works mainly in two rules which are given as:
 Forward chaining
 Backward chaining
10/05/2024
By:Bifa H.
89
Cont….
10/05/2024
By:Bifa H.
90
Operations Performed by KBA
 Following are three operations which are performed by KBA
in order to show the intelligent behavior:
 TELL: This operation tells the knowledge base what it perceives from the
environment.
 ASK: This operation asks the knowledge base what action it should
perform.
 Perform: It performs the selected action.
10/05/2024
By:Bifa H.
91
Various levels of knowledge-based agent:
A knowledge-based agent can be viewed at different levels which are given
below:
1. Knowledge level
 Knowledge level is the first level of knowledge-based agent, and in this
level, we need to specify what the agent knows, and
 what the agent goals are.
2. Logical level:
 At this level, we understand that how the knowledge representation of
knowledge is stored.
3. Implementation level:
 This is the physical representation of logic and knowledge. At the
implementation level agent perform actions as per logical and knowledge
level.
10/05/2024
By:Bifa H.
92
Probabilistic reasoning:
 Probabilistic reasoning is a way of knowledge representation where we apply
the concept of probability to indicate the uncertainty in knowledge.
 In probabilistic reasoning, we combine probability theory with logic to
handle the uncertainty.
 We use probability in probabilistic reasoning because it provides a way to
handle the uncertainty that is the result of someone's laziness and ignorance.
 Probability: Probability can be defined as a chance that an uncertain event
will occur. It is the numerical measure of the likelihood that an event will
occur.
 The value of probability always remains between 0 and 1 that represent ideal
uncertainties.
10/05/2024
By:Bifa H.
93
Bayes' theorem in Artificial intelligence
 Bayes' theorem is also known as Bayes' rule, Bayes' law, or
 Bayesian reasoning, which determines the probability of an event
with uncertain knowledge.
 In probability theory, it relates the conditional probability and marginal
probabilities of two random events.
 The Bayesian inference is an application of Bayes' theorem, which is
fundamental to Bayesian statistics.
10/05/2024
By:Bifa H.
94
Need of probabilistic reasoning in AI:
When there are unpredictable outcomes.
When specifications or possibilities of predicates becomes
too large to handle.
When an unknown error occurs during an experiment.
 In probabilistic reasoning, there are two ways to solve problems with
uncertain knowledge:
 Bayes' rule
 Bayesian Statistics
10/05/2024
By:Bifa H.
95
Application of Bayes' theorem in Artificial intelligence:
 Following are some applications of Bayes' theorem:
 It is used to calculate the next step of the robot when the already
executed step is given.
 Bayes' theorem is helpful in weather forecasting.
 It can solve the Monty Hall problem.
10/05/2024
By:Bifa H.
96
Reading Assignments
 Bayesian reasoning
 Probabilistic reasoning
 Temporal reasoning

More Related Content

PPTX
MODULE-2_AI_Computer_Science_Engineering.pptx
PPTX
Knowledge-Based agent and representation.pptx
PPTX
KNOWLEDGE REPRESENTATION AND TYPES .pptx
PPTX
AI-KNOWLEDGE REPRESENTATION - CONTE .pptx
PPTX
Knowledge representation
PDF
Computational Intelligence Module iii.pdf
PPTX
Artificial Intelligence.pptx
PPTX
Artificial Intelligence - Reason and Planning
MODULE-2_AI_Computer_Science_Engineering.pptx
Knowledge-Based agent and representation.pptx
KNOWLEDGE REPRESENTATION AND TYPES .pptx
AI-KNOWLEDGE REPRESENTATION - CONTE .pptx
Knowledge representation
Computational Intelligence Module iii.pdf
Artificial Intelligence.pptx
Artificial Intelligence - Reason and Planning

Similar to CHAPTER THREE of Knowledge management framework for the project management system (20)

PPTX
Knowledge base system
PDF
PPTX
uploadscribd2.pptx
PDF
5.-Knowledge-Representation-in-AI_010824.pdf
PPTX
_Artificial_Intelligence_Knowledge_Representation (1).pptx
PDF
Lecture 2-Introduction to Reasoning and Knowledge Representation.pdf
PPT
4KN Editted 2012.ppt
PPTX
Ch-I-Moduddddddddddddddddddddddddddddddddddddle-III.pptx
PPTX
Knowledge representation In Artificial Intelligence
PDF
knowledgerepresentation.pdf
PPTX
issues knowledge representation ai in AI
PPTX
knowledge representation in artificial intelligence
PPTX
Artificial Intelligence_ Knowledge Representation
PPT
Knowledge Representation.ppt
PPTX
module-2 ppt knowledge representation computer application
PPTX
Teaching LMMs for Image Quality Scoring and Interpreting
PDF
Knowledge Representation in AI
PPTX
AI_Unit-3 complete Notes.pptx from RAJIV GANDHI UNIVERSITY
PPTX
AI material for you computer science.pptx
PPTX
Lec 09
Knowledge base system
uploadscribd2.pptx
5.-Knowledge-Representation-in-AI_010824.pdf
_Artificial_Intelligence_Knowledge_Representation (1).pptx
Lecture 2-Introduction to Reasoning and Knowledge Representation.pdf
4KN Editted 2012.ppt
Ch-I-Moduddddddddddddddddddddddddddddddddddddle-III.pptx
Knowledge representation In Artificial Intelligence
knowledgerepresentation.pdf
issues knowledge representation ai in AI
knowledge representation in artificial intelligence
Artificial Intelligence_ Knowledge Representation
Knowledge Representation.ppt
module-2 ppt knowledge representation computer application
Teaching LMMs for Image Quality Scoring and Interpreting
Knowledge Representation in AI
AI_Unit-3 complete Notes.pptx from RAJIV GANDHI UNIVERSITY
AI material for you computer science.pptx
Lec 09
Ad

More from BifaHirpo1 (11)

PPTX
Chapter 1.pptx okokkokokokokkkkhvgvgcvghgcvghg
PPTX
LECTURE_5 Program Control Instructions.pptx
PPTX
LECTURE_7 Interface.pptx of what you wants
PPTX
CHAPTER 1 AI.pptx of articles will be ofhcvxzz
PPTX
CHAPTER 5.pptx of the following of our discussion
PPTX
LECTURE_1 Introduction to MLP.pptx of ml
PPT
boolean_algebra.ppt of all of us and the family will not even have to worry
PPTX
LECTURE_2 Architecture of 8086 Microprocokessor.pptx
PDF
Abel ASSEMBLY LANGUGE. Of which used for educational purposes
PPTX
Chapter 1 Data structure _Algorithms.pptx
PPTX
ARTIFICIAL INTELLIGENCE TO GENERATE BEST COMPILER DESIGN
Chapter 1.pptx okokkokokokokkkkhvgvgcvghgcvghg
LECTURE_5 Program Control Instructions.pptx
LECTURE_7 Interface.pptx of what you wants
CHAPTER 1 AI.pptx of articles will be ofhcvxzz
CHAPTER 5.pptx of the following of our discussion
LECTURE_1 Introduction to MLP.pptx of ml
boolean_algebra.ppt of all of us and the family will not even have to worry
LECTURE_2 Architecture of 8086 Microprocokessor.pptx
Abel ASSEMBLY LANGUGE. Of which used for educational purposes
Chapter 1 Data structure _Algorithms.pptx
ARTIFICIAL INTELLIGENCE TO GENERATE BEST COMPILER DESIGN
Ad

Recently uploaded (20)

PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Classroom Observation Tools for Teachers
PDF
01-Introduction-to-Information-Management.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Sports Quiz easy sports quiz sports quiz
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Basic Mud Logging Guide for educational purpose
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
RMMM.pdf make it easy to upload and study
PPTX
Pharma ospi slides which help in ospi learning
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
master seminar digital applications in india
PDF
O7-L3 Supply Chain Operations - ICLT Program
Supply Chain Operations Speaking Notes -ICLT Program
Classroom Observation Tools for Teachers
01-Introduction-to-Information-Management.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Cell Structure & Organelles in detailed.
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Sports Quiz easy sports quiz sports quiz
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Basic Mud Logging Guide for educational purpose
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
RMMM.pdf make it easy to upload and study
Pharma ospi slides which help in ospi learning
Insiders guide to clinical Medicine.pdf
Renaissance Architecture: A Journey from Faith to Humanism
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
master seminar digital applications in india
O7-L3 Supply Chain Operations - ICLT Program

CHAPTER THREE of Knowledge management framework for the project management system

  • 1. 10/05/2024 By:Bifa H. 1 KNOWLEDGE REPERSENATION AND REASONING IN ARTFICIAL INTELLEGENCE By: Inst. Bifa H. (MSc) CHAPTER THREE
  • 2. 10/05/2024 By:Bifa H. 2 Outline:  Logic and Inference  Logical Agents  Propositional Logic  Predicate (First-Order)Logic  Inference in First-Order Logic  Knowledge Representation  Knowledge Reasoning  Bayesian reasoning  Probabilistic reasoning  Temporal reasoning  Knowledge-based Systems
  • 5. 10/05/2024 By:Bifa H. 5 WHAT IS KNOWLEDGE REPRESENATION?  Knowledge representation and reasoning (KR, KRR) is the part of Artificial intelligence which concerned with:  AI agents thinking and  How thinking contributes to intelligent behavior of agents.  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.
  • 6. 10/05/2024 By:Bifa H. 6 Cont…  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.  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.
  • 8. 10/05/2024 By:Bifa H. 8 What to Represent:?  Following are the kind of knowledge which needs to be represented in AI systems:  Object: All the facts about objects in our world domain  Events: Events are the actions which occur in our world.  Performance: It describes behavior which involves knowledge about how to do things.  Meta-knowledge: It is knowledge about what we know.  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.
  • 9. 10/05/2024 By:Bifa H. 9 How we represent Knowledge?
  • 13. 10/05/2024 By:Bifa H. 13 Types of knowledge Knowledge: Knowledge is awareness or familiarity gained by experiences of facts, data, and situations.  Following are the types of knowledge in artificial intelligence:
  • 14. 10/05/2024 By:Bifa H. 14 Types of knowledge Mainly there are two types of knowledge (Tacit and explicit )  Tacit knowledge – usually gets embedded in human mind through experience Includes awareness, perceptions, and feelings  Explicit knowledge- is codified and digitized in documents, books, reports, spreadsheets, memos etc. We can convert explicit knowledge to tacit knowledge
  • 15. 10/05/2024 By:Bifa H. 15 Tacit knowledge Explicit Knowledge  Un-codified  Subjective  Personal  Context specific  Difficult to share  Codified  Objective  Impersonal  Context independent  Easy to share Tacit vs Explicit
  • 16. 10/05/2024 By:Bifa H. 16 Other types of knowledge  Declarative Knowledge – It includes concepts, facts, and objects and expressed in a declarative sentence.  Structural Knowledge – It is a basic problem-solving knowledge that describes the relationship between concepts and objects.  Procedural Knowledge – This is responsible for knowing how to do something and includes rules, strategies, procedures, etc.  Meta Knowledge – Meta Knowledge defines knowledge about other types of Knowledge.  Heuristic Knowledge – This represents some expert knowledge in the field or subject.
  • 17. 10/05/2024 By:Bifa H. 17 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.
  • 19. 10/05/2024 By:Bifa H. 19 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.
  • 21. 10/05/2024 By:Bifa H. 21 3. Meta-knowledge:  Knowledge about the other types of knowledge is called Meta- knowledge.  A study of planning, tagging and learning are some of the examples of meta knowledge
  • 22. 10/05/2024 By:Bifa H. 22 4. Heuristic knowledge:  Heuristic knowledge is representing knowledge of some experts in a filed or subject.  This knowledge is also known as Shallow knowledge and it follows the principle of thumb rule.  It is very efficient in reasoning process as it solves the problems based on the records of past problems or the problems which are compiled by experts.  It provides knowledge based on the experiences it gathered during the past problems
  • 24. 10/05/2024 By:Bifa H. 24 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.
  • 26. 10/05/2024 By:Bifa H. 26 AI knowledge cycle:  An Artificial intelligence system has the following components for displaying intelligent behavior:  Perception  Learning  Knowledge Representation and Reasoning  Planning  Execution
  • 27. 10/05/2024 By:Bifa H. 27 What is the Relation between Knowledge & Intelligence In the real world, knowledge plays a vital role in intelligence as well as creating artificial intelligence.  It demonstrates the intelligent behavior in AI agents or systems. It is possible for an agent or system to act accurately on some input only when it has the knowledge or experience about the input.
  • 28. 10/05/2024 By:Bifa H. 28 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
  • 29. 10/05/2024 By:Bifa H. 29 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.
  • 30. 10/05/2024 By:Bifa H. 30 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.  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
  • 32. 10/05/2024 By:Bifa H. 32 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 ∀
  • 33. 10/05/2024 By:Bifa H. 33 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.
  • 34. 10/05/2024 By:Bifa H. 34 Techniques of knowledge representation
  • 35. 10/05/2024 By:Bifa H. 35 Techniques of knowledge representation…  There are mainly four ways of knowledge representation which are given as follows:  Logical Representation  Semantic Network Representation  Frame Representation  Production Rules
  • 36. 10/05/2024 By:Bifa H. 36 Requirements for knowledge Representation system:  A good knowledge representation system must have properties such as:  Representational Accuracy: It should represent all kinds of required knowledge.  Inferential Adequacy: It should be able to manipulate the representational structures to produce new knowledge corresponding to the existing structure.  Inferential Efficiency: The ability to direct the inferential knowledge mechanism into the most productive directions by storing appropriate guides.  Acquisition efficiency: The ability to acquire new knowledge easily
  • 37. 10/05/2024 By:Bifa H. 37 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.
  • 39. 10/05/2024 By:Bifa H. 39 Cont…  Logical representation is of two types:  Propositional Logic: Propositional logic is also known as statement logic or propositional calculus that works in a Boolean, which means a method of True or False.  First-order Logic: First-order logic is a type of logical knowledge representation that you can also term First Order Predicate Calculus Logic (FOPL).  This representation of logical knowledge represents the predicates and objects in quantifiers.  It is an advanced model of propositional logic
  • 40. 10/05/2024 By:Bifa H. 40 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 are easy to understand and can be easily extended  Storing information in the form of graph
  • 41. 10/05/2024 By:Bifa H. 41 Cont…  This representation consists of mainly two types of relations:  IS-A relation (Inheritance)  Kind-of-relation  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 brown colored.  All Mammals are animal
  • 43. 10/05/2024 By:Bifa H. 43 Cont…  Advantages:  Semantic networks are a natural representation of knowledge.  Also, it conveys meaning in a transparent manner.  These networks are simple and easy to understand.  Disadvantages:  Semantic networks take more computational time at runtime.  Also, these are inadequate as they do not have any equivalent quantifiers.  These networks are not intelligent and depend on the creator of the system.
  • 44. 10/05/2024 By:Bifa H. 44 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.  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.
  • 45. 10/05/2024 By:Bifa H. 45 Lets take an example of a frame for a book
  • 46. 10/05/2024 By:Bifa H. 46 Cont… Advantages:  It makes the programming easier by grouping the related data.  Frame representation is easy to understand and visualize.  It is very easy to add slots for new attributes and relations.  Also, it is easy to include default data and search for missing values.  Disadvantages:  In frame system inference, the mechanism cannot be easily processed.  The inference mechanism cannot be smoothly proceeded by frame representation.  It has a very generalized approach
  • 47. 10/05/2024 By:Bifa H. 47 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  In production rules agent checks for the condition and if the condition exists then production rule fires and corresponding action is carried out.  Knowledge is in the form of if then statement and machine take decision based on rules  And the action part carries out the associated problem-solving steps.  This complete process is called a recognize-act cycle.
  • 48. 10/05/2024 By:Bifa H. 48 Cont… 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). .
  • 49. 10/05/2024 By:Bifa H. 49 Cont…  Advantages:  The production rules are expressed in natural language.  The production rules are highly modular and can be easily removed or modified.  Disadvantages:  It does not exhibit any learning capabilities and does not store the result of the problem for future uses.  During the execution of the program, many rules may be active.  Thus, rule-based production systems are inefficient.
  • 50. 10/05/2024 By:Bifa H. 50 REASONING IN ARTIFTIAIL INTELLEGENCE  Logic is a language of reasoning.  It is a collection of rules called logic arguments, we use when doing logical reasoning.  Reasoning is an act of deriving a conclusion from certain premises using a given methodology.  Reasoning is a process of thinking, logically arguing, drawing inference.
  • 53. 10/05/2024 By:Bifa H. 53 Cont… Deductive Reasoning starts with the general and draws specific conclusions. This would look like driving past a forest of trees, noticing all of the leaves on the trees are green, then making a hypothesis that any given tree in that forest would also have green leaves.
  • 55. 10/05/2024 By:Bifa H. 55 Cont…. Inductive reasoning follows a specific pathway. It begins making a specific observation (the leaves on the observed tree is green), notices a pattern (this group of trees in front of me all have green leaves), and draws a general conclusion all trees have green leaves.
  • 57. 10/05/2024 By:Bifa H. 57 Cont…  Abductive Reasoning happens when an algorithm draws a conclusion with incomplete data after noticing a pattern.  Say you want to conclude the temperature outside using only the clothes people are wearing.  When people are cold, they typically wear coats.  When looking outside, no one is wearing a coat so you conclude it must be warm.
  • 61. 10/05/2024 By:Bifa H. 61 Propositional logic in Artificial intelligence  The simplest kind of logic is propositional logic (PL), in which all statements are made up of propositions.  The term "Proposition "refers to a declarative statement that can be true or false.  It's a method of expressing knowledge in logical and mathematical terms.  Propositional logic is a simple form of logic which is also known as Boolean logic
  • 62. 10/05/2024 By:Bifa H. 62 Cont…  proposition has TRUTH values (0 and 1) which means it can have one of the two values i.e. True or False.  It is the most basic and widely used logic.  Example:  It is Sunday.  The Sun rises from West (False proposition)  3 + 3 = 7 (False proposition)  5 is a prime number.
  • 63. 10/05/2024 By:Bifa H. 63 Its Properties:  Satisfiable: A atomic propositional formula is satisfiable if there is an interpretation for which it is true.  Tautology: A propositional formula is valid or a tautology it is true for all possible interpretations.  Contradiction: A propositional formula is contradictory (unsatisfiable) if there is no interpretation for which it is true.  Contingent: A propositional logic can be contingent which means it can be neither a tautology nor a contradiction.
  • 64. 10/05/2024 By:Bifa H. 64 Syntax of propositional logic:  The syntax of propositional logic defines the allowable sentences for the knowledge representation.  There are two types of Propositions:  Atomic Propositions  Compound propositions  Atomic Proposition: Atomic propositions are the simple propositions.  It consists of a single proposition symbol.  These are the sentences which must be either true or false.
  • 65. 10/05/2024 By:Bifa H. 65 Cont…  a) 2+2 is 4, it is an atomic proposition as it is a true fact .  b) "The Sun is cold" is also a proposition as it is a false fact.  Compound proposition:  Compound propositions are constructed by combining simpler or atomic propositions, using parenthesis and logical connectives.  a) "It is raining today, and street is wet."  b) "Ankit is a doctor, and his clinic is in Mumbai."
  • 66. 10/05/2024 By:Bifa H. 66 Logical Connectives and truth table  Logical connectives are used to connect two simpler propositions or representing a sentence logically.  We can create compound propositions with the help of logical connectives.  There are mainly five connectives, which are given as follows:
  • 67. 10/05/2024 By:Bifa H. 67 Rules of Inference in Artificial intelligence  In artificial intelligence, we need intelligent computers which can create new logic from old logic or by evidence,  so generating the conclusions from evidence and facts is termed as Inference.  Inference rules:  Inference rules are the templates for generating valid arguments.  Inference rules are applied to derive proofs in artificial intelligence, and the proof is a sequence of the conclusion that leads to the desired goal.
  • 68. 10/05/2024 By:Bifa H. 68 Cont….  In inference rules, the implication among all the connectives plays an important role.  Following are some terminologies related to inference rules:  Implication: It is one of the logical connectives which can be represented as P Q. It is a Boolean expression. →  Converse: The converse of implication, which means the right-hand side proposition goes to the left-hand side and vice-versa. It can be written as Q P. →  Contra positive: The negation of converse is termed as contra positive, and it can be represented as ¬ Q ¬ P. →  Inverse: The negation of implication is called inverse. It can be represented as ¬ P ¬ Q. →
  • 69. 10/05/2024 By:Bifa H. 69 Types of Inference rules:  1. Modus Ponens:  The Modus Ponens rule is one of the most important rules of inference, and it states that if P and P Q is true, then we can infer that Q will be → true. It can be represented as: Example: Statement-1: "If I am sleepy then I go to bed" ==> P Q → Statement-2: "I am sleepy" ==> P Conclusion: "I go to bed." ==> Q. Hence, we can say that, if P Q is true and P is true then Q will be true → .
  • 70. 10/05/2024 By:Bifa H. 70 2. Modus Tollens:  the Modus Tollens rule state that if P Q is true and → ¬ Q is true, then ¬ P will also true.  It can be represented as:
  • 71. 10/05/2024 By:Bifa H. 71 3. Hypothetical Syllogism:  The Hypothetical Syllogism rule state that if P R is true whenever → P Q is true, and Q R is true. → →  It can be represented as the following notation:  Example:  Statement-1: If you have my home key then you can unlock my home. P Q →  Statement-2: If you can unlock my home then you can take my money. Q R →  Conclusion: If you have my home key then you can take my money. P R →
  • 73. 10/05/2024 By:Bifa H. 73 4. Disjunctive Syllogism:  The Disjunctive syllogism rule state that if P Q is true, and ¬P is true, ∨ then Q will be true.  the Disjunctive syllogism rule state that if P Q is true, and ¬P is true, ∨ then Q will be true.  It can be represented as:  Example:  Statement-1: Today is Sunday or Monday. ==>P Q ∨  Statement-2: Today is not Sunday. ==> ¬P  Conclusion: Today is Monday. ==> Q
  • 74. 10/05/2024 By:Bifa H. 74 5. Addition:  the Addition rule is one the common inference rule, and it states that If P is true, then P Q will be true. ∨
  • 77. 10/05/2024 By:Bifa H. 77 First-Order Logic in Artificial intelligence  First-order logic is another way of knowledge representation in artificial intelligence.  It is an extension to propositional logic.  FOL is sufficiently expressive to represent the natural language statements in a concise way.  First-order logic is also known as Predicate logic or First-order predicate logic.  First-order logic is a powerful language that develops information about the objects in a more easy way and can also express the relationship between those objects.
  • 78. 10/05/2024 By:Bifa H. 78 Cont….  First-order logic (like natural language) does not only assume that the world contains facts like propositional logic but also assumes the following things in the world:  Objects: A, B, people, numbers, colors, wars, theories, squares, pits, wumpus  Relations: It can be unary relation such as: red, round, is adjacent, or n- any relation such as: the sister of, brother of, has color, comes between  Function: Father of, best friend, third inning of, end of,  As a natural language, first-order logic also has two main parts: Syntax Semantics
  • 79. 10/05/2024 By:Bifa H. 79 Cont…  First-order logic statements can be divided into two parts:  Subject: Subject is the main part of the statement.  Predicate: A predicate can be defined as a relation, which binds two atoms together in a statement.  Consider the statement: "x is an integer.“  it consists of two parts, the first part x is the subject of the statement and second part "is an integer," is known as a predicate.
  • 80. 10/05/2024 By:Bifa H. 80 Quantifiers in First-order logic:  A quantifier is a language element which generates quantification, and quantification specifies the quantity of specimen in the universe of discourse.  These are the symbols that permit to determine or identify the range and scope of the variable in the logical expression.  There are two types of quantifier:  Universal Quantifier: (for all, everyone, everything)  Existential quantifier:(for some, at least one).
  • 81. 10/05/2024 By:Bifa H. 81 Universal Quantifier:  Universal quantifier is a symbol of logical representation, which specifies that the statement within its range is true for everything or every instance of a particular thing.  The Universal quantifier is represented by a symbol ∀, which resembles an inverted A. If x is a variable, then x is read as: ∀  For all x  For each x  For every x.
  • 82. 10/05/2024 By:Bifa H. 82 Existential Quantifier:  Existential quantifiers are the type of quantifiers, which express that the statement within its scope is true for at least one instance of something.  It is denoted by the logical operator , which resembles as inverted ∃ E.  When it is used with a predicate variable then it is called as an existential quantifier.  If x is a variable, then existential quantifier will be x or (x). And ∃ ∃ it will be read as: There exists a 'x.'  For some 'x.'  For at least one 'x.'
  • 83. 10/05/2024 By:Bifa H. 83 Knowledge-Based Agent in Artificial intelligence  An intelligent agent needs knowledge about the real world for taking decisions and reasoning to act efficiently.  Knowledge-based agents are those agents who have the capability of maintaining an internal state of knowledge, reason over that knowledge, update their knowledge after observations and take actions.  These agents can represent the world with some formal representation and act intelligently.  Knowledge-based agents are composed of two main parts:  Knowledge-base and  Inference system.
  • 84. 10/05/2024 By:Bifa H. 84 Cont…  A knowledge-based agent must able to do the following:  An agent should be able to represent states, actions, etc.  An agent Should be able to incorporate new percepts  An agent can update the internal representation of the world  An agent can deduce the internal representation of the world  An agent can deduce appropriate actions.
  • 85. 10/05/2024 By:Bifa H. 85 The architecture of knowledge-based agent:
  • 86. 10/05/2024 By:Bifa H. 86 Cont…  The knowledge-based agent (KBA) take input from the environment by perceiving the environment.  The input is taken by the inference engine of the agent and  which also communicate with KB to decide as per the knowledge store in KB.  The learning element of KBA regularly updates the KB by learning new knowledge.
  • 87. 10/05/2024 By:Bifa H. 87 Knowledge base:  Knowledge-base is a central component of a knowledge-based agent, it is also known as KB.  It is a collection of sentences (here 'sentence' is a technical term and it is not identical to sentence in English).  These sentences are expressed in a language which is called a knowledge representation language.  The Knowledge-base of KBA stores fact about the world.
  • 88. 10/05/2024 By:Bifa H. 88 Inference system  Inference means deriving new sentences from old.  Inference system allows us to add a new sentence to the knowledge base.  A sentence is a proposition about the world.  Inference system applies logical rules to the KB to deduce new information.  Inference system generates new facts so that an agent can update the KB.  An inference system works mainly in two rules which are given as:  Forward chaining  Backward chaining
  • 90. 10/05/2024 By:Bifa H. 90 Operations Performed by KBA  Following are three operations which are performed by KBA in order to show the intelligent behavior:  TELL: This operation tells the knowledge base what it perceives from the environment.  ASK: This operation asks the knowledge base what action it should perform.  Perform: It performs the selected action.
  • 91. 10/05/2024 By:Bifa H. 91 Various levels of knowledge-based agent: A knowledge-based agent can be viewed at different levels which are given below: 1. Knowledge level  Knowledge level is the first level of knowledge-based agent, and in this level, we need to specify what the agent knows, and  what the agent goals are. 2. Logical level:  At this level, we understand that how the knowledge representation of knowledge is stored. 3. Implementation level:  This is the physical representation of logic and knowledge. At the implementation level agent perform actions as per logical and knowledge level.
  • 92. 10/05/2024 By:Bifa H. 92 Probabilistic reasoning:  Probabilistic reasoning is a way of knowledge representation where we apply the concept of probability to indicate the uncertainty in knowledge.  In probabilistic reasoning, we combine probability theory with logic to handle the uncertainty.  We use probability in probabilistic reasoning because it provides a way to handle the uncertainty that is the result of someone's laziness and ignorance.  Probability: Probability can be defined as a chance that an uncertain event will occur. It is the numerical measure of the likelihood that an event will occur.  The value of probability always remains between 0 and 1 that represent ideal uncertainties.
  • 93. 10/05/2024 By:Bifa H. 93 Bayes' theorem in Artificial intelligence  Bayes' theorem is also known as Bayes' rule, Bayes' law, or  Bayesian reasoning, which determines the probability of an event with uncertain knowledge.  In probability theory, it relates the conditional probability and marginal probabilities of two random events.  The Bayesian inference is an application of Bayes' theorem, which is fundamental to Bayesian statistics.
  • 94. 10/05/2024 By:Bifa H. 94 Need of probabilistic reasoning in AI: When there are unpredictable outcomes. When specifications or possibilities of predicates becomes too large to handle. When an unknown error occurs during an experiment.  In probabilistic reasoning, there are two ways to solve problems with uncertain knowledge:  Bayes' rule  Bayesian Statistics
  • 95. 10/05/2024 By:Bifa H. 95 Application of Bayes' theorem in Artificial intelligence:  Following are some applications of Bayes' theorem:  It is used to calculate the next step of the robot when the already executed step is given.  Bayes' theorem is helpful in weather forecasting.  It can solve the Monty Hall problem.
  • 96. 10/05/2024 By:Bifa H. 96 Reading Assignments  Bayesian reasoning  Probabilistic reasoning  Temporal reasoning