0% found this document useful (0 votes)
21 views97 pages

Unit 2 - PPT

The document outlines the syllabus for a course on Knowledge Representation, Planning, and Reasoning in Artificial Intelligence and Machine Learning at MIT School of Computing. It covers various techniques of knowledge representation, including logical representation, semantic networks, and frames, as well as the importance of reasoning and decision-making in AI. Additionally, it discusses the properties and challenges of knowledge representation systems.

Uploaded by

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

Unit 2 - PPT

The document outlines the syllabus for a course on Knowledge Representation, Planning, and Reasoning in Artificial Intelligence and Machine Learning at MIT School of Computing. It covers various techniques of knowledge representation, including logical representation, semantic networks, and frames, as well as the importance of reasoning and decision-making in AI. Additionally, it discusses the properties and challenges of knowledge representation systems.

Uploaded by

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

MIT School of Computing

Department of Computer Science & Engineering

Third Year Engineering

Artificial Intelligence and Machine Learning

Class - T.Y.
PLD(SEM-IV)

Unit - II
Knowledge Representation, Planning & Reasoning

AY 2024-2025
1
MIT School of Computing
Department of Computer Science & Engineering

Unit-II Syllabus

● Knowledge representation issues;


● Techniques of knowledge representation- Logical Representation,
● Semantic Network Representation,
PLD
● Frame Representation, Production Rules;
● Role of Planning; Forward Chaining and backward chaining in AI;
● Reasoning in Artificial intelligence;
● Probabilistic reasoning: Bayes' theorem;
● Subsets of Artificial Intelligence.

2
MIT School of Computing
Department of Computer Science & Engineering

What is Knowledge Representation?


Humans are good at reasoning, understanding, analyzing, and
interpreting what they are seeing in their daily life. Human know how to
react and respond to the situation that are going through.

Knowledge is the
information about a
domain that can be used
to solve problems in that
domain.

But how to make machines Knowledge


perform similar actions? 3
MIT School of Computing
Department of Computer Science & Engineering

Importance of intelligence

Decision: Not to jump Decision: To jump

You are intelligent because:


• you have knowledge Machine does not have knowledge,
• you have an ability to process gathered intelligence and reasoning ability because it
information is not intelligent.
• you have an ability to take decision

4
MIT School of Computing
Department of Computer Science & Engineering

We have to induce right knowledge in the machine so that it can process it to take
right decision; like if we write right program we will get right output.

A machine sounds like an empty box unless it is encoded with some features or
information. Therefore, to make it a valuable machine, it is required to put the
necessary knowledge in it. So that it could understand it and is able to take the right
decisions.
There are three factors which are put into the machine, which makes it valuable:
1. Knowledge: The information related to the environment is stored in the
machine.
2. Reasoning: The ability of the machine to understand the stored knowledge.
3. Intelligence: The ability of the machine to make decisions on the basis of the
stored information.

All these things comes under knowledge representation and reasoning also known as
KR or KRR. It is the representation of the information that is extracted from the real
world and utilized for solving complex problems.

5
MIT School of Computing
Department of Computer Science & Engineering

6
MIT School of Computing
Department of Computer Science & Engineering

Types of Knowledge Representation


Knowledge is awareness gained by experiences of facts, data, and
situations.

7
MIT School of Computing
Department of Computer Science & Engineering

Cont.
Structural knowledge:
Declarative knowledge:
• It is the basic knowledge to problem solving
• Describes what is known about problem
• describes relationships between various
• Tells us facts- what things are
concepts/objects
• Includes: concepts, facts and objects
• Also known as descriptive knowledge Meta knowledge:
• Describes knowledge about another
Procedural knowledge: knowledge
• Describes how to solve problem • Used to pick other knowledge that is best
• Also known as Imperative knowledge suited for solving a problem
• Provides direction on how to do
something Heuristic knowledge:
• Can be directly applied to a task. • It is representing knowledge of some experts
• Include: rules, strategies and in a field or subject
procedures • knowledge created by previous experiences,
approaches

8
MIT School of Computing
Department of Computer Science & Engineering

Cycle of Knowledge Representation


Perception gathers information from it’s
environment. This component can be in
audio, visual or any other form.

Learning is responsible for data stored by the


perception component.

Representation is related to representing the


knowledge in proper way so that machine’s
can understand what the knowledge says. It is
Reasoning is involved to show the intelligence the most important component in the cycle of
of machine as like real human. Reasoning is knowledge.
another important component. Although Planning is the way how the execution
knowledge representation and reasoning are process will be done. Execution is the final
different components they are mostly coupled. component in the cycle which completes the
cycle.

9
MIT School of Computing
Department of Computer Science & Engineering

