Lecture 4 - Knowledge Representation and Reasoning (I)
Lecture 4 - Knowledge Representation and Reasoning (I)
Introduction to AI and
Machine Learning
Lecture 3 – Knowledge Representation and Reasoning (I)
Dr. UMAIR, Zuneera
What is AI?
The science and engineering of making
intelligent machines, specially intelligent
computer programs (John McCarthy)
First work on AI was presented by Warren
McCulloch and Walter Pitts in 1943
Its about algorithms enabled by
constraints exposed by representation
that model targeted thinking, perception
and action (Patrick Winston)
We all know about the Turing test, right?
Knowledge Representation and
Reasoning
Humans are best at understanding, reasoning, and
interpreting knowledge.
But how machines do all these things comes
under knowledge representation and
reasoning
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.
Knowledge Representation and
Reasoning
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.
Knowledge representation is not just
storing data into some database, but it
also enables an intelligent machine to
learn from that knowledge and
What to Represent:
Following are the kind of knowledge which needs to be represented in
AI systems:
1. Object: All the facts about objects in our world domain. E.g., Guitars
contains strings, trumpets are brass instruments.
2. Events: Events are the actions which occur in our world.
3. Performance: It describe behavior which involves knowledge about
how to do things.
4. Meta-knowledge: It is knowledge about what we know.
5. Facts: Facts are the truths about the real world and what we
represent.
6. 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).
The relation between knowledge
and intelligence:
Knowledge plays an important role in
demonstrating intelligent behavior in AI agents.
An agent is only able to accurately act on some
input when he has some knowledge or experience
about that input.
AI knowledge cycle:
An Artificial intelligence
system has the following
components for
displaying intelligent
behavior:
Perception
Learning
Knowledge
Representation and
Reasoning
Planning
Execution
AI Knowledge Cycle
man(Marcus)
∀x = man (x) ----------> mortal (x)s
4. Procedural knowledge:
Disjunction A sentence which has ∨ connective, such as P ∨ Q. is called disjunction, where P and Q are the propositions.
Example: "Rebecca is a doctor or Engineer",
: Here P= Rebecca is Doctor. Q= Rebecca is Engineer, so we can write it as P ∨ Q.
Implication A sentence such as P → Q, is called an implication. Implications are also known as if-then rules. 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
Inference:
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.
Rules of Inference in Artificial intelligence
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.
Contrapositive: The negation of converse is termed as
contrapositive, and it can be represented as ¬ Q → ¬ P.
Inverse: The negation of implication is called inverse.
It can be represented as ¬ P → ¬ Q.
Rules of Inference in Artificial intelligence
1. Modus Ponens
2. Modus Tollens
3. Hypothetical Syllogism
4. Disjunctive Syllogism
5. Addition
6. Simplification
7. Resolution
Inference Rules:
1. Model 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:
Notation:
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.
Inference Rules
2. Modus Tollens
Points to remember:
The main connective for universal quantifier ∀ is
implication →.
The main connective for existential quantifier ∃ is
and ∧.
Properties of Quantifiers: