Chapter 4
Chapter 4
Expert Systems
1
4.1 What is an Expert System?
▪ Expert systems (ES) are one of the prominent research domains of AI. It is
introduced by the researchers at Stanford University, Computer Science Department.
▪ They are concerned with the concepts and methods of symbolic inference or reasoning
by a computer, and how the knowledge used to make those inferences will be
represented.
2
4.1 What is an Expert System?
▪ The term expert system is reserved for programs whose knowledgebase contains the
knowledge used by human experts. Expert systems and knowledge-based systems are
used synonymously.
▪ Typical tasks are diagnosis, planning, scheduling, configuration and design the
reasoning and inference rules according to the user queries.
3
4.1 What is an Expert System?
▪ The expert system is a part of AI, and the first ES was developed in the
year 1970, which was the first successful approach of artificial intelligence.
▪ The system helps in decision making for complex problems using both facts
and heuristics like a human expert.
▪ These systems are designed for a specific domain such as medicine, science
etc.
4
4.1 What is an Expert System?
▪ The performance of an expert system is based on the expert's knowledge
stored in its knowledgebase (KB).
▪ The more knowledge stored in the KB, the more that system improves its
performance.
5
4.1 What is an Expert System?
▪ The knowledge engineer must make sure that the computer has all the
knowledge needed to solve a problem.
▪ He must also ensure that the computer can use the knowledge efficiently by
selecting from a handful of reasoning methods. Every expert system
consists of two principal parts: the knowledgebase and the reasoning, or
inference engine.
6
4.1 What is an Expert System?
▪ Heuristic knowledge is the less rigorous, more experiential, more judgmental
knowledge of performance.
▪ Below is the block diagram that represents the working (building blocks) of
an expert system:
7
4.1 What is an Expert System?
Example of Expert System and Rule
IF … THEN Rules
Rule: Red_Light
IF the light is red (antecedent)
THEN stop (consequent)
Rule: Green_Light
IF the light is green
THEN go
Production Rules
the light is red ==> stop (left-hand side - antecedent)
(right-hand side - consequent)
the light is green ==> go
8
4.2 Characteristics of Expert System
▪ High Performance: The expert system provides high performance for solving
any type of complex problem of a specific domain with high efficiency and
accuracy.
▪ Highly responsive: ES provides the result for any complex query within a
very short period of time.
9
4.3 Capabilities of Expert Systems
▪ Advising: It is capable of advising the human being for the query of any domain from the
particular ES.
▪ Demonstrate advice: It is capable of demonstrating any new products such as its features,
specifications, how to use that product, etc.
▪ Interpreting the Input: It is capable of interpreting the input given by the user.
▪ Diagnosis: An ES designed for the medical field is capable of diagnosing a disease without using
multiple components as it already contains various inbuilt medical tools.
11
Below are some popular examples of the Expert System:
▪ DENDRAL: It was an artificial intelligence project that was made as a chemical
analysis expert system. It was used in organic chemistry to detect unknown
organic molecules with the help of their mass spectra and knowledgebase of
chemistry.
▪ MYCIN: It was one of the earliest backward chaining expert systems that was
designed to find the bacteria causing infections like bacteraemia and meningitis.
It was also used for the recommendation of antibiotics and the diagnosis of blood
clotting diseases.
▪ PXDES: It is an expert system that is used to determine the type and level of
lung cancer. To determine the disease, it takes a picture from the upper body,
which looks like the shadow. This shadow identifies the type and degree of harm.
▪ CaDeT: The CaDet expert system is a diagnostic support system that can
detect cancer at early stages
12
4.4 Components of Expert System
1. User Interface: With the help of a user interface, the expert system
interacts with the user, takes queries as an input in a readable format, and
passes it to the inference engine.
▪ After getting the response from the inference engine, it displays the
output to the user.
13
4.4 Components of Expert System
2. Inference Engine (Rules of Engine): The inference engine is
known as the brain of the expert system as it is the main
processing unit of the system.
14
4.4 Components of Expert System
There are two types of inference engines:
1. Deterministic Inference Engine: The conclusions drawn from this type of inference engine
are assumed to be true. It is based on facts and rules.
▪ Forward Chaining: It starts from the known facts and rules, and applies the inference rules to
add their conclusion to the known facts.
▪ Backward Chaining: It is a backward reasoning method that starts from the goal and works
backward to prove the known facts.
15
4.4 Components of Expert System
3. Knowledgebase: The knowledgebase is a type of storage that stores knowledge
acquired from the different experts of the particular domain.
▪ The more the knowledgebase, the more precise will be the Expert System.
▪ One can also view the knowledgebase as collections of objects and their attributes.
Such as a Lion is an object and its attributes are it is a mammal, it is not a domestic
animal, etc.
16
Components of Knowledgebase
▪ Factual Knowledge: The knowledge which is based on facts and accepted by
knowledge engineers comes under factual knowledge.
17
Components of Knowledgebase
18
Development of Expert Systems
▪ Here, we will explain the working of an expert system by taking an
example of MYCINES. Below are some steps to build a MYCIN:
19
Development of Expert Systems
▪ The ES will need a questionnaire to be filled by the patient to know
the general information about the patient such as gender, age, etc.
▪ Now the system has collected all the information, so it will find the
solution for the problem by applying if-then rules using the inference
engine and using the facts stored within the KB.
▪ In the end, it will provide a response to the patient by using the user
interface.
20
Participants in the development of an Expert System
There are three primary participants in the building of Expert System:
21
4.5 Why Expert System?
Before using any technology, we must have an idea about why to use that
technology and hence the same for the ES. Although we have human experts in
every field, then what is the need to develop a computer-based system? So below
are the points that are describing the need of the ES:
▪ No memory Limitations: It can store as much data as required and can memorize
it at the time of its application. But for human experts, there are some
limitations to memorize all things at every time.
22
4.5 Why Expert System?
▪ Expertise in a domain: There are lots of human experts in each domain, and they all
have different experiences, and different skills, so it is not easy to get a final
output for the query. But if we put the knowledge gained from human experts into
the expert system, then it provides an efficient output by mixing all the facts and
knowledge
▪ Not affected by emotions: These systems are not affected by human emotions such
as fatigue, anger, depression, anxiety, etc.. Hence the performance remains
constant.
▪ High security: These systems provide high security to resolve any query.
▪ Considers all the facts: To respond to any query, it checks and considers all the
available facts and provides the result accordingly. But it is possible that a human
expert may not consider some facts due to any reason.
23
Advantages of Expert Systems
▪ These systems are highly reproducible.
▪ They can be used for risky places where the human presence is not safe.
24
Limitations of Expert Systems
▪ The response of the expert system may get wrong if the
knowledgebase contains the wrong information.
▪ For each domain, we require a specific ES, which is one of the big
limitations.
25
Applications of Expert Systems
▪ In designing and manufacturing domain: It can be broadly used for
designing and manufacturing physical devices such as camera lenses and
automobiles.
▪ In the knowledge domain: These systems are primarily used for publishing
the relevant knowledge to the users
▪ In the finance domain: In the finance industries, it is used to detect any
type of possible fraud, suspicious activity, and advise bankers that if they
should provide loans for business or not.
▪ In the diagnosis and troubleshooting of devices: In medical diagnosis, the
ES system is used, and it was the first area where these systems were
used.
▪ Planning and Scheduling: The expert systems can also be used for planning
and scheduling some particular tasks for achieving the goal of that task.
26
When Not to Use Expert Systems
Expert systems are not suitable for all types of domains and tasks. They
are not useful or preferable, when …
27
Expert Systems: Summary
Expert systems or knowledge-based systems are used to represent and
process knowledge in a format that is suitable for computers but still
understandable by humans. If-Then rules are a popular format
▪ Expert Systems can be cheaper, faster, more accessible and more reliable
than humans.
28
End
29