Relation between Knowledge &


Intelligence

Example: There is one decision-maker


whose actions are justified by sensing the
environment and using knowledge. But, if
we remove the knowledge part here, it will
not be able to display any intelligent
behavior.

10
MIT School of Computing
Department of Computer Science & Engineering

Properties of a Knowledge Representation system

A good knowledge representation system must possess the following properties.

Representational It is the ability of the system to represent all kinds of knowledge


Adequacy needed in a specific domain.

It is the ability of a knowledge representation system to manipulate


Inferential
the current stored knowledge so that newly gained knowledge could
Adequacy
be added.

Inferential It is the ability of the system to directly add new knowledge in the
Efficiency system with efficiency.

It is the ability of the system to automatically acquire new knowledge


Acquisitional
from the environment. This leads the system to give more productive
Efficiency
result as more knowledge adds up with the current knowledge.

11
MIT School of Computing
Department of Computer Science & Engineering

Techniques of Knowledge Representation

12
MIT School of Computing
Department of Computer Science & Engineering

Cont.
Logical Representation

It is the basic method used to represent the knowledge of a machine. The term logic
means to apply intelligence over the stored knowledge.

Further divided as:

This technique is also known as propositional calculus, statement


Propositional
logic, or sentential logic. It is used for representing the knowledge
Logic
about what is true and what is false.

It is also known as Predicate logic or First-order predicate calculus


(FOPL). This technique is used to represent the objects in the form of
First-order Logic predicates or quantifiers. It is different from Propositional logic as it
removes the complexity of the sentence represented by it. In short,
FOPL is an advance version of propositional logic.

13
MIT School of Computing
Department of Computer Science & Engineering

Cont.
Rule-based System

In the rule-based system, we impose rules over the propositional logic and first-
order logic techniques. If-then clause is used for this technique. For example, if
there are two variables A and B. Value of both A and B is True. Consequently, the
result of both should also be True and vice-versa.

Semantic Networks

The technique is based on storing the knowledge into the system in the form of a
graph. Nodes of a graph represent the objects which exist in the real world, and the
arrow represents the relationship between these objects. Such techniques show the
connectivity of one object with another object.

14
MIT School of Computing
Department of Computer Science & Engineering

Cont.
Frames

In this technique, the knowledge is stored via slots and fillers. As we have seen in
DBMS, we store the information of an employee in the database, where, the Slots
are the entities and Fillers are its attributes. They are together stored in a frame.
So, whenever there is a requirement, the machine infers the necessary information
to take the decision.

Script is an advanced technique over the Frames. Here, the information is stored in
the form of a script. The script is stored in the system containing all the required
information. The system infers the information from that script and solves the
problem

15
MIT School of Computing
Department of Computer Science & Engineering

Challenges/Issues in Knowledge Representation

1. Choosing Granularity: How much detailed knowledge is needed to be


represented?

2. Set of Objects: How to represent the set of objects?

3. Finding the right structure: The information is stored in a large amount. The
question is how to access the relevant information out of whole?

16
MIT School of Computing
Department of Computer Science & Engineering

LOGICAL REPRESENTATION
Language with some concrete rules which deals with propositions and has no
ambiguity in representation.

It consists of precisely defined syntax and semantics which supports the sound
inference. Each sentence can be translated into logics using syntax and semantics.

• Rules which decide how to construct legal sentences in the logic.


Syntax
• Determines which symbol we can use in knowledge
representation.
• How to write those symbols.

Semantics
• Rules by which we can interpret the sentence in the logic.
• Defined the truth or meaning of sentence a world.

17
MIT School of Computing
Department of Computer Science & Engineering

TYPES OF LOGICAL REPRESENTATION


Propositional Logic First-order Logic

• Also known as propositional calculus or


statement logic.
• Simplest methods of knowledge
representation to a machine.
• Proposition means sentences. • Also known as the First Order Predicate
• Applies the Boolean logic to convert our Calculus Logic (FOPL).
real-world data into a format that is • Represents the objects in quantifiers and
readable to the computer. predicates.
• Method of expressing knowledge in logical • Advanced version of propositional logic.
and mathematical terms.
• "Proposition“ refers to a declarative
statement that can be true or false.

18
MIT School of Computing
Department of Computer Science & Engineering

PROPOSITIONAL LOGIC (BASIC FACTS)

• Because it operates with 0 and 1, propositional logic is also known as Boolean logic.
• Symbolic variables are used to express the logic, and any symbol can be used to represent a
proposition, such as A, B, C, P, Q, R, and so on.
• Propositions can be true or false, but not both at the same time.
• An object, relations or functions, and logical connectives make up propositional logic.
• Logical operators are another name for these connectives.
• The essential parts of propositional logic are propositions and connectives.
• Connectives are logical operators that link two sentences together.
• Statements that are inquiries, demands, or opinions are not propositions, such as "Where is
Rohini", "How are you", and "What is your name" are not propositions.

19
MIT School of Computing
Department of Computer Science & Engineering

PROPOSITIONAL LOGIC (CATEGORIES)


Propositions are divided into two categories

• Simple assertions are referred to as atomic propositions.


• Made up of only one proposition sign.
Atomic • Sentences that must be true or false in order to pass.
Propositions Example:
1. 2+2 is 4, it is an atomic proposition as it is a true fact.
2. "The Sun is cold" is also a proposition as it is a false fact.

• Simpler or atomic statements are combined with parenthesis


and logical connectives to form compound propositions.
Compound
Example:
Propositions
1. "It is raining today, and street is wet."
2. "Ankit is a doctor, and his clinic is in Mumbai."

20
MIT School of Computing
Department of Computer Science & Engineering

PROPOSITIONAL LOGIC (LOGICAL CONNECTIVES)


• Used to link two simpler ideas or to represent a statement logically.
• Can form compound assertions.
• Five primary connectives.
Ram can play tennis (let’s take it as variable X)
• Ram cannot play tennis – There is a negation in the sentence, so symbolic
representation will be ˜ X or ¬ X
• Ram can play tennis and badminton – There is a new addition ‘Badminton’,
let’s take it as variable Y. Now, this sentence has a Conjunction, so symbolic
representation will be X ˄ Y
• Ram can play tennis or badminton – Here is a Disjunction, so symbolic
representation will be X ˅ Y
• If Ram can play tennis then he can play badminton – There is a condition,
so symbolic representation will be X → Y
• Ram can play tennis if and only if he can play badminton – It is a
biconditional sentence, so symbolic representation will be X Y

21
MIT School of Computing
Department of Computer Science & Engineering

PROPOSITIONAL LOGIC
(LOGICAL CONNECTIVES)
Once the machine reads the message, it applies the Boolean logic-based formulas to create the
TRUE and FALSE chart to interpret the final output of a complex proposition.

Negation Conjunction Disjunction Implication Bi-conditional


P Q
¬P ¬Q P^Q PvQ P→Q P⇔Q

True True False False True True True True

True False False True False True False False

False True True False False True True False

False False True True False False True True


22
MIT School of Computing
Department of Computer Science & Engineering

PROPOSITIONAL LOGIC (PROPERTIES OF OPERATORS)

Commutativity: Associativity:
P ∧ Q= Q ∧ P, or (P ∧ Q) ∧ R = P ∧ (Q ∧ R),
P ∨ Q = Q ∨ P. (P ∨ Q) ∨ R= P ∨ (Q ∨ R).

Identity element: Distributive:


P ∧ True = P, P ∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
P ∨ True= True. P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).

DE Morgan's Law:
Double-negation elimination:
¬(P ∧ Q) = (¬P) ∨ (¬Q),
¬(¬P) = P.
¬(P ∨ Q) = (¬ P) ∧ (¬Q).

23
MIT School of Computing
Department of Computer Science & Engineering

PROPOSITIONAL LOGIC (LIMITATIONS)

• This is not possible to represent relations like ALL, some, or none with propositional
logic.

Example:
All the girls are intelligent.
Some apples are sweet.

• The expressive power of propositional logic is restricted.

• We can't explain propositions in propositional logic in terms of their qualities or logical


relationships

24
MIT School of Computing
Department of Computer Science & Engineering

FIRST-ORDER LOGIC
Propositional Logic is failed to represent complicated phrases or natural language statements.
"Some humans are intelligent"
PL logic is insufficient to represent. we required some more powerful logic, such as first-order
logic.
FOL is also called predicate logic.

First-order logic is another method of knowledge representation. It is a variant of propositional


logic.

FOL not only assumes that does the world contains facts (like PL does), but it also assumes the
following:
• Objects: A, B, people, numbers, colors, wars, theories, squares, pit, etc.
• Relations: It is unary relation such as red, round, sister of, brother of, etc.
• Function: best friend, third inning of, end of, etc.

25
MIT School of Computing
Department of Computer Science & Engineering

FIRST-ORDER LOGIC
First-order logic also has two main parts as a natural language:
(i) Syntax (ii) Semantics

Syntax of FOL determines which set of symbols represents a logical expression.

26
MIT School of Computing
Department of Computer Science & Engineering

FIRST-ORDER LOGIC (ATOMIC SENTENCES)

• Atomic sentences are the most fundamental first-order logic sentences. These
sentences are made up of a predicate symbol, a parenthesis, and a series of terms.
• Predicate can be used to represent atomic sentences (term1, term2, ......, term n).
• Predicate logic or First-order predicate logic are other names for first-order logic.

Example:
• Ravi and Ajay are brothers: => Brothers(Ravi, Ajay).
• Chinky is a cat: => cat (Chinky).

27
MIT School of Computing
Department of Computer Science & Engineering

FIRST-ORDER LOGIC (COMPLEX SENTENCES)

Connectives are used to join atomic sentences to form complex sentences.

Divided into two parts:


• Subject: The major component of the sentence is the subject.
• Predicate: A predicate is a relationship that ties two atoms together in a sentence.

Example: "x is an integer."

28
MIT School of Computing
Department of Computer Science & Engineering

QUANTIFIERS IN FIRST-ORDER LOGIC

Quantifiers generate quantification and specify the number of specimen in the universe.

Quantifiers allow us to determine or identify the range and scope of the variable in a
logical expression.

There are two types of quantifiers:


• Universal quantifier: for all, everyone, everything.
• Existential quantifier: for some, at least one.

29
MIT School of Computing
Department of Computer Science & Engineering

FIRST-ORDER LOGIC (UNIVERSAL QUANTIFIERS)

Quantifiers generate quantification and specify the number of specimen in the universe.

Specify that the statement within the range is true for everything or every instance of a particular
thing.

Universal quantifiers are denoted by a symbol (∀ ) that looks like an inverted A. In a universal
quantifier, we use → .

If x is a variable, then ∀ x can read as:

• For all x
• For every x
• For each x

30
MIT School of Computing
Department of Computer Science & Engineering

FIRST-ORDER LOGIC (UNIVERSAL QUANTIFIERS)

Example: Every Student Likes Educative.

Explanation:

In logical notation, it can be written as:

∀ x student(x) → likes(x, Educative)

This can be interpreted as: There is every x


where x is a student who likes Educative.

31
MIT School of Computing
Department of Computer Science & Engineering

FIRST-ORDER LOGIC (EXISTENTIAL QUANTIFIERS)

Existential quantifiers are used to express that the statement within their scope is true for at least
one instance of something.

∃ , which looks like an inverted E, is used to represent them. We always use AND or conjunction
symbols.

If x is a variable, the existential quantifier will be ∃ x:

• For some x
• There exists an x
• For at least one x

32
MIT School of Computing
Department of Computer Science &
Engineering

FIRST-ORDER LOGIC (EXISTENTIAL QUANTIFIERS)

Example: Some people like Football.

Explanation:

In logical notation, it can be written as:

∃ x: people(x) ∧ likes Football(x)

It can be interpreted as: There are some x


where x is people who like football.

33
MIT School of Computing
Department of Computer Science & Engineering

EXAMPLES
All birds fly.
The predicate in this question is "fly(bird)."
Because all birds are able to fly, it will be portrayed as follows.
∀ x bird(x) →fly(x).

Every man respects his parent.


The predicate in this question is "respect(x, y)," where x=man, and y= parent.
Because there is every man so will use ∀, and it will be portrayed as follows:
∀ x man(x) → respects (x, parent).

Some boys play cricket.


In this question, the predicate is "play(x, y), " where x= boys, and y= game.
Because there are some boys so we will use ∃, and it will be portrayed as:
∃ x boys(x) ∧ play(x, cricket).

34
MIT School of Computing
Department of Computer Science & Engineering

EXAMPLES
Not all students like both Mathematics and Science.
The predicate in this question is "like(x, y)," where x= student, and y= subject.
Because there are not all students, so we will use ∀ with negation, so following portray
for this:
¬∀ (x) [ student(x) → like(x, Mathematics) ∧ like(x, Science)].

Only one student failed in Mathematics.


The predicate in this question is "failed(x, y)," where x= student, and y= subject.
Because there is only one student who failed in Mathematics, so we will use following
portray for this:
∃ (x) [ student(x) ∧ failed (x, Mathematics) ∧∀ (y) [¬(x==y) ∧ student(y) → ¬failed (x,
Mathematics) ] ].

35
MIT School of Computing
Department of Computer Science & Engineering

FIRST-ORDER LOGIC (FREE AND BOUND VARIABLES)

Free Variable:

In a formula, a variable is said to be a free variable if it exists outside of the quantifier's


scope.

Example: ∀ x ∃(y)[P (x, y, z)], where z is a free variable.

Bound Variable:

In a formula, a variable is considered to be a bound variable if it exists within the


quantifier's scope.

Example: ∀ x, ∀ y [A (x) B( y)], here x and y are the bound variables.

