Ai Notes Unit 3
Ai Notes Unit 3
2 MARKS
The reasoning is the mental process of deriving logical conclusion and making
predictions from available knowledge, facts, and beliefs. Or we can say, "Reasoning is a
way to infer facts from existing data." It is a general process of thinking rationally, to
find valid conclusions.
o Deductive reasoning
o Inductive reasoning
o Abductive reasoning
o Common Sense Reasoning
o Monotonic Reasoning
o Non-monotonic Reasoning
Example:
Premise: All of the pigeons we have seen in the zoo are white.
Abductive reasoning is a form of logical reasoning which starts with single or multiple
observations then seeks to find the most likely explanation or conclusion for the observation.
Example:
Conclusion It is raining.
Common sense reasoning is an informal form of reasoning, which can be gained through
experiences.
Common Sense reasoning simulates the human ability to make presumptions about
events which occurs on every day.
It relies on good judgment rather than exact logic and operates on heuristic
knowledge and heuristic rules.
Example:
Monotonic reasoning is not useful for the real-time systems, as in real time, facts get
changed, so we cannot use monotonic reasoning.
Monotonic reasoning is used in conventional reasoning systems, and a logic-based
system is monotonic.
Any theorem proving is an example of monotonic reasoning.
Example:
• Fuzzy Logic (FL) is a method of reasoning that resembles human reasoning. This
approach is similar to how humans perform decision making. And it involves all
intermediate possibilities between YES and NO.
It determines the degree of match between fuzzy input and the rules. According to the input
field, it will decide the rules that are to be fired. Combining the fired rules, form the control
actions.
The Defuzzification process converts the fuzzy sets into a crisp value. There are different
types of techniques available, and you need to select the best-suited one with an expert system.
• The membership function is a graph that defines how each point in the input space is
mapped to membership value between 0 and 1. It allows you to quantify linguistic
terms and represent a fuzzy set graphically. A membership function for a fuzzy set A on
the universe of discourse X is defined as μA:X → [0,1]
• It is used in the aerospace field for altitude control of spacecraft and satellite.
• This controls the speed and traffic in the automotive systems.
• It is used for decision making support systems and personal evaluation in the large
company business.
• It also controls the pH, drying, chemical distillation process in the chemical industry.
• Set of Facts: These are assertions or anything relevant to the beginning state of the
system.
• Set of Rules: It contains all actions that should be taken within the scope of a problem
and specify how to act on the assertion set. Here, facts are represented in an IF-THEN
form.
• Termination Criteria or Interpreter: Determines whether a solution exists or not, as
well as when to terminate the process.
A domain-specific expert system that uses rules to make deductions or narrow down
choices is one of the most popular as well as the classic example of rule-based systems
Widely used in Artificial Intelligence, Rule-Based Expert System is not just only
responsible for modeling intelligent behavior in machines and building expert system that
outperform human expert(s)
• Being one of the core technologies responsible for making machines capable of rule-
based learning, rule-based systems offer a range of advantages like:
• Rule-based programming is easy to understand.
• It can be built to represent expert judgment in simple or complicated subjects.
• It is a type of set which collects the distinct objects in a group. The sets with the crisp
boundaries are classical sets. In any set, each single entity is called an element or member
of that set.
• Set
A set is a term, which is a collection of unordered or ordered elements. Following are the
various examples of a set:
• A set of all-natural numbers
• A set of students in a class.
• A set of all cities in a state.
• A set of upper-case letters of the alphabet.
• Union Operation
• Intersection Operation
• Difference Operation
• Complement Operation
1.Commutative Property
2. Associative Property
3. Idempotency Property
4. Absorption Property
5. Distributive Property
6. Identity Property
7. Transitive property
8. Ivolution property
9. De Morgan's Law
5 MARKS
1. What are the Applications of Fuzzy Logic?
Following are the different application areas where the Fuzzy Logic concept is widely used:
3. In this theory, 3. In this theory, there always exists uncertainty about the boundary's location of a set.
there is no
uncertainty about
the boundary's
location of a set.
Fuzzy Logic has various advantages or benefits. Some of them are as follows:
Fuzzy Logic has various disadvantages or limitations. Some of them are as follows:
1. The run time of fuzzy logic systems is slow and takes a long time to produce outputs.
2. Users can understand it easily if they are simple.
3. The possibilities produced by the fuzzy logic system are not always accurate.
4. Many researchers give various ways for solving a given statement using this technique
which leads to ambiguity.
5. Fuzzy logics are not suitable for those problems that require high accuracy.
6. The systems of a Fuzzy logic need a lot of testing for verification and validation.
10 MARKS
The reasoning is the mental process of deriving logical conclusion and making
predictions from available knowledge, facts, and beliefs. Or we can say, "Reasoning is a way to
infer facts from existing data." It is a general process of thinking rationally, to find valid
conclusions.
In artificial intelligence, the reasoning is essential so that the machine can also think
rationally as a human brain, and can perform like a human.
Types of Reasoning
o Deductive reasoning
o Inductive reasoning
o Abductive reasoning
o Common Sense Reasoning
o Monotonic Reasoning
o Non-monotonic Reasoning
1. Deductive reasoning:
Deductive reasoning is deducing new information from logically related known information. It is
the form of valid reasoning, which means the argument's conclusion must be true when the
premises are true.
Deductive reasoning is a type of propositional logic in AI, and it requires various rules and facts.
It is sometimes referred to as top-down reasoning, and contradictory to inductive reasoning.
In deductive reasoning, the truth of the premises guarantees the truth of the conclusion.
Deductive reasoning mostly starts from the general premises to the specific conclusion, which
can be explained as below example.
Example:
2. Inductive Reasoning:
Inductive reasoning is a form of reasoning to arrive at a conclusion using limited sets of facts by
the process of generalization. It starts with the series of specific facts or data and reaches to a
general statement or conclusion.
In inductive reasoning, we use historical data or various premises to generate a generic rule, for
which premises support the conclusion.
In inductive reasoning, premises provide probable supports to the conclusion, so the truth of
premises does not guarantee the truth of the conclusion.
Example:
Premise: All of the pigeons we have seen in the zoo are white.
3. Abductive reasoning:
Abductive reasoning is a form of logical reasoning which starts with single or multiple
observations then seeks to find the most likely explanation or conclusion for the observation.
Example:
Conclusion It is raining.
Common sense reasoning is an informal form of reasoning, which can be gained through
experiences.
Common Sense reasoning simulates the human ability to make presumptions about events which
occurs on every day.
It relies on good judgment rather than exact logic and operates on heuristic
knowledge and heuristic rules.
Example:
The above two statements are the examples of common sense reasoning which a human mind
can easily understand and assume.
5. Monotonic Reasoning:
In monotonic reasoning, once the conclusion is taken, then it will remain the same even if we
add some other information to existing information in our knowledge base. In monotonic
reasoning, adding knowledge does not decrease the set of prepositions that can be derived.
To solve monotonic problems, we can derive the valid conclusion from the available facts only,
and it will not be affected by new facts.
Monotonic reasoning is not useful for the real-time systems, as in real time, facts get changed, so
we cannot use monotonic reasoning.
Example:
It is a true fact, and it cannot be changed even if we add another sentence in knowledge base like,
"The moon revolves around the earth" Or "Earth is not round," etc.
6. Non-monotonic Reasoning
Logic will be said as non-monotonic if some conclusions can be invalidated by adding more
knowledge into our knowledge base.
Non-monotonic reasoning deals with incomplete and uncertain models.
"Human perceptions for various things in daily life, "is a general example of non-monotonic
reasoning.
Example: Let suppose the knowledge base contains the following knowledge:
So from the above sentences, we can conclude that Pitty can fly.
However, if we add one another sentence into knowledge base "Pitty is a penguin", which
concludes "Pitty cannot fly", so it invalidates the above conclusion.
The 'Fuzzy' word means the things that are not clear or are vague. Sometimes, we cannot decide
in real life that the given problem or statement is either true or false. At that time, this concept
provides many values between the true and false and gives the flexibility to find the best solution
to that problem.Example of Fuzzy Logic as comparing to Boolean Logic
Fuzzy logic contains the multiple logical values and these values are the truth values of a
variable or problem between 0 and 1. This concept was introduced by Lofti
Zadeh in 1965 based on the Fuzzy Set Theory. This concept provides the possibilities which are
not given by computers, but similar to the range of possibilities generated by humans.
In the Boolean system, only two possibilities (0 and 1) exist, where 1 denotes the absolute truth
value and 0 denotes the absolute false value. But in the fuzzy system, there are multiple
possibilities present between the 0 and 1, which are partially false and partially true.
1. This concept is flexible and we can easily understand and implement it.
2. It is used for helping the minimization of the logics created by the human.
3. It is the best method for finding the solution of those problems which are suitable for
approximate or uncertain reasoning.
4. It always offers two values, which denote the two possible solutions for a problem and
statement.
5. It allows users to build or create the functions which are non-linear of arbitrary
complexity.
6. In fuzzy logic, everything is a matter of degree.
7. In the Fuzzy logic, any system which is logical can be easily fuzzified.
8. It is based on natural language processing.
9. It is also used by the quantitative analysts for improving their algorithm's execution.
10. It also allows users to integrate with the programming.
In the architecture of the Fuzzy Logic system, each component plays an important role. The
architecture consists of the different four components which are given below.
1. Rule Base
2. Fuzzification
3. Inference Engine
4. Defuzzification
Rule Base is a component used for storing the set of rules and the If-Then conditions given by
the experts are used for controlling the decision-making systems. There are so many updates that
come in the Fuzzy theory recently, which offers effective methods for designing and tuning of
fuzzy controllers. These updates or developments decreases the number of fuzzy set of rules.
2. Fuzzification
Fuzzification is a module or component for transforming the system inputs, i.e., it converts the
crisp number into fuzzy steps. The crisp numbers are those inputs which are measured by the
sensors and then fuzzification passed them into the control systems for further processing. This
component divides the input signals into following five states in any Fuzzy Logic system:
3. Inference Engine
This component is a main component in any Fuzzy Logic system (FLS), because all the
information is processed in the Inference Engine. It allows users to find the matching degree
between the current fuzzy input and the rules. After the matching degree, this system determines
which rule is to be added according to the given input field. When all rules are fired, then they
are combined for developing the control actions.
4. Defuzzification
Defuzzification is a module or component, which takes the fuzzy set inputs generated by
the Inference Engine, and then transforms them into a crisp value. It is the last step in the
process of a fuzzy logic system. The crisp value is a type of value which is acceptable by the
user. Various techniques are present to do this, but the user has to select the best one for reducing
the errors.
Membership Function
The membership function is a function which represents the graph of fuzzy sets, and allows
users to quantify the linguistic term. It is a graph which is used for mapping each element of x to
the value between 0 and 1.
Set
A set is a term, which is a collection of unordered or ordered elements. Following are the various
examples of a set:
Types of Set:
1. Finite
2. Empty
3. Infinite
4. Proper
5. Universal
6. Subset
7. Singleton
8. Equivalent Set
9. Disjoint Set
Classical Set
It is a type of set which collects the distinct objects in a group. The sets with the crisp boundaries
are classical sets. In any set, each single entity is called an element or member of that set.
Following are the various operations which are performed on the classical sets:
1. Union Operation
2. Intersection Operation
3. Difference Operation
4. Complement Operation
1. Union:
This operation is denoted by (A U B). A U B is the set of those elements which exist in two
different sets A and B. This operation combines all the elements from both the sets and make a
new set. It is also called a Logical OR operation.
A ∪ B = { x | x ∈ A OR x ∈ B }.
Example:
Set A = {10, 11, 12, 13}, Set B = {11, 12, 13, 14, 15}, then A ∪ B = {10, 11, 12, 13, 14, 15}
2. Intersection
This operation is denoted by (A ∩ B). A ∩ B is the set of those elements which are common in
both set A and B. It is also called a Logical OR operation.
A ∩ B = { x | x ∈ A AND x ∈ B }.
Example:
Set A = {10, 11, 12, 13}, Set B = {11, 12, 14} then A ∩ B = {11, 12}
3. Difference Operation
This operation is denoted by (A - B). A-B is the set of only those elements which exist only in
set A but not in set B.
A - B = { x | x ∈ A AND x ∉ B }.
4. Complement Operation: This operation is denoted by (A`). It is applied on a single set. A` is
the set of elements which do not exist in set A.
A′ = {x|x ∉ A}.
There are following various properties which play an essential role for finding the solution of a
fuzzy logic problem.
1. Commutative Property:
This property provides the following two states which are obtained by two finite sets A and B:
A∪B=B∪A
A∩B=B∩A
2. Associative Property:
This property also provides the following two states but these are obtained by three different
finite sets A, B, and C:
A ∪ (B ∪ C) = (A ∪ B) ∪ C
A ∩ (B ∩ C) = (A ∩ B) ∩ C
3. Idempotency Property:
This property also provides the following two states but for a single finite set A:
A∪A=A
A∩A=A
4. Absorption Property
This property also provides the following two states for any two finite sets A and B:
A ∪ (A ∩ B) = A
A ∩ (A ∪ B) = A
5. Distributive Property:
This property also provides the following two states for any three finite sets A, B, and C:
A∪ (B ∩ C) = (A ∪ B)∩ (A ∪ C)
A∩ (B ∪ C) = (A∩B) ∪ (A∩C)
6. Identity Property:
This property provides the following four states for any finite set A and Universal set X:
A ∪ φ =A
A∩X=A
A∩φ=φ
A∪X=X
7. Transitive property
This property provides the following state for the finite sets A, B, and C:
If A ⊆ B ⊆ C, then A ⊆ C
8. Ivolution property
9. De Morgan's Law
This law gives the following rules for providing the contradiction and tautologies:
A set of facts
These facts are assertions or anything that is relevant to the beginning state of the system.
Set of Rules
This set contains all the actions that should be performed within the scope of a problem and
defines how to act on the assertion set. In the set of rules facts are represented in an IF-THEN
form.
They are made up of the combined knowledge of human experts in the problem domain.
They represent knowledge in a very declarative manner.
They make it possible to use various knowledge representations paradigms.
They support the implementation of non-deterministic search and control strategies.
They help in describing fragmentary, ill-structured, heuristic, judgemental knowledge.
They are robust and have the ability to operate using uncertain or incomplete knowledge.
They can help with rule based decision making.
The database
The database has a set of facts that are used to compare against the IF (condition) part of the
rules that are held in the knowledge base.
Match - A section of the production rule system gets matched with the contents of the
working memory to gain a conflict, where there are several instances of the satisfied
productions.
Conflict-Resolution - After the production system is matched, one of the production
instances in the conflict is selected for execution for the purpose of determining the
progress of the process.
Act - The production instance selected in the previous stage is s executed, impacting the
contents of the working memory.
Explanation facilities
The explanantion facilities make it possible for the user to ask the expert system how a specific
conclusion was reached and why a specific fact is required. The expert system needs to be able to
explain its reasoning and justify its advice, analysis, or conclusion.
User interface
The user interface is the means through which the user seeking a solution to a problem
communicates with the expert system. The communication should be as meaningful and friendly
as possible and the user interface should be as intuitive as possible.
These five elements are critical for any rule-based system. They are the core components of the
rule-based system. But the system might have some additional components as well. A couple of
these components could be the external interface and the working memory.
External interface
The external interface enables an expert system to work with external data files and programs
that are written in conventional programming languages like C, Pascal, FORTRAN and Basic.
Working memory
The working memory stores temporary information and data.