0% found this document useful (0 votes)
0 views

Chapter-4

Chapter 4 discusses knowledge representation and reasoning, focusing on knowledge-based agents (KBAs) that maintain and reason over internal knowledge to make decisions. It covers the components of KBAs, including the knowledge base and inference system, as well as the basics of propositional logic, types of propositions, and logical connectives. The chapter also explains the semantics of logic and the properties of logical operators.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Chapter-4

Chapter 4 discusses knowledge representation and reasoning, focusing on knowledge-based agents (KBAs) that maintain and reason over internal knowledge to make decisions. It covers the components of KBAs, including the knowledge base and inference system, as well as the basics of propositional logic, types of propositions, and logical connectives. The chapter also explains the semantics of logic and the properties of logical operators.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

CHAPTER 4

KNOWLEDGE
REPRESENTATION AND
REASONING
OUTLINE
 Knowledge Based Agents
 Logic
 Propositional Logic
KNOWLEDGE-BASED AGENTS

 Intelligent agents
need 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
CONT’D…
A KBA 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.
CONT’D…
 In AI, knowledge-based agents use
a process of reasoning over an
internal representation of knowledge
to decide what actions to take.
 These agents can represent the world
with some formal representation and
act intelligently.
 KBAs are composed of two main parts:
 Knowledge-base (KB) and
 Inference system
CONT’D…
1. Knowledge Base (KB)
 It is the central component of a knowledge-
based agent.
 A knowledge base is a set of sentences.
 Sentence is used as a technical term.
 It is related but not identical to the sentences
of English and other natural languages.
 Each sentence is expressed in a language
called a knowledge representation
language and represents some assertion
about the world.
CONT’D…
 There must be a way to add new
sentences to the knowledge base and a
way to query what is known.
 The standard names for these
operations are TELL and ASK,
respectively.
 Both operations may involve inference.

Inference
 Inference is deriving new sentences
from old.
LOGIC
 Knowledge bases consist of sentences.
 These sentences are expressed
according to the syntax of the
representation language, which
specifies all the sentences that are
well formed.
 Example: “x + y = 4” is a well-formed
sentence, whereas “x4y+ = “is not.
A logic must also define the
semantics, or meaning, of sentences.
CONT’D…
 The semantics defines the truth of
each sentence with respect to each
possible world.
 For example, the semantics for
arithmetic specifies that the
sentence “x + y = 4” is true in a
world where x is 2 and y is 2, but
false in a world where x is 1 and y is
1.
PROPOSITIONAL LOGIC
 Propositionallogic (PL) is the simplest
form of logic where all the statements
are made by propositions.
A proposition is a declarative
statement which is either true or false.
 It is a technique of knowledge
representation in logical and
mathematical form.
 The syntax of propositional logic
defines the allowable sentences.
CONT’D…
 There are two types of propositions:
1. Atomic Propositions

2. Compound propositions

1. Atomic Propositions
 The atomic sentences consist of a

single proposition symbol.


 Each such symbol stands for a
proposition that can be true or false.
CONT’D…
 Examples of atomic propositions:
a) 2+2 is 4, it is an atomic proposition
as it is a true fact.
b) "The Sun is cold" is also a propositio
n as it is a false fact.
2. Complex Propositions
 Complex sentences are constructed

from simpler sentences, using


parentheses and operators called
logical connectives.
CONT’D…
 Logical connectives are used to
connect two simpler propositions or
representing a sentence logically.
 There are five connectives in common

use:
1. Negation:
 A sentence such as ¬ P is called

negation of P.
 A literal can be either Positive literal

or negative literal.
CONT’D…
2. Conjunction:
 A sentence which has ∧ connective

such as, P ∧ Q is called a


conjunction.
 Example: Chala is intelligent and
hardworking.
 It can be written as:

 P= Chala is intelligent,
 Q= Chala is hardworking. → P∧ Q.
CONT’D…
3. Disjunction:
 A sentence which has ∨ connective, such as P

∨ Q is called disjunction, where P and Q are the


propositions.
 Example: “Chala is a doctor or Engineer"

 P= Chala is Doctor

 Q= Chala is engineer, so we can write it as P ∨

Q.
4. Implication:
 A sentence such as P → Q, is called an

implication.
 Implications are also known as if-then rules.
CONT’D…
 It can be represented as:
 If it is raining, then the street is wet.
 Let P= It is raining, and Q= Street is

wet, so it is represented as P → Q
5. Biconditional:
 A sentence such as P⇔ Q is a

Biconditional sentence
 Example: If I am breathing, then I am

alive
 P= I am breathing, Q= I am alive, it can be
represented as P ⇔ Q.
Cont’d…
 The semantics define the rules to
determine the truth of a sentence
with respect to a particular model.
 In propositional logic, a model simply

sets the truth value-true or false-for


every proposition symbol.
 Semantics can be specified by truth

tables.
CONT’D…
CONT’D…
CONT’D…
Precedence of operators
 Just like arithmetic operators, there is a

precedence order for propositional


connectors or logical operators.
 List of the precedence order for operators

are:
 Parentheses
 Negation
 Conjunction (AND)
 Disjunction (OR)
 Implication
 Biconditional
CONT’D…
Logical equivalence
 Two propositions are said to be
logically equivalent if and only if the
columns in the truth table are
identical to each other.
CONT’D…
Properties of Operators:
• Commutativity:

• P∧ Q= Q ∧ P, or
• P ∨ Q = Q ∨ P
• Associativity:

• (P ∧ Q) ∧ R= P ∧ (Q ∧ R),
• (P ∨ Q) ∨ R= P ∨ (Q ∨ R)
• Double-negation elimination:

• ¬ (¬P) = P.
CONT’D…
• Identity element:
• P ∧ True = P,
• P ∨ True= True.
• Distributive:
• P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
• P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
• DE Morgan's Law:
• ¬ (P ∧ Q) = (¬P) ∨ (¬Q)
• ¬ (P ∨ Q) = (¬ P) ∧ (¬Q).

You might also like