36
MIT School of Computing
Department of Computer Science & Engineering

Semantic Network Representation

Semantic Networks or Semantic Net is a knowledge representation technique used


for propositional information.

It is a knowledge base that represents concepts in a network and the systematic


relations between them.

It is also known as Associative Nets.

Semantic Network is a directed or undirected graph consisting of vertices.

37
MIT School of Computing
Department of Computer Science & Engineering

Cont.
Graphical notation for representing knowledge in interconnected nodes pattern.

Popular in AI and NLP tasks. It represents knowledge or supporting reasoning.

Alternative of predicate logic.

Nodes represents objects

rectangle
circle (physical) ellipse (concept)
(situation)

Arcs represents relation between objects (also known as links/arrows).

Link Labels (specify relationships)


38
MIT School of Computing
Department of Computer Science & Engineering

COMPONENTS OF SEMANTIC NETWORK


Consists of:
1. Nodes: Represent the object or concept.
Lexical Components 2. Links: Denoting relation between nodes.
3. Labels: Denoting particular objects & relations.

Links and nodes form a directed graph wherein the labels


Structural Component
are placed on the link and nodes.

Semantic Component Meanings related to the links and labels of nodes.

The creation of new links and nodes is permitted by


Procedural Components constructors, whereas the destructors are responsible for
the removal of links and nodes.

39
MIT School of Computing
Department of Computer Science & Engineering

Example
Mamm
Mat al Tom is a cat.
Tom caught a bird.
Tom is owned by John.
Tom is black in color.
Crea likes
Cat Animal Cats like cream.
m The cat sat on the mat.
A cat is a mammal.
A bird is an animal.
Tom Bird All mammals are animals
caught

Black John

40
MIT School of Computing
Department of Computer Science & Engineering

TYPES OF SEMANTIC NETWORKS


Semantic networks were developed initially for computers in 1956 by Richard H. R.
of the Cambridge Language Research Unit (CLRU), for machine translation of
natural languages.

Currently six types of semantic networks that enable declarative graphic


representation, which is further used to represent knowledge and support
automated systems for reasoning about the knowledge.

Definitional Networks Executable Networks

Assertional Networks Learning Networks

Implicational Networks Hybrid Networks

41
MIT School of Computing
Department of Computer Science & Engineering

ADVANTAGES & DISADVANTAGES


Advantages Disadvantages

1. More computational time at runtime as


we need to traverse the complete network
1. It is simple and comprehensible. tree to answer some questions. It might be
2. Efficient in space requirement. possible in the worst case scenario that
3. Easily clusters related knowledge. after traversing the entire tree, we find
4. It is flexible and easy to visualize. that the solution does not exist in this
5. It is a natural representation of network
knowledge. 2. Do not have any equivalent quantifier.
6. Conveys meaning in a transparent 3. Do not have any standard definition for
manner. the link names.
4. Network representation depends on the
creator of the system.

42
MIT School of Computing
Department of Computer Science & Engineering

APPLICATIONS OF SEMANTIC NETWORKS

In natural language processing applications like semantic parsing, word sense


disambiguation, etc.

Specialized retrieval tasks, like plagiarism detection.

Knowledge Graph proposed by Google in 2012 uses semantic networks in the search
engines.

43
MIT School of Computing
Department of Computer Science & Engineering

Frame Representation
• Devised by Marvin Minsky, 1974
• A variant of semantic networks.
• Frames - semantic net with properties
• 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/fixed situations.
• It consists of a collection of slots and slot values.
• These slots may be of any type and size. Slots have names and values
which are called facets.

44
MIT School of Computing
Department of Computer Science & Engineering

Frame (Example)

45
MIT School of Computing
Department of Computer Science & Engineering

Frame types

Class Frame

Individual or Instance
Frame

46
MIT School of Computing
Department of Computer Science & Engineering

Frame Representation
Frames are more structured form of packaging knowledge, - used for representing
objects, concepts etc.

Frames are organized into hierarchies or network of frames.

Lower level frames can inherit information from upper level frames in network.

Nodes are connected using links viz.,


• “subc“ (links two class frames, one of which is subclass of other e.g.,
science_faculty class is ako(a kind of) of faculty class),
• “is_a“ (connects a particular instance of a class frame e.g., Renuka is_a
science_faculty)
• “a_part_of“ (connects two class frames one of which is contained in other e.g.,
faculty class is_part_of department class).
• Property link of semantic net is replaced by SLOT fields.

47
MIT School of Computing
Department of Computer Science & Engineering

Frame Representation
A frame may have any number of slots needed for describing object. e.g.,
• faculty frame may have name, age, address, qualification etc. as slot names.

