Expert Systems Unit1 .
Expert Systems Unit1 .
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. It solves the most
complex issue as an expert by extracting the knowledge stored in its knowledge base.
The system helps in decision making for complex problems using both facts and
heuristics like a human expert. It is called so because it contains the expert knowledge
of a specific domain and can solve any complex problem of that particular domain.
These systems are designed for a specific domain, such as medicine, science, etc.
The performance of an expert system is based on the expert's knowledge stored in its
knowledge base. The more knowledge stored in the KB, the more that system improves
its performance. One of the common examples of an ES is a suggestion of spelling errors
while typing in the Google search box.
Note: It is important to remember that an expert system is not used to replace the
human experts; instead, it is used to assist the human in making a complex decision.
These systems do not have human capabilities of thinking and work on the basis of the
knowledge base of the particular domain.
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.
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.
User Interface
Inference Engine
Knowledge Base
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. In other words, it
is an interface that helps a non-expert user to communicate with the expert system to
find a solution.
The inference engine is known as the brain of the expert system as it is the main
processing unit of the system. It applies inference rules to the knowledge base to derive
a conclusion or deduce new information. It helps in deriving an error-free solution of
queries asked by the user.
With the help of an inference engine, the system extracts the knowledge from the
knowledge base.
Deterministic Inference engine: The conclusions drawn from this type of inference
engine are assumed to be true. It is based on facts and rules.
Backward Chaining: It is a backward reasoning method that starts from the goal and
works backward to prove the known facts.
3. Knowledge Base
The knowledgebase is a type of storage that stores knowledge acquired from the
different experts of the particular domain. It is considered as big storage of knowledge.
The more the knowledge base, the more precise will be the Expert System.
One can also view the knowledge base 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.
Factual Knowledge: The knowledge which is based on facts and accepted by knowledge
engineers comes under factual knowledge.
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.
What to Represent:
Object: All the facts about objects in our world domain. E.g., Guitars contains strings,
trumpets are brass instruments.
Facts: Facts are the truths about the real world and what we represent.
Types of knowledge
2. Procedural Knowledge
3. Meta-knowledge:
4. Heuristic knowledge:
Heuristic knowledge is representing knowledge of some experts in a filed or subject.
5. Structural knowledge:
It describes relationships between various concepts such as kind of, part of, and
grouping of something.
LectureTopic1.1.3
One expert system may contain knowledge from more than one human experts thus
making the solutions more efficient.
It decreases the cost of consulting an expert for various domains such as medical
diagnosis.
Expert systems can solve complex problems by deducing new facts through existing
facts of knowledge, represented mostly as if-then rules rather than through
conventional procedural code.
Expert systems were among the first truly successful forms of artificial intelligence (AI)
software.
They can be used for risky places where the human presence is not safe.
The response of the expert system may get wrong if the knowledge base contains the
wrong information.
Like a human being, it cannot produce a creative output for different scenarios.
For each domain, we require a specific ES, which is one of the big limitations.
LectureTopic1.1.4
Here, we will explain the working of an expert system by taking an example of MYCIN
ES. Below are some steps to build an MYCIN:
Firstly, ES should be fed with expert knowledge. In the case of MYCIN, human experts
specialized in the medical field of bacterial infection, provide information about the
causes, symptoms, and other knowledge in that domain.
The KB of the MYCIN is updated successfully. In order to test it, the doctor provides a
new problem to it. The problem is to identify the presence of the bacteria by inputting
the details of a patient, including the symptoms, current condition, and medical history.
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.
Knowledge Engineer: Knowledge engineer is the person who gathers the knowledge
from the domain experts and then codifies that knowledge to the system according to
the formalism.
End-User: This is a particular person or a group of people who may not be experts, and
working on the expert system needs the solution or advice for his queries, which are
complex.
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.
High Efficiency: If the knowledge base is updated with the correct knowledge, then it
provides a highly efficient output, which may not be possible for a human.
Expertise in a domain: There are lots of human experts in each domain, and they all
have different skills, 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.
Regular updates improve the performance: If there is an issue in the result provided by
the expert systems, we can improve the performance of the system by updating the
knowledge base.
Advising: It is capable of advising the human being for the query of any domain from
the particular ES.
Interpreting the input: It is capable of interpreting the input given by the user.
LectureTopic1.1.5
Knowledge of real-worlds plays a vital role in intelligence and same for creating
artificial 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.
Let's suppose if you met some person who is speaking in a language which you don't
know, then how you will able to act on that. The same thing applies to the intelligent
behavior of the agents.
As we can see in below diagram, there is one decision maker which act by sensing the
environment and using knowledge. But if the knowledge part will not present then, it
cannot display intelligent behavior
AI knowledge cycle:
An Artificial intelligence system has the following components for displaying intelligent
behavior:
Perception
Learning
Planning
Execution
The above diagram is showing how an AI system can interact with the real world and
what components help it to show intelligence. AI system has Perception component by
which it retrieves information from its environment. It can be visual, audio or another
form of sensory input. The learning component is responsible for learning from data
captured by Perception comportment. In the complete cycle, the main components are
knowledge representation and Reasoning. These two components are involved in
showing the intelligence in machine-like humans. These two components are
independent with each other but also coupled together. The planning and execution
depend on analysis of Knowledge representation and reasoning.
There are mainly four approaches to knowledge representation, which are givenbelow:
It is the simplest way of storing facts which uses the relational method, and each fact
about a set of the object is set out systematically in columns.
2. Inheritable knowledge:
In the inheritable knowledge approach, all data must be stored into a hierarchy of
classes.
This approach contains inheritable knowledge which shows a relation between instance
and class, and it is called instance relation.
Every individual frame can represent the collection of attributes and its value.
Example:
3. Inferential knowledge:
It guaranteed correctness.
Marcus is a man
man(Marcus)
∀x = man (x) ----------> mortal (x)s
4. Procedural knowledge:
Procedural knowledge approach uses small programs and codes which describes how to
do specific things, and how to proceed.
But it is not necessary that we can represent all cases in this approach.
1. Representational Accuracy:
KR system should have the ability to represent all kind of required knowledge.
2. Inferential Adequacy:
KR system should have ability to manipulate the representational structures to produce
new knowledge corresponding to existing structure.
3. Inferential Efficiency:
The ability to direct the inferential knowledge mechanism into the most productive
directions by storing appropriate guides.
4. Acquisitional efficiency- The ability to acquire the new knowledge easily using
automatic methods.
• Advising: It is capable of advising the human being for the query of any domain from the
particular ES.
such as for making any financial decision, decisions in medical science, etc. • Demonstrate
a device: It is capable of demonstrating any new products such as its
features,specifications, how to use that product, etc.
• The error rate of successful systems is low, sometimes much lower than the human error
rate for the same task.
• ESs make consistent recommendations • ESs are a convenient vehicle for bringing to the
point of application difficult-to-use sources of knowledge.
• ESs can capture the scarce expertise of a uniquely qualified expert. • ESs can become a
vehicle for building up organizational knowledge, as opposed to the knowledge
of individuals in the organization.
• When use as training vehicles, ESs result in a faster learning curve for novices.
The knowledge base contains the specific domain knowledge that is used by an expert
to derive conclusions from facts.
In the case of a rule-based expert system, this domain knowledge is expressed in the
form of a series of rules.
The explanation system provides information to the user about how the inference
engine arrived at its conclusions. This can often be essential, particularly if the advice
being given is of a critical nature, such as with a medical diagnosis system.
If the system has used faulty reasoning to arrive at its conclusions, then the user may be
able to see this by examining the data given by the explanation system.
The fact database contains the case-specific data that are to be used in a particular case
to derive a conclusion.
In the case of a medical expert system, this would contain information that had been
obtained about the patient’s condition.
The user of the expert system interfaces with it through a user interface, which provides
access to the inference engine, the explanation system, and the knowledge-base editor.
The inference engine is the part of the system that uses the rules and facts to derive
conclusions. The inference engine will use forward chaining, backward chaining, or a
combination of the two to make inferences from the data that are available to it.
The knowledge-base editor allows the user to edit the information that is contained in
the knowledge base.
The knowledge-base editor is not usually made available to the end user of the system
but is used by the knowledge engineer or the expert to provide and update the
knowledge that is contained within the system.
The Expert System Shell
Note that in Figure 11.1, the parts of the expert system that do not contain domain-
specific or case-specific information are contained within the expert system shell.
This shell is a general toolkit that can be used to build a number of different expert
systems, depending on which knowledge base is added to the shell.
LectureToiopcs1.2.3
Advising problems can be effectively handled by expert systems. Here's how an expert
system can handle advising problems:
Knowledge Acquisition: The first step in developing an expert system for advising is to
acquire the necessary knowledge from domain experts. This involves capturing the
expertise, rules, heuristics, and decision-making processes used by human advisors.
Inference Engine: The expert system utilizes an inference engine to process the
knowledge and draw conclusions. The inference engine applies logical rules, performs
pattern matching, or uses probabilistic reasoning to make inferences and derive
recommendations based on the specific advising problem at hand.
User Interaction: The expert system interacts with the user, typically through a user
interface. The system may ask questions to gather relevant information about the user's
situation, preferences, constraints, and goals. This interactive process helps the system
understand the user's needs and tailor its advice accordingly.
Recommendation Generation: Based on the user's input and the knowledge within the
system, the expert system generates recommendations. These recommendations can be
in the form of specific actions to take, strategies to follow, options to consider, or
alternatives to explore. The system may also provide explanations or justifications for
its recommendations to enhance user understanding and trust.
Continuous Learning: Expert systems can be designed to learn and improve over time.
They can incorporate mechanisms to update their knowledge base with new
information, feedback, or real-world outcomes. This allows the system to adapt to
changing conditions, refine its recommendations, and become more accurate and
effective in advising users.
Integration with External Data and Systems: In many advising scenarios, expert
systems may need to access external data sources or integrate with other systems to
provide comprehensive advice. For example, a financial advising system might need to
fetch real-time market data or integrate with a portfolio management system.
By following these steps and leveraging the expertise of human advisors, an expert
system can provide valuable and reliable advice across various domains, such as
financial planning, healthcare decisions, career guidance, legal counsel.
LectureTopic1.2.4
Expert systems are well-suited for handling decision-making problems. Here are some
examples of decision-making problems that can be effectively addressed by expert
systems:
Investment Portfolio Management: An expert system can analyze market trends, risk
factors, investment goals, and constraints to recommend an optimal portfolio allocation
based on an individual's preferences and risk appetite.
Resource Allocation: Expert systems can assist in allocating limited resources such as
personnel, equipment, or budget across various projects or tasks, considering factors
like priority, availability, and constraints.
Supply Chain Optimization: Expert systems can analyze supply and demand data,
production capacities, transportation logistics, and cost factors to optimize supply chain
decisions, such as inventory levels, order fulfillment, and distribution strategies.
Diagnosis and Treatment Planning: In medical settings, expert systems can aid in
diagnosing diseases, suggesting suitable tests or treatments based on symptoms, medical
history, and knowledge of best practices.
Route Planning and Traffic Management: Expert systems can help optimize route
planning, considering factors like traffic congestion, road conditions, vehicle
restrictions, and real-time data, to provide efficient navigation and traffic management
solutions.
Risk Assessment and Management: Expert systems can evaluate risks associated with
various scenarios, guide decision-making on risk mitigation strategies, and provide
recommendations to manage and reduce risks in areas such as finance, insurance, and
project management.
These are just a few examples of decision-making problems that can be effectively
addressed by expert systems. By leveraging domain-specific knowledge and intelligent
reasoning capabilities, expert systems can provide valuable insights, recommendations,
and decision support across a wide range of industries and applications.
LectureTopic1.2.5
Expert systems are adept at handling various problem-solving tasks. Here are some
examples of problem-solving domains where expert systems can be utilized:
Software Debugging: Expert systems can aid in identifying and resolving software bugs
or errors by analyzing error logs, code snippets, and user reports, and providing
recommendations for code modifications or debugging strategies.
Process Optimization: Expert systems can analyze complex processes, such as
manufacturing operations, logistics, or supply chains, and identify opportunities for
improvement by suggesting optimization strategies, cost-saving measures, or workflow
enhancements.
Data Analysis and Interpretation: Expert systems can help analyze large volumes of
data, such as financial records, scientific experiments, or market research, and provide
insights, patterns, or recommendations based on statistical analysis, machine learning
techniques, or domain-specific knowledge.
Legal Case Analysis: Expert systems can assist legal professionals by analyzing legal
cases, statutes, and precedents, and providing insights, relevant case references, or legal
strategies to support legal research, document preparation, or case analysis.
Customer Support: Expert systems can serve as virtual assistants for customer support,
guiding users through common problems, frequently asked questions, or
troubleshooting steps, and providing solutions or escalating to human support if
necessary.
Emergency Response: Expert systems can provide guidance and support during
emergency situations, such as natural disasters or medical emergencies, by offering
step-by-step instructions, resource allocation recommendations, or risk assessment
strategies.
These examples demonstrate how expert systems can be applied to various problem-
solving scenarios, leveraging domain knowledge, inference engines, and reasoning
capabilities to provide efficient and effective solutions.
Its primary use was intended to be for a exploration geologist in the early stages of
investigating a possible drilling site. PROSPECTOR predicted the existence of a
hitherto unknown molybdenum deposit in Washington State.
PROSPECTOR: An Introduction
Problem domain:
• Evaluation of the mineral potential of a geological site or
region
Target Users:
Exploration geologist who is in the early part of
investigating an
exploration site or "prospect"
PROSPECTOR: An Introduction
PROSPECTOR
• it matches data from a site against models describing regional and local characteristics
favourable for specific ore deposits
<br
PROSPECTOR At Work
PROSPECTOR: Operational details
PROSPECTOR system contains rules linking observed evidence, 'E'. of the particular
(geological) findings with hypotheses, 'H', implied by the evidence:
LS and LN are prestored (ranging from +5 to -5) and do not change during the
execution of the program. Also, each piece of evidence (E1,E2, E3..) and hypotheses
(H1...) has a probability assigned to it (P1,P2..) whichmay change during execution
according to Baye's Theorem.
Static Data
In addition to the PROSPECTOR rule-base, the system also has a large taxonomic
network: A 'hierarchical' data-base containing super- and sub-ordinate
relationships between the objects of the domain.
Semantic networks: Quillian (1966) introduced the idea of semantic networks based on
the so-called "associative memory model": the notion that human memory is organized
on the basis of association, that humans represent the real-world through a series of
associations. More precisely a semantic network is defined as a type of knowledge
representation that formalises objects and values as nodes and connects the nodes with
arcs or links that indicate the relationships between the various nodes: A data structure
for representing declarative knowledge. It can be argued that the nodes can also
represent concepts, and the arcs the relations between concepts, thereby forming
semantic networks.Quillian has pointed out the "type-token" distinction. This may be
related to the generic/specific relationship.
</br
LectureTopic1.3.3
Probablistic Reasoning
ODDS = PROBABILITY
(1-PROBABILITY)
Definition
P = LS x P
Probablistic Reasoning
Definition
LN = measure of necessity
LN = P(not e|h)
P(not e| not.h)
PROSPECTOR: Conclusions
• the conclusions drawn by the PROSPECTOR system match those of the expert who
designed the system to within 7% on a scale used to represent the validity of the
conclusions
• Measure of Belief: If P[h ¦ e] is greater than P , the observation of 'e' increases the
expert's belief in 'h' while decreasing disbelief in h. Proportionate decrease in disbelief (
alternatively, the measure of belief increment) due to the observation 'e' is
P(h y e) - P
MB[h ,e] = --------------------------
1-P
• Measure of Disbelief: If P[h ye] is less than P , the observation of 'e' decreases the
expert's belief in 'h' while increasing disbelief in h. Proportionate decrease in belief (
alternatively, the measure of disbelief increment) due to observation 'e' is:
P(h ) - P(h y e)
MD[h ,e] = --------------------------
• Because a given piece of evidence cannot support both belief and disbelief, therefore
MYCIN: Each rule is associated with a number between 0 and 1 (CF, the 'cretainity
factor') representing certainity of the inference contained in the rule: MYCIN combines
several sources of inconclusive information to form a conclusion of which it may be
almost certain. Ad-hoc appraoch to probability
PROSPECTOR: Confidence measures (LS,LN)are interpreted precisely as as
probabilities and Bayes' rule is used as the basis of inference procedure.
XCON: In XCON's task domain it is possible to state exactly the correct thing to be
done in each particular set of circumstances. Probablistic information is not neccessary.
LectureTopic1.3.4
Diagnosis problems are a well-known application domain for expert systems. Expert
systems can effectively handle diagnosis problems by leveraging their knowledge base,
inference engine, and reasoning capabilities. Here's how expert systems handle
diagnosis problems:
Symptom Analysis: When a user presents symptoms to the expert system, it asks
relevant questions to gather more information about the symptoms, their severity,
duration, and any accompanying factors. The system uses this information to narrow
down the possible diagnoses.
Reasoning and Inference: The expert system's inference engine applies logical rules,
pattern matching, or probabilistic reasoning to analyze the symptom data and the
knowledge base. It generates hypotheses about potential diagnoses based on the
symptoms reported by the user.
Continuous Learning: Expert systems can be designed to learn and improve over time.
They can incorporate feedback from users and updates from medical research or
clinical practice guidelines to refine their knowledge base and diagnostic capabilities.
LectureTopic1.3.5
Applications Role
Design Domain Camera lens design automobile design
Diagnosis Systems to deduce the cause of disease from observed
Medical Domain
dataConduction medical operations on humans.
Monitoring
Comparing data continuously with observed systems
systems
Process Control
Controlling physical processes based on the monitoring.
Systems
Knowledge
Finding faults in vehicles or computers.
Domain
Detection of possible fraud Suspicious transactions Stock market
Commerce
trading Airline scheduling, Cargo scheduling.