Knowledge Representation and Reasoning
Intelligent agents should have capacity for:
• Perceiving : Acquiring information from environment.
• Knowledge Representation : Representing its understanding of
the world.
• Reasoning : Inferring the implications of what it knows and of the
choices it has.
• Acting: Choosing what it want to do and carry it out.
Knowledge based system
• Representation of knowledge and the reasoning process are
central to the entire field of artificial intelligence.
• The primary component of a knowledge-based agent is its
knowledge-base.
• Human beings are essentially knowledge based creatures.
• Experiences/ rules to solve a problem
• A knowledge-base is a set of sentences. Each sentence is
expressed in a language called the knowledge representation
language
Inferencing
• Mechanisms to derive new sentences from old ones.
This process is known as inferencing or reasoning.
• Inference must obey the primary requirement that the
new sentences should follow logically from the
previous ones.
Logic
• Logic is the primary vehicle for representing and reasoning
about knowledge.
• Provides way to represent+ reasoning
• A logic consists of two parts, a language and a method
of reasoning.
• The logical language, in turn, has two aspects, syntax
and semantics.
• Thus, to specify or define a particular logic, one needs
to specify three things:
• Syntax: The atomic symbols of the logical language, and the rules for
constructing well formed, non-atomic expressions (symbol structures) of the
logic.
• Syntax specifies the symbols in the language and how they can be combined to
form sentences. Hence facts about the world are represented as sentences in
logic.
• Semantics: The meanings of the atomic symbols of the logic, and the rules for
determining the meanings of non-atomic expressions of the logic.
• It specifies what facts in the world a sentence refers to. Hence, also specifies
how you assign a truth value to a sentence based on its meaning in the world.
• Syntactic Inference Method: The rules for determining a subset of logical
expressions, called theorems of the logic. It refers to mechanical method for
computing (deriving) new (true) sentences from existing sentences
AI NOTES ppt 4.pdf
Logical systems with different syntax and semantics.
• There are a number of logical systems
• Propositional logic :
• Simplest kind of logic
• All objects described are fixed or unique "John is a student"
student(john)
• Here John refers to one unique person.
• First order predicate logic:
• Objects described can be unique or variables to stand for a
unique object .
• "All Men are mortal" For All(M) [Men(M) -> Mortal(M)]
• Here M can be replaced by many different unique Men.
• Temporal Logic:
• Represents truth over time.
• Modal Logic:
• Represents doubt
• Higher order logics:
• Allows variable to represent many relations between objects.
Propositional Logic
• In propositional logic (PL) a user defines a set of propositional
symbols, like P and Q.
• User defines the semantics of each of these symbols.
• For example, P means "It is hot"
• Q means "It is humid"
• R means "It is raining"
• A sentence (also called a formula or well-formed formula) is
defined as:
• 1. A symbol
• 2. If S is a sentence, then ~S is a sentence, where "~" is the
"not" logical operator
• 3. If S and T are sentences, then (S v T), (S ^ T), (S => T), and
(S <=> T) are sentences, where the four logical connectives
correspond to "or," "and," "implies," and "if and only if,"
respectively
• Examples of PL sentences:
• (P ^ Q) => R (here meaning "If it is hot and humid, then it is
raining")
• Q => P (here meaning "If it is humid, then it is hot")
• Q (here meaning "It is humid.")
• Interpretation of the sentence :
• Given the truth values of all of the constituent symbols in a
sentence, that sentence can be "evaluated" to determine its
truth value (True or False). This is called an interpretation of
the sentence.
• Model : A model is an interpretation (i.e., an assignment of
truth values to symbols) of a set of sentences such that each
sentence is True. A model is just a formal mathematical
structure that "stands in" for the world.
• Tautology : A valid sentence (also called a tautology) is a
sentence that is True under all interpretations. Hence, no
matter what the world is actually like or what the semantics is,
the sentence is True. For example "It's raining or it's not
raining."
If you listen you will hear what I’m saying
You are listening
Therefore, you hear what I am saying
Valid Arguments in Propositional Logic
Is this a valid argument?
Let p represent the statement “you listen”
Let q represent the statement “you hear what I am saying”
The argument has the form:
Valid Arguments in Propositional Logic
is a tautology (always true)
This is another way of saying that
Valid Arguments in Propositional Logic
When we replace statements/propositions with propositional variables
we have an argument form.
Defn:
An argument (in propositional logic) is a sequence of propositions.
All but the final proposition are called premises.
The last proposition is the conclusion
The argument is valid iff the truth of all premises implies the conclusion is true
An argument form is a sequence of compound propositions
Valid Arguments in Propositional Logic
The argument form with premises
and conclusion
is valid when is a tautology
We prove that an argument form is valid by using the laws of inference
But we could use a truth table. Why not?
Rules of Inference for Propositional Logic
modus ponens
modus ponens (Latin) translates to “mode that affirms”
The 1st
law
Rules of Inference for Propositional Logic modus ponens
If it’s a nice day we’ll go to the Park. Assume the hypothesis
“it’s a nice day” is true. Then by modus ponens it follows that
“we’ll go to the Park”.
The rules of inference
• Constructive Dilemma
• (P→Q) ∧ (R →S)
• P ∨ R
• ∴Q ∨ S
• Destructive Dilemma
• (P→Q) ∧ (R →S)
• ~Q ∨ ~S
• ∴~P ∨ ~R
• DeMorgan's law is also applicable in logic machines.
You might think of this as some sort of game.
You are given some statement, and you want to see if it is a
valid argument and true
You translate the statement into argument form using propositional
variables, and make sure you have the premises right, and clear what
is the conclusion
You then want to get from premises/hypotheses (A) to the conclusion (B)
using the rules of inference.
So, get from A to B using as “moves” the rules of inference
Another view on what we are doing
Using the resolution rule (an example)
1. Tom is skiing or it is not snowing.
2. It is snowing or Bart is playing hockey.
3. Consequently Tom is skiing or Bart is playing hockey.
We want to show that (3) follows from (1) and (2)
Using the resolution rule (an example)
1. Tom is skiing or it is not snowing.
2. It is snowing or Bart is playing hockey.
3. Consequently Tom is skiing or Bart is playing hockey.
propositions
hypotheses
Consequently Tom is skiing or Bart is playing hockey
Resolution rule
Rules of Inference & Quantified Statements
All men are Mortal, said Jane
John is a man
Therefore John is Mortal
Above is an example of a rule called “Universal Instantiation”.
We conclude P(c) is true, where c is a particular/named element
in the domain of discourse, given the premise
Rules of Inference & Quantified Statements
Rules of Inference & Quantified Statements
All men are Mortal said Jane
John is a man
Therefore John is Mortal
premises
premises
AI NOTES ppt 4.pdf
Using the rules of inference to build arguments An example
It is not sunny this afternoon and it is colder than yesterday.
If we go swimming it is sunny.
If we do not go swimming then we will take a canoe trip.
If we take a canoe trip then we will be home by sunset.
We will be home by sunset
Using the rules of inference to build arguments An example
1. It is not sunny this afternoon and it is colder than yesterday.
2. If we go swimming it is sunny.
3. If we do not go swimming then we will take a cycle trip.
4. If we take a cycle trip then we will be home by sunset.
5. We will be home by sunset
propositions hypotheses
Using the rules of inference to build arguments An example

More Related Content

PPT
Logic.ppt
PPT
Propositional and first-order logic different chapters
PPT
Propositional and first-order logic different chapters
PPTX
Week 3 Logic and Proof Logic and Proof Logic and Proof
PDF
Ch1_part3.pdfเานดวย่ากจวาเครากนยวกวสดสสนยดสรตสะารนสเ
PPTX
Chapter1p3.pptx
PDF
Chapter 01 - p3.pdf
PDF
AI Lesson 11
Logic.ppt
Propositional and first-order logic different chapters
Propositional and first-order logic different chapters
Week 3 Logic and Proof Logic and Proof Logic and Proof
Ch1_part3.pdfเานดวย่ากจวาเครากนยวกวสดสสนยดสรตสะารนสเ
Chapter1p3.pptx
Chapter 01 - p3.pdf
AI Lesson 11

Similar to AI NOTES ppt 4.pdf (20)

PPTX
Knowledge & logic in Artificial Intelligence.pptx
PDF
Knowledge Representation, Prepositional Logic, Representation and Mapping
PPTX
Module4_AI 4th semester engineering.pptx
PPTX
Foundations of Knowledge Representation in Artificial Intelligence.pptx
PPTX
Basic Knowledge Representation and Reasonong
PPT
Predicate logic_2(Artificial Intelligence)
PPT
Top school in delhi ncr
PPT
rulesOfInference.ppt
PPT
predicateLogic.ppt
PPT
Propositional Logic in Artificial Intelligence
PPT
PropositionalLogic.ppt
PPT
Propositional Logic, Truth Table, Compound Proposition
PPT
Propositional Logic for discrete structures
PDF
Chapter 4 - Knowledge Representation and Reasoning (1).pdf
PPTX
AIML 7th semester VTU
PPTX
Inference in First-Order Logic
DOC
artficial intelligence
PDF
Logic programming (1)
PDF
16_FirstOrderLogic.p_4_moduleModuleNotespdf
PPTX
continuity of module 2.pptx
Knowledge & logic in Artificial Intelligence.pptx
Knowledge Representation, Prepositional Logic, Representation and Mapping
Module4_AI 4th semester engineering.pptx
Foundations of Knowledge Representation in Artificial Intelligence.pptx
Basic Knowledge Representation and Reasonong
Predicate logic_2(Artificial Intelligence)
Top school in delhi ncr
rulesOfInference.ppt
predicateLogic.ppt
Propositional Logic in Artificial Intelligence
PropositionalLogic.ppt
Propositional Logic, Truth Table, Compound Proposition
Propositional Logic for discrete structures
Chapter 4 - Knowledge Representation and Reasoning (1).pdf
AIML 7th semester VTU
Inference in First-Order Logic
artficial intelligence
Logic programming (1)
16_FirstOrderLogic.p_4_moduleModuleNotespdf
continuity of module 2.pptx
Ad

Recently uploaded (20)

PPTX
Build Your First AI Agent with UiPath.pptx
DOCX
search engine optimization ppt fir known well about this
PPTX
Microsoft Excel 365/2024 Beginner's training
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Five Habits of High-Impact Board Members
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPTX
Chapter 5: Probability Theory and Statistics
PPT
Geologic Time for studying geology for geologist
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
STKI Israel Market Study 2025 version august
Build Your First AI Agent with UiPath.pptx
search engine optimization ppt fir known well about this
Microsoft Excel 365/2024 Beginner's training
Benefits of Physical activity for teenagers.pptx
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Custom Battery Pack Design Considerations for Performance and Safety
Final SEM Unit 1 for mit wpu at pune .pptx
Five Habits of High-Impact Board Members
A review of recent deep learning applications in wood surface defect identifi...
Developing a website for English-speaking practice to English as a foreign la...
Chapter 5: Probability Theory and Statistics
Geologic Time for studying geology for geologist
Module 1.ppt Iot fundamentals and Architecture
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
NewMind AI Weekly Chronicles – August ’25 Week III
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
UiPath Agentic Automation session 1: RPA to Agents
Zenith AI: Advanced Artificial Intelligence
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
STKI Israel Market Study 2025 version august
Ad

AI NOTES ppt 4.pdf

  • 2. Intelligent agents should have capacity for: • Perceiving : Acquiring information from environment. • Knowledge Representation : Representing its understanding of the world. • Reasoning : Inferring the implications of what it knows and of the choices it has. • Acting: Choosing what it want to do and carry it out.
  • 3. Knowledge based system • Representation of knowledge and the reasoning process are central to the entire field of artificial intelligence. • The primary component of a knowledge-based agent is its knowledge-base. • Human beings are essentially knowledge based creatures. • Experiences/ rules to solve a problem • A knowledge-base is a set of sentences. Each sentence is expressed in a language called the knowledge representation language
  • 4. Inferencing • Mechanisms to derive new sentences from old ones. This process is known as inferencing or reasoning. • Inference must obey the primary requirement that the new sentences should follow logically from the previous ones.
  • 5. Logic • Logic is the primary vehicle for representing and reasoning about knowledge. • Provides way to represent+ reasoning • A logic consists of two parts, a language and a method of reasoning. • The logical language, in turn, has two aspects, syntax and semantics. • Thus, to specify or define a particular logic, one needs to specify three things:
  • 6. • Syntax: The atomic symbols of the logical language, and the rules for constructing well formed, non-atomic expressions (symbol structures) of the logic. • Syntax specifies the symbols in the language and how they can be combined to form sentences. Hence facts about the world are represented as sentences in logic. • Semantics: The meanings of the atomic symbols of the logic, and the rules for determining the meanings of non-atomic expressions of the logic. • It specifies what facts in the world a sentence refers to. Hence, also specifies how you assign a truth value to a sentence based on its meaning in the world. • Syntactic Inference Method: The rules for determining a subset of logical expressions, called theorems of the logic. It refers to mechanical method for computing (deriving) new (true) sentences from existing sentences
  • 8. Logical systems with different syntax and semantics. • There are a number of logical systems • Propositional logic : • Simplest kind of logic • All objects described are fixed or unique "John is a student" student(john) • Here John refers to one unique person. • First order predicate logic: • Objects described can be unique or variables to stand for a unique object . • "All Men are mortal" For All(M) [Men(M) -> Mortal(M)] • Here M can be replaced by many different unique Men.
  • 9. • Temporal Logic: • Represents truth over time. • Modal Logic: • Represents doubt • Higher order logics: • Allows variable to represent many relations between objects.
  • 10. Propositional Logic • In propositional logic (PL) a user defines a set of propositional symbols, like P and Q. • User defines the semantics of each of these symbols. • For example, P means "It is hot" • Q means "It is humid" • R means "It is raining"
  • 11. • A sentence (also called a formula or well-formed formula) is defined as: • 1. A symbol • 2. If S is a sentence, then ~S is a sentence, where "~" is the "not" logical operator • 3. If S and T are sentences, then (S v T), (S ^ T), (S => T), and (S <=> T) are sentences, where the four logical connectives correspond to "or," "and," "implies," and "if and only if," respectively
  • 12. • Examples of PL sentences: • (P ^ Q) => R (here meaning "If it is hot and humid, then it is raining") • Q => P (here meaning "If it is humid, then it is hot") • Q (here meaning "It is humid.")
  • 13. • Interpretation of the sentence : • Given the truth values of all of the constituent symbols in a sentence, that sentence can be "evaluated" to determine its truth value (True or False). This is called an interpretation of the sentence. • Model : A model is an interpretation (i.e., an assignment of truth values to symbols) of a set of sentences such that each sentence is True. A model is just a formal mathematical structure that "stands in" for the world. • Tautology : A valid sentence (also called a tautology) is a sentence that is True under all interpretations. Hence, no matter what the world is actually like or what the semantics is, the sentence is True. For example "It's raining or it's not raining."
  • 14. If you listen you will hear what I’m saying You are listening Therefore, you hear what I am saying Valid Arguments in Propositional Logic Is this a valid argument? Let p represent the statement “you listen” Let q represent the statement “you hear what I am saying” The argument has the form:
  • 15. Valid Arguments in Propositional Logic is a tautology (always true) This is another way of saying that
  • 16. Valid Arguments in Propositional Logic When we replace statements/propositions with propositional variables we have an argument form. Defn: An argument (in propositional logic) is a sequence of propositions. All but the final proposition are called premises. The last proposition is the conclusion The argument is valid iff the truth of all premises implies the conclusion is true An argument form is a sequence of compound propositions
  • 17. Valid Arguments in Propositional Logic The argument form with premises and conclusion is valid when is a tautology We prove that an argument form is valid by using the laws of inference But we could use a truth table. Why not?
  • 18. Rules of Inference for Propositional Logic modus ponens modus ponens (Latin) translates to “mode that affirms” The 1st law
  • 19. Rules of Inference for Propositional Logic modus ponens If it’s a nice day we’ll go to the Park. Assume the hypothesis “it’s a nice day” is true. Then by modus ponens it follows that “we’ll go to the Park”.
  • 20. The rules of inference
  • 21. • Constructive Dilemma • (P→Q) ∧ (R →S) • P ∨ R • ∴Q ∨ S • Destructive Dilemma • (P→Q) ∧ (R →S) • ~Q ∨ ~S • ∴~P ∨ ~R • DeMorgan's law is also applicable in logic machines.
  • 22. You might think of this as some sort of game. You are given some statement, and you want to see if it is a valid argument and true You translate the statement into argument form using propositional variables, and make sure you have the premises right, and clear what is the conclusion You then want to get from premises/hypotheses (A) to the conclusion (B) using the rules of inference. So, get from A to B using as “moves” the rules of inference Another view on what we are doing
  • 23. Using the resolution rule (an example) 1. Tom is skiing or it is not snowing. 2. It is snowing or Bart is playing hockey. 3. Consequently Tom is skiing or Bart is playing hockey. We want to show that (3) follows from (1) and (2)
  • 24. Using the resolution rule (an example) 1. Tom is skiing or it is not snowing. 2. It is snowing or Bart is playing hockey. 3. Consequently Tom is skiing or Bart is playing hockey. propositions hypotheses Consequently Tom is skiing or Bart is playing hockey Resolution rule
  • 25. Rules of Inference & Quantified Statements All men are Mortal, said Jane John is a man Therefore John is Mortal Above is an example of a rule called “Universal Instantiation”. We conclude P(c) is true, where c is a particular/named element in the domain of discourse, given the premise
  • 26. Rules of Inference & Quantified Statements
  • 27. Rules of Inference & Quantified Statements All men are Mortal said Jane John is a man Therefore John is Mortal premises premises
  • 29. Using the rules of inference to build arguments An example It is not sunny this afternoon and it is colder than yesterday. If we go swimming it is sunny. If we do not go swimming then we will take a canoe trip. If we take a canoe trip then we will be home by sunset. We will be home by sunset
  • 30. Using the rules of inference to build arguments An example 1. It is not sunny this afternoon and it is colder than yesterday. 2. If we go swimming it is sunny. 3. If we do not go swimming then we will take a cycle trip. 4. If we take a cycle trip then we will be home by sunset. 5. We will be home by sunset propositions hypotheses
  • 31. Using the rules of inference to build arguments An example