Each frame includes two basic element : slots and facets (aspects of a slot).
• Each slot may contain one or more facets (called fillers) which may take many
forms such as :
• value (value of the slot),
• default (default value of the slot),
• range (indicates the range of integer or enumerated values, a slot can
have),
• demons (procedural attachments such as if_needed, if_deleted, if_added
etc.) and
• other (may contain rules, other frames, semantic net or any type of other
information).

48
MIT School of Computing
Department of Computer Science & Engineering

Frame Network - Example

49
MIT School of Computing
Department of Computer Science & Engineering

Detailed Representation of Frame Network

50
MIT School of Computing
Department of Computer Science & Engineering

Frames
• Each frame represent either a class or an instance.
• Class frame represents a general concept whereas instance frame represents a
Description

specific occurrence of the class instance.


• Class frame generally have default values which can be redefined at lower levels.
• If class frame has actual value facet then decedent frames can not modify that
value.
• Value remains unchanged for subclasses and instances.
• Suppose we want to know nationality or phone of an instance-frame13.
• These information are not given in this frame.
Inheritance

• Search will start from frame13 in upward direction till we get our answer or
have reached root frame.
• The frame can be easily represented in prolog by choosing predicate name as
frame with two arguments.
• First argument is the name of the frame and second argument is a list of slot -
facet pair

51
MIT School of Computing
Department of Computer Science & Engineering

Features of Frame Representations

Frames can support values more


naturally than semantic nets.

Frames can be easily implemented


using object-oriented programming
techniques.

Inheritance can be easily controlled.

52
MIT School of Computing
Department of Computer Science & Engineering

Advantages & disadvantages


Advantages Disadvantages

• Makes programming easier by grouping


related knowledge. • Just as with semantic nets, there are no
• Can be easily implemented using standards for defining frame-based
object oriented programming. systems (semantics).
• Expressive power, flexibility • No formal reasoning/inference
• Easy to set up slots for new properties mechanisms, not all properties of a class
and relations stereotype should be propagated to
• Easy to include default information subclasses.
and detect missing values • Frames cannot represent exceptions; by
• Inheritance is easily controlled definition, frames represent typical
• Frames are useful for simulating objects.
commonsense knowledge

53
MIT School of Computing
Department of Computer Science & Engineering

Production Rules
Production rules system consist of (condition, action) pairs which mean, "If condition then
action".

This system comprises


(1) set of production rules (2) rule applier
(3) working memory (4) recognize act cycle

For every input, conditions are checked from the set of


a production rule, and upon finding a suitable rule, an
action is committed.

This cycle of selecting the rule based on some conditions and consequently acting to solve the
problem is known as a recognition and act cycle.

The working memory contains the description of the current state of problems-solving and rule can
write knowledge to the working memory.

54
MIT School of Computing
Department of Computer Science & Engineering

Production Rules
If there is a new situation (state) generates, then multiple production rules will be fired
together, this is called conflict set. In this situation, the agent needs to select a rule
from working memory, and it is called a conflict resolution.

Example:

1. IF (at bus stop AND bus arrives) THEN action (get into the bus).
2. IF (on the bus AND paid AND empty seat) THEN action (sit down).
3. IF (on bus AND unpaid) THEN action (pay charges).
4. IF (bus arrives at destination) THEN action (get down from the bus).

55
MIT School of Computing
Department of Computer Science & Engineering

Advantages & disadvantages


Advantages

• Expressed in natural language.


• Highly modular, so we can easily remove, add or modify an individual rule.

Disadvantages

• Does not exhibit any learning capabilities, as it does not store the result of the
problem for the future uses.
• During the execution of the program, many rules may be active hence rule-
based production systems are inefficient.

56
MIT School of Computing
Department of Computer Science & Engineering

57
MIT School of Computing
Department of Computer Science & Engineering

58
MIT School of Computing
Department of Computer Science & Engineering

59
MIT School of Computing
Department of Computer Science & Engineering

60
MIT School of Computing
Department of Computer Science & Engineering

61
MIT School of Computing
Department of Computer Science & Engineering

62
MIT School of Computing
Department of Computer Science & Engineering

63
MIT School of Computing
Department of Computer Science & Engineering

64
MIT School of Computing
Department of Computer Science & Engineering

65
MIT School of Computing
Department of Computer Science & Engineering

66
MIT School of Computing
Department of Computer Science & Engineering

67
MIT School of Computing
Department of Computer Science & Engineering

68
MIT School of Computing
Department of Computer Science & Engineering

69
MIT School of Computing
Department of Computer Science & Engineering

70
MIT School of Computing
Department of Computer Science & Engineering

71
MIT School of Computing
Department of Computer Science & Engineering

