Expert Systems (Unit 4)
Expert Systems (Unit 4)
Expert system
Expert systems are a crucial subset of artificial intelligence (AI) that simulate the decision-
making ability of a human expert. These systems use a knowledge base filled with domain-
specific information and rules to interpret and solve complex problems. Expert systems are
widely used in fields such as medical diagnosis, accounting, coding, and even in games.
Expert systems are computer programs that use knowledge-based architecture to solve real-world
problems. They are also known as knowledge-based systems, intelligent agent systems, or
knowledge systems.
Expert systems use two main inference techniques: forward chaining and backward chaining. In
forward chaining, the system starts with known facts and applies rules to draw conclusions. In
backward chaining, the system starts with a conclusion and checks rules to determine if the
conditions are satisfied.
Expert systems have many applications in industry, business, medicine, and science. However,
they are designed to solve problems for specific domains and may not work outside of their
scope
Types of Expert Systems in AI
In AI, expert systems are designed to emulate the decision-making abilities of human experts.
They are categorized based on their underlying technology and application areas. Here are the
primary types of expert systems in AI:
Description: Use a set of “if-then” rules to process data and make decisions. These rules
are typically written by human experts and capture domain-specific knowledge.
Description: Represent knowledge using frames, which are data structures similar to
objects in programming. Each frame contains attributes and values related to a particular
concept.
Example: Systems used for knowledge representation in areas like natural language
processing.
Description: Handle uncertain or imprecise information using fuzzy logic, which allows
for partial truths rather than binary true/false values.
Example: Fuzzy control systems for managing household appliances like washing
machines and air conditioners.
Description: Integrate neural networks and fuzzy logic to combine the learning
capabilities of neural networks with the handling of uncertainty and imprecision offered
by fuzzy logic. This hybrid approach helps in dealing with complex problems where both
pattern recognition and uncertain reasoning are required.
There are many examples of an expert system. Some of them are given below:
1. MYCIN
Overview: MYCIN is one of the earliest and most influential expert systems developed
in the 1970s. It was specifically designed for medical diagnosis.
Significance: Although not used clinically, MYCIN greatly influenced the development
of medical expert systems.
2. DENDRAL
Overview: DENDRAL is another pioneering expert system, developed in the 1960s, and
is regarded as one of the first successful AI systems in the field of chemistry.
3. R1/XCON
Overview: R1, also known as XCON, was developed in the late 1970s by Digital
Equipment Corporation (DEC) and is one of the most commercially successful expert
systems.
Functionality: R1/XCON was used to configure orders for new computer systems. It
would select the appropriate hardware and software components based on the customer’s
requirements.
4. PXDES
Overview: PXDES is an expert system designed for the medical field, particularly in the
diagnosis of lung cancer.
Overview: CaDet is a clinical support system developed to assist in the early detection of
cancer.
Functionality: CaDet can identify potential signs of cancer in its early stages by
analyzing patient data and symptoms. It works by comparing patient data with known
patterns and indicators of cancer.
6. DXplain
Functionality: DXplain suggests possible diseases based on the symptoms and findings
provided by a doctor. It acts as a reference tool, offering a differential diagnosis list that
doctors can use to check their own diagnoses.
1. Knowledge Base: The knowledge base represents facts and rules. It consists of
knowledge in a particular domain as well as rules to solve a problem, procedures and
intrinsic data relevant to the domain.
2. Inference Engine: The function of the inference engine is to fetch the relevant
knowledge from the knowledge base, interpret it and to find a solution relevant to the
user’s problem. The inference engine acquires the rules from its knowledge base and
applies them to the known facts to infer new facts. Inference engines can also include an
explanation and debugging abilities.
4. User Interface: This module makes it possible for a non-expert user to interact with the
expert system and find a solution to the problem.
5. Explanation Module: This module helps the expert system to give the user an
explanation about how the expert system reached a particular conclusion.
1. Input Data: Users provide data or queries related to a specific problem or scenario.
2. Processing: The inference engine processes the input data using the rules in the
knowledge base to generate conclusions or recommendations.
3. Output: The system presents the results or solutions to the user through the user
interface.
4. Explanation: If applicable, the system explains how the conclusions were reached,
providing insights into the reasoning process.
Reasoning Strategies used by Inference Engine
Forward Chaining and Backward Chaining, which are two fundamental methods for
processing information and solving problems in an expert system:
1. Forward Chaining
This is a data-driven reasoning approach where the system starts with the available facts and
applies rules to infer new facts or conclusions. It’s typically used to predict outcomes or
determine what will happen next. An example given is predicting stock market movements.
2. Backward Chaining
This is a goal-driven reasoning approach where the system starts with a hypothesis or a goal
(something to prove) and works backward to determine which facts or conditions would support
that conclusion. It’s often used to diagnose issues by determining the cause of an observed effect.
The examples provided include diagnosing medical conditions like stomach pain, blood cancer,
or dengue.
Applications of Expert Systems
1. Medical Diagnosis: Expert systems assist doctors by analyzing symptoms and medical
history to suggest possible diagnoses or treatment options. For example, MYCIN, an
early expert system, helped identify bacterial infections and recommend antibiotics.
2. Financial Services: In finance, expert systems are used for credit scoring, fraud
detection, and investment advice. They analyze financial data and patterns to make
informed decisions.
3. Technical Support: Expert systems can troubleshoot and provide solutions for technical
issues. They guide users through problem-solving steps based on pre-defined rules and
knowledge.
2. Lack of Flexibility: Expert systems are limited to the rules and knowledge they are
programmed with. They may struggle with novel or ambiguous situations that fall outside
their predefined rules.
3. Maintenance: Regular updates and maintenance are required to keep the knowledge base
current and relevant, which can be resource-intensive.
Introduction
The rule-based system in AI bases choices or inferences on established rules. These laws are
frequently expressed in human-friendly language, such as "if X is true, then Y is true," to make
them easier for readers to comprehend. Expert and decision support systems are only two
examples of the many applications in which rule-based systems have been employed.
The following are some of the primary traits of the rule-based system in AI:
The rules are written simply for humans to comprehend, making rule-based systems
simple to troubleshoot and maintain.
Given a set of inputs, rule-based systems will always create the same output, making
them predictable and dependable. This property is known as determinism.
A rule-based system in AI is transparent because the standards are clear and open to
human inspection, which makes it simpler to comprehend how the system operates.
A rule-based system in AI is scalable. When scaled up, large quantities of data can be
handled by rule-based systems.
Rule-based systems can be modified or updated more easily because the rules can be
divided into smaller components.
A rule-based system in AI generates an output by using a collection of inputs and a set of rules.
The system first determines which principles apply to the inputs. If a rule is applicable, the
system executes the corresponding steps to generate the output. If no guideline is applicable, the
system might generate a default output or ask the user for more details.
6. External connection:
An expert system can interact with external data files and programs written in traditional
computer languages like C, Pascal, FORTRAN, and Basic, thanks to the external
interface.
7. Active recall:
The working memory keeps track of transient data and knowledge.
Healthcare, finance, and engineering are just a few examples of the sectors and applications
that use rule-based systems. Following are some instances of a rule-based system in AI:
Medical Diagnosis:
Based on a patient's symptoms, medical history, and test findings, a rule-based system in
AI can make a diagnosis. The system can make a diagnosis by adhering to a series of
guidelines developed by medical professionals.
Fraud Detection:
Based on particular criteria, such as the transaction's value, location, and time of day, a
rule-based system in AI can be used to spot fraudulent transactions. The system, for the
additional examination, can then flag the transaction.
Quality Control:
A rule-based system in AI can ensure that products satisfy particular quality standards.
Based on a set of guidelines developed by quality experts, the system can check for
flaws.
Decision support systems:
They are created to aid decision-making, such as choosing which assets to buy or what to
buy.
How to Create a Rule-based System?
Conclusion
Bayesian Reasoning
Definitions
P(event | evidence)
Eg; the posterior probability of a person with symptom S having disease D is:
Where
Bayesian Networks
Set up a confidence interval -- an interval of probabilities within which the true probability
lies with a certain confidence -- based on the Belief B and plausibility PL provided by some
evidence E for a proposition P.
A basic probability m(S), a belief BELIEF(S) and a plausible belief PLAUSIBILITY(S) all have
value in the interval [0,1].
Combining beliefs
This approach was used in MYCIN for first time. It is based on Several Observations. Here
Facts and the outcome of rules are given confidence factor between -1 and +1
+1 means fact is known to be true.
Here the knowledge content of the rules is more important than the algebra of confidences
holding the system together. In this approach confidence measures correspond to informal
assessments by humans such as "it is probably true" or "it is often the case. It also
separates "confidence for" from "confidence against"
Where the belief brings together all the evidence that would lead us to believe in P with
some certainty and the plausibility brings together the evidence that is compatible with P
and is not inconsistent with it.
CF(Q)=CF(P) * CF(R)
If two rules R1 and R2 support Q with CF(QR1) and CF(QR2) then to find the actual CF(Q):
Fuzzy logic
A reasoning method that resembles human reasoning and involves all intermediate
possibilities between YES and NO. Fuzzy logic allows for degrees of truth, rather than
absolute true or false values.
Expert systems
Computer programs that emulate the knowledge and skills of human experts in a specific
domain.
Fuzzy expert systems
Use fuzzy logic to handle uncertainties generated by imprecise, incomplete, and/or vague
information.
Fuzzy logic can be implemented in systems with different sizes and capabilities, such as micro-
controllers, large networked, or workstation-based systems. It can also be implemented in
hardware, software, or a combination of both.
The conventional logic block that a computer can understand takes precise input and produces a
definite output as TRUE or FALSE, which is equivalent to human’s YES or NO.
The inventor of fuzzy logic, Lotfi Zadeh, observed that unlike computers, the human decision
making includes a range of possibilities between YES and NO, such as −
CERTAINLY YES
POSSIBLY YES
CANNOT SAY
POSSIBLY NO
CERTAINLY NO
The fuzzy logic works on the levels of possibilities of input to achieve the definite output.
Implementation
It can be implemented in systems with various sizes and capabilities ranging from small
micro-controllers to large, networked, workstation-based control systems.
It can be implemented in hardware, software, or a combination of both.
Learn Artificial Intelligence in-depth with real-world projects through our Artificial
Intelligence certification course. Enroll and become a certified expert to boost your career.
Fuzzification Module − It transforms the system inputs, which are crisp numbers, into
fuzzy sets. It splits the input signal into five steps such as −
LP x is Large Positive
MP x is Medium Positive
S x is Small
MN x is Medium Negative
LN x is Large Negative
Membership Function
Membership functions allow you to quantify linguistic term 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].
Here, each element of X is mapped to a value between 0 and 1. It is called membership value or
degree of membership. It quantifies the degree of membership of the element in X to the fuzzy
set A.
There can be multiple membership functions applicable to fuzzify a numerical value. Simple
membership functions are used as use of complex functions does not add more precision in the
output.
All membership functions for LP, MP, S, MN, and LN are shown as below −
The triangular membership function shapes are most common among various other membership
function shapes such as trapezoidal, singleton, and Gaussian.
Here, the input to 5-level fuzzifier varies from -10 volts to +10 volts. Hence the corresponding
output also changes.
Development
Every member of this set is a linguistic term and it can cover some portion of overall temperature
values.
Create a matrix of room temperature values versus target temperature values that an air
conditioning system is expected to provide.
RoomTemp.
Very_Cold Cold Warm Hot Very_Hot
/Target
Very_Cold No_Change Heat Heat Heat Heat
Cold Cool No_Change Heat Heat Heat
Warm Cool Cool No_Change Heat Heat
Hot Cool Cool Cool No_Change Heat
Very_Hot Cool Cool Cool Cool No_Change
Build a set of rules into the knowledge base in the form of IF-THEN-ELSE structures.
Fuzzy set operations perform evaluation of rules. The operations used for OR and AND are Max
and Min respectively. Combine all results of evaluation to form a final result. This result is a
fuzzy value.
Automotive Systems
Automatic Gearboxes
Four-Wheel Steering
Vehicle environment control
Hi-Fi Systems
Photocopiers
Still and Video Cameras
Television
Domestic Goods
Microwave Ovens
Refrigerators
Toasters
Vacuum Cleaners
Washing Machines
Environment Control
Air Conditioners/Dryers/Heaters
Humidifiers
Advantages of FLSs
Mathematical concepts within fuzzy reasoning are very simple.
You can modify a FLS by just adding or deleting rules due to flexibility of fuzzy logic.
Fuzzy logic Systems can take imprecise, distorted, noisy input information.
FLSs are easy to construct and understand.
Fuzzy logic is a solution to complex problems in all fields of life, including medicine, as
it resembles human reasoning and decision making.
Disadvantages of FLSs
There is no systematic approach to fuzzy system designing.
They are understandable only when simple.
They are suitable for the problems which do not need high accuracy.