73
MIT School of Computing
Department of Computer Science & Engineering

74
MIT School of Computing
Department of Computer Science & Engineering

75
MIT School of Computing
Department of Computer Science & Engineering

76
MIT School of Computing
Department of Computer Science & Engineering

77
MIT School of Computing
Department of Computer Science & Engineering

78
MIT School of Computing
Department of Computer Science & Engineering

79
MIT School of Computing
Department of Computer Science & Engineering

80
MIT School of Computing
Department of Computer Science & Engineering

81
MIT School of Computing
Department of Computer Science & Engineering

Reasoning-Introduction
Reasoning in AI refers to the process of using logical and deductive techniques to
draw conclusions, make inferences, and solve problems.

Reasoning is a fundamental aspect of AI systems as it enables them to make


intelligent decisions based on available information. It involves applying logical
rules, principles, and patterns to reach logical and informed conclusions.

82
MIT School of Computing
Department of Computer Science & Engineering

Types of Reasoning
Deductive Reasoning: It involves using general rules to draw specific conclusions.
For example, if "All cats have tails" and "Whiskers is a cat," then we can deduce that
"Whiskers has a tail."

Inductive Reasoning: It involves making generalizations based on specific


observations. For instance, if we observe several cats and they all have tails, we
might conclude that "All cats have tails."

Abductive Reasoning: It involves generating the best explanation for given evidence.
For example, if a patient has a high fever and a sore throat, the doctor might
conclude that "The patient has strep throat."

83
MIT School of Computing
Department of Computer Science & Engineering

Deductive Reasoning
Deductive reasoning follows logical rules to draw specific conclusions.

Example: If we know that "All birds can fly" and "Robins are birds," then we can
logically deduce that "Robins can fly."

Inductive Reasoning
Inductive reasoning involves making generalizations from specific observations.

Example: If we observe multiple apples and they are all red, we may infer that "All
apples are red."

84
MIT School of Computing
Department of Computer Science & Engineering

Abductive Reasoning
Abductive reasoning generates the best explanation based on available evidence.

Example: If someone finds a wet umbrella and sees dark clouds, they may conclude
that "It is likely to rain."

Rule-based Reasoning
Rule-based reasoning uses predefined rules to make deductions.

Example: If we have a rule that "If it's raining, take an umbrella," and we observe
that "It's raining," then we deduce that "We should take an umbrella."

85
MIT School of Computing
Department of Computer Science & Engineering

Case-based Reasoning
Case-based reasoning solves problems based on similar past cases.

Example: If a customer has similar preferences to another customer who liked a


specific movie, we can recommend the same movie to the current customer.

Logical Reasoning
Logical reasoning involves using formal logic to draw conclusions.

Example: If "A implies B" and "B implies C," we can logically conclude that "A implies
C."
86
MIT School of Computing
Department of Computer Science & Engineering

Probabilistic Reasoning
Probabilistic reasoning deals with uncertainty using probability theory.

Example: Based on sensor data, a self-driving car can estimate the probability of an
object being a pedestrian and make decisions accordingly.

Summary
• Reasoning is crucial for AI systems to make decisions and solve problems.
• Deductive, inductive, and abductive reasoning are common approaches.
• Rule-based reasoning, case-based reasoning, logical reasoning, and
probabilistic reasoning are widely used techniques.

87
MIT School of Computing
Department of Computer Science & Engineering

Reasoning-Introduction
Probabilistic reasoning is a fundamental technique in AI for handling uncertainty.
Bayes' theorem provides a mathematical framework for updating probabilities
based on new evidence. This presentation explores the concept of probabilistic
reasoning and explains the application of Bayes' theorem in AI.

What is Probabilistic Reasoning?


Definition: Probabilistic reasoning is a method for making inferences and decisions
under uncertainty by using probability theory.

Importance: It allows AI systems to handle incomplete or noisy data, quantify


uncertainty, and make informed decisions based on available evidence.
88
MIT School of Computing
Department of Computer Science & Engineering

Bayes' Theorem Overview


Definition: Bayes' theorem is a fundamental concept in probabilistic reasoning,
named after the Reverend Thomas Bayes.

Formula: P(A|B) = (P(B|A) * P(A)) / P(B)

Interpretation: It calculates the probability of event A given that event B has


occurred, based on prior probabilities and the likelihood of B given A.

Components of Bayes' Theorem


Prior Probability (P(A)): The initial probability of event A before any new evidence
is considered.

Likelihood (P(B|A)): The probability of observing evidence B given that event A is


true.

Evidence Probability (P(B)): The probability of observing evidence B.

Posterior Probability (P(A|B)): The updated probability of event A after taking the
evidence B into account.
89
MIT School of Computing
Department of Computer Science & Engineering

Example Scenario

Scenario: Diagnosing a disease using Bayes' theorem.

Events: A (having the disease), B (testing positive).

Probabilities: P(A) (prior probability of having the disease), P(B|A) (likelihood of


testing positive if having the disease), P(B) (probability of testing positive).

90
Example Scenario

Scenario: Diagnosing a disease using Bayes' theorem.

Events: A (having the disease), B (testing positive).

Probabilities: P(A) (prior probability of having the disease), P(B|A) (likelihood of


testing positive if having the disease), P(B) (probability of testing positive).
MIT School of Computing
Department of Computer Science & Engineering

Subsets Of AI-Introduction
Artificial Intelligence (AI) is a vast field with several subsets or branches that focus
on different aspects of intelligence and problem-solving. This presentation explores
some of the major subsets of AI and provides an overview of each.

Machine Learning
Definition: Machine Learning is a subset of AI that focuses on developing algorithms
and models that enable computers to learn from data and improve performance
without explicit programming.

Importance: Machine Learning has revolutionized various domains by enabling


systems to automatically learn and make predictions or decisions based on
patterns and examples.

92
MIT School of Computing
Department of Computer Science & Engineering

Natural Language Processing (NLP)


Definition: Natural Language Processing is a subset of AI that deals with the
interaction between computers and human language. It involves tasks such as
speech recognition, language understanding, and language generation.

Importance: NLP enables machines to understand and process human language,


leading to applications like virtual assistants, chatbots, and language translation.

Computer Vision
Definition: Computer Vision is a subset of AI focused on enabling computers to
understand and interpret visual information from images or videos. It involves tasks
like object recognition, image classification, and image segmentation.

Importance: Computer Vision has numerous applications, including autonomous


vehicles, facial recognition, medical imaging analysis, and surveillance systems.
93
MIT School of Computing
Department of Computer Science & Engineering

Robotics
Definition: Robotics is a subset of AI that deals with the design, construction, and
operation of robots. It involves the integration of AI techniques to enable robots to
perceive their environment, make decisions, and perform physical tasks.

Importance: Robotics combines AI, sensing, and mechanical systems to create


intelligent machines that can interact with and manipulate their surroundings,
leading to advancements in areas such as industrial automation, healthcare, and
exploration.

Expert Systems
Definition: Expert Systems are AI systems that mimic human expertise and
knowledge in a specific domain. They use rule-based reasoning and knowledge
representation to solve complex problems.

Importance: Expert Systems provide specialized knowledge and decision-making


capabilities, allowing non-experts to access expert-level advice in various fields like
medicine, finance, and troubleshooting.
94
MIT School of Computing
Department of Computer Science & Engineering

Reinforcement Learning
Definition: Reinforcement Learning is a subset of machine learning that involves
training agents to make sequential decisions in an environment to maximize
rewards. It utilizes a trial-and-error approach to learn optimal strategies.

Importance: Reinforcement Learning has applications in areas like game-playing,


robotics, and resource allocation, enabling systems to learn and adapt to dynamic
environments through continuous interaction.

Data Mining
Definition: Data Mining is a subset of AI that focuses on discovering patterns and
extracting useful information from large datasets. It involves techniques such as
clustering, classification, and association rule mining.

Importance: Data Mining helps uncover hidden insights, make predictions, and
support decision-making processes in various fields, including finance, marketing,
healthcare, and fraud detection.
95
MIT School of Computing
Department of Computer Science & Engineering

Genetic Algorithms
Definition: Genetic Algorithms are search and optimization techniques inspired by
the process of natural selection. They use evolutionary principles to solve complex
problems by iteratively evolving a population of potential solutions.

Importance: Genetic Algorithms have applications in optimization, scheduling, and


design problems where finding the best solution among a vast search space is
challenging.

Deep Learning
Definition: Deep Learning is a subset of machine learning that focuses on training
artificial neural networks with multiple layers to learn and extract hierarchical
representations from complex data.

Importance: Deep Learning has revolutionized AI by achieving state-of-the-art


performance in various domains, including image recognition, natural language
processing, and speech recognition.

96
MIT School of Computing
Department of Computer Science & Engineering

Summary and Conclusion

• AI encompasses several subsets, each focusing on different


aspects of intelligence and problem-solving.
• Machine Learning, NLP, Computer Vision, Robotics, Expert
Systems, Reinforcement Learning, Data Mining, Genetic
Algorithms, and Deep Learning are some of the major subsets
within AI.
• Understanding these subsets helps in exploring their individual
applications and advancing the overall field of AI.

97

You might also like