SlideShare a Scribd company logo
Expert System
Module 5
Contents
Expert Systems:
What an expert system is;
How it works and how it is built,
Basic components of an expert system, Expert System
Architectures,
Examples of Expert Systems.
Rule-based Expert systems: Structure of rule based expert
system, Conflict resolution, Uncertainty Management,
Advantages & disadvantages of rule-based.
Introduction to Frame-based Expert systems.
Types of Expert Systems
• Types of Expert Systems
These include a rule-based expert system, frame-based expert
system, fuzzy expert system, neural expert system, and neuro-
fuzzy expert system.
• Focus is on rule-based expert system
What are Expert Systems?
• Expert systems (ES) are one of the prominent research domains of AI.
• The expert systems are the computer AI applications developed to
solve complex problems in a particular domain, at the level of extra-
ordinary human intelligence and expertise.
• It is introduced by the researchers at Stanford University, Computer
Science Department.
• Expert System is an interactive and reliable computer-based
decision-making system which uses both facts and heuristics to
solve complex decision-making problems.
Characteristic of Expert System
• Highest Level of Expertise: An expert system in artificial
intelligence provides the highest level of expertise along with efficiency and
accuracy.
• Reaction Time: An expert system in artificial intelligence has a very low
reaction time. It takes less time than a human expert to solve the same
complex problem.
• Good Reliability: The Expert system in AI needs to be reliable, and it
must not make any a mistake.
• Flexible: An expert system in artificial intelligence is flexible to tackle
different problems.
• Effective: An expert system in artificial intelligence has a robust
mechanism to resolve complex problems and later administer them.
• Capable: An expert system in artificial intelligence can handle complex
problems and deliver solutions on time.
Components /Architecture of Expert System
There are 5 Components of expert systems:
• Knowledge Base
• Inference Engine
• Knowledge acquisition and learning module
• User Interface
• Explanation module
Knowledge base: The knowledge base in an expert system represents facts
and rules. It contains knowledge in specific domains along with rules in
order to solve problems, procedures and intrinsic data relevant to the
domain.
Inference engine: The most basic function of the inference engine is to
acquire relevant data from the knowledge base, interpret it, and to find a
solution as per the user’s problem. Inference engines also have
explanationatory and debugging abilities.
Knowledge acquisition and learning module: This component functions
to allow the expert systems to acquire more data from various sources and
store it in the knowledge base.
User interface: This component is essential for a non-expert user to
interact with the expert system and find solutions.
Explanation module: As the name suggests, this module helps in
providing the user with an explanation of the achieved conclusion.
Strategies Used By The Inference Engine
The Inference Engine uses the following strategies to recommend
solutions:
• Forward Chaining
• Backward Chaining
1.Forward chaining – Answers the question, “What can happen in the future?”
2.Backward chaining – Answers the question, “Why did this happen?”
Forward Chaining
• Forward chaining is a form of reasoning which start with atomic sentences in the knowledge
base and applies inference rules (Modus Ponens) in the forward direction to extract more data
until a goal is reached.
• The Forward-chaining algorithm starts from known facts, triggers all rules whose premises are
satisfied, and add their conclusion to the known facts. This process repeats until the problem is
solved.
Forward Chaining in Propositional Logic
• In propositional logic, forward chaining starts its journey from the given knowledge base. If all
the premises of the implication are known, then its conclusion will be added to the set of known
facts.
• Let’s see an example:
1.If D barks and D eats bone, then D is a dog.
2.If V is cold and V is sweet, then V is ice-cream.
3.If D is a dog, then D is black.
4.If V is ice-cream, then it is Vanilla.
• Derive forward chaining using the given known facts to prove Tomy is black.
• Let’s see an example:
1.If D barks and D eats bone, then D is a dog.
2.If V is cold and V is sweet, then V is ice-cream.
3.If D is a dog, then D is black.
4.If V is ice-cream, then it is Vanilla.
• Derive forward chaining using the given known facts to prove Tomy is
black.
Tomy barks.
Tomy eats bone.
Solution: Given Tomy barks.
• From (1), it is clear:
• If Tomy barks and Tomy eats bone, then Tomy is a dog.
• From (3), it is clear:
• If Tomy is a dog, then Tomy is black.
• Hence, it is proved that Tomy is black.
Example 1
Example 2
Module 5 - Expert System-in artificial intelligence
Backward chaining
• A backward chaining algorithm is a form of reasoning, which starts with the goal
and works backward, chaining through rules to find known facts that support the
goal.
Properties of backward chaining:
• It is known as a top-down approach.
• Backward-chaining is based on modus ponens inference rule.
• In backward chaining, the goal is broken into sub-goal or sub-goals to prove the
facts true.
• It is called a goal-driven approach, as a list of goals decides which rules are
selected and used.
• Backward -chaining algorithm is used in game theory, automated theorem
proving tools, inference engines, proof assistants, and various AI applications.
• The backward-chaining method mostly used a depth-first search strategy for
proof.
Module 5 - Expert System-in artificial intelligence
Backward Chaining in Propositional Logic
• In propositional logic, backward chaining begins from the
goal and using the given propositions, it proves the asked
goal. There is a backward chaining algorithm which is
used to perform backward chaining for the given axioms.
Given that:
1.If D barks and D eats bone, then D is a dog.
2.If V is cold and V is sweet, then V is ice-cream.
3.If D is a dog, then D is black.
4.If V is ice-cream, then it is Vanilla.
Derive backward chaining using the given known facts to prove Tomy is black.
• Tomy barks.
• Tomy eats bone.
Solution:
1.On replacing D with Tomy in (3), it becomes:
• If Tomy is a dog, then Tomy is black.
• Thus, the goal is matched with the above axiom.
• Now, we have to prove Tomy is a dog. …(new goal)
• Replace D with Tomy in (1), it will become:
• If Tomy barks and Tomy eats bone, then Tomy is a dog. …(new goal)
• Again, the goal is achieved.
• Now, we have to prove that Tomy barks and Tomy eats bone. …(new goal)
• As we can see, the goal is a combination of two sentences which can be further divided as:
• Tomy barks.
• Tomy eats bone.
• From (1), it is clear that Tomy is a dog.
• Hence, Tomy is black.
Example 1
As an example of the forward chaining, we have the following rules:
Rule 1 If symptoms are headache, sneezing, running nose and sorethroat, then patient has cold.
Rule 2 If symptoms are fever, cough and running nose, then patient has measles.
Facts are generated in working memory by asking questions to the user whether he has fever, running nose, cough,
etc. Thus, in forward chaining, we start with the facts given by the user and try to find an appropriate rule whose iſ
part is satisfied and subsequently the then part is concluded. The other important inference mechanism that we are
familiar with is backward chaining. Backward chaining starts with a list of goals and works backwards to see if there is
data which will allow it to conclude any of these goals. An inference engine using backward chaining would search
the inference rules until it finds one whose then part matches a desired goal. If the if part of that inference rule is not
known to be true, then it is added to the list of goals. Consider the same example discussed above. In order to satisfy
a goal called cold, the inference engine will select a rule with conclusion as cold and will try to find the facts in the if
part of the role whether the user has headache, sneezing, running nose, and sore throat. If yes, then cold is
established otherwise it tries other rule for goal, if it exists. If we are not able to satsify all the rules with the goal cold
then other goals such as measles will be tried. Using rule 2, if the symptoms of the user are fever, running nose, and
cough, then measles is concluded. The inference engine using backward chaining tries to prove conclusion of the
rules one by one till it succeeds or all the rules are exhausted. Because the list of goals determines which rules would
be selected and used, this method is also known as goal-driven method.
Building an Expert System in Artificial Intelligence
1.Determine the characteristics of the problem.
2.Knowledge engineers and domain experts collaborate to define the issue.
• Domain expert – A person or group of people whose skills and
knowledge are acquired to develop the knowledge base.
• Knowledge engineer – A technical person who uses the acquired
knowledge and integrates it with expert computer systems.
3. The knowledge engineer, after defining the problem, translates it into
understandable computer language knowledge. The knowledge engineer
designs the inference engine that uses the knowledge when called to assist.
4. The knowledge expert also integrates the use of unknown knowledge in
the reasoning process with an explanation.
Examples of expert systems
Expert systems that are in use include the following examples:
• CaDet (Cancer Decision Support Tool) is used to identify cancer in its
earliest stages.
• DENDRAL helps chemists identify unknown organic molecules.
• DXplain is a clinical support system that diagnoses various diseases.
• MYCIN identifies bacteria such as bacteremia and meningitis, and
recommends antibiotics and dosages.
• PXDES determines the type and severity of lung cancer a person has.
• R1/XCON is an early manufacturing expert system that automatically
selects and orders computer components based on customer
specifications.
Rule-based Expert systems
What is knowledge?
• is a theoretical or practical understanding of a subject or a domain.
• Anyone can be considered as domain expert if he or she has deep knowledge
and strong practical experience in a particular domain.
• The human mental process is internal, and it is too complex to be
represented as an algorithm
• However, most experts are capable of expressing their knowledge in the form
of rules for problem solving.
IF the ‘traffic light’ is ‘green’
THEN the action is go
IF the ‘traffic light’ is ‘red’
THEN the action is stop
Rules as a Knowledge Representation Technique
• The term rule in AI, can be defined as an IF-THEN structure that relates
given information or facts in the IF part to some action in the THEN part.
• A rule provides some description of how to solve a problem.
• Rule are relatively easy to create and understand
• Any rules consists of two parts: the IF part, called the antecedent
(premise or condition) and the THEN part called the consequent
(conclusion or action)
IF <antecedent> THEN <consequent>
• A rule can have multiple antecedents joined by the keywords AND
(conjunction), OR (disjunction) or a combination of both.
IF <antecedent 1> IF <antecedent 1>
AND <antecedent 2> OR <antecedent 2>
AND
⁝
<antecedent n> OR
⁝
<antecedent n>
THEN <consequent> THEN <consequent>
• The antecedent of a rule incorporates two parts: an object (linguistic
object) and its value. The object and its value are linked by an
operator.
• The operator identifies the object and assigns the value. Operators
such as is, are, is not, are not are used to assign a symbolic value to
a linguistic object.
• Expert systems can also used mathematical operators to define an
object as numerical and assign it to the numerical value.
IF ‘age of the customer’ < 18 AND ‘cash withdrawal’ > 1000
THEN ‘signature of the parent’ is required
Rules can represent
Relation: IF the ‘fuel tank’ is empty THEN the car is dead.
Recommendation: IF the season is autumn AND the sky is cloudy AND the
forecast is drizzle THEN the advice is ‘take an umbrella’
Directive: IF the car is dead AND the ‘fuel tank’ is empty THEN the action is
‘refuel the car’
Strategy: IF the car is dead THEN the action is ‘check the fuel tank’; step1
complete
IF step1 is complete AND the ‘fuel tank’ is full THEN the action is ‘check the
battery’; step2 is complete
Heuristic: IF the spill is liquid AND the ‘spill pH’ < 6 AND the ‘spill smell’ is
vinegar THEN the ‘spill material’ is ‘acetic acid’
Components of Rule-based expert
system
There are five components
1. Domain expert
2. Knowledge engineer
3. Programmer
4. Project manager
5. End-user
Domain Expert:
• is a knowledgeable and skilled person capable of solving problems in a specific area or
domain.
• the person’s expertise is to be captured in the expert system.
• could be more than one expert that contribute to an expert system.
• the expert must be able to communicate his or her knowledge, be willing to participate
in the expert system development and commit a substantial amount of time to the
project.
• is the most important person in the expert system development team.
Knowledge Engineer:
• is someone who is capable of designing, building and testing an expert system.
• interviews the domain expert to find out how a particular problem is solved.
• establishes what reasoning methods the expert uses to handle facts and rules and
decides how to represent them in the expert system.
• choose some development software or an expert systems shell, or look at programming
languages for encoding the knowledge.
• responsible for testing, revising and integrating the expert system into the workplace.
Programmer:
• is the person responsible for the actual programming, describing the domain
knowledge in terms that a computer can understand.
• needs to have the skills in symbolic programming in such AI language such as
Prolog.
• should also know conventional programming language like C, Pascal, FORTRAN and
Basic
Project Manager:
• is the leader of the expert system development team, responsible for keeping the
project on track
• makes sure that all deliverables and milestones are met, interacts with the expert,
knowledge engineer, programmer and end-user
End-user:
• often called the user
• is a person who uses the expert system when it is developed
• must not only be confident in the expert system performance but also feel
comfortable using it
Basic Structure of a rule-based
expert system
Knowledge base contains the domain knowledge useful for problem
solving
• In rule-based expert system, the knowledge is represented as a set of
rules. Each rule specifies a relation, recommendation, directive, strategy
or heuristic and has the IF (condition) THEN (action) structure.
• When the condition part of a rule is satisfied, the rule is said to fire and
the action part is executed
• The database includes a set of facts used to match against the IF
(condition) parts of rules stored in the knowledge base.
• The inference engineer carries out the reasoning whereby the expert
system reaches a solution. It links the rules given in the knowledge base
with the facts provided in the database.
• The explanation facilities enable the user to ask the expert system how
a particular conclusion is reached and why a specific fact is needed
• The user interface is the means of communication between a user
seeking a solution to the problem and an expert system
Conflict Resolution
Let us consider two simple rules for crossing a road. And let us now add the third rule:
Rule 1:
IF the ‘traffic light’ is green THEN the action is go
Rule 2:
IF the ‘traffic light’ is red THEN the action is stop
Rule 3:
IF the ‘traffic light’ is red THEN the action is go
We have two rules, Rule 2 and Rule 3, with the same IF part. Thus both of them can be set to
fire when the condition part is satisfied.
These rules represent a conflict set
The inference engine must determine which rule to fire from such a set
A method for choosing a rule to fire when more than one rule can be fired in a given cycle is
called conflict resolution
Uncertainty Management in Rule-based Expert Systems
Information can be incomplete, inconsistent, uncertain, or all three.
Uncertainty is defined as the lack of the exact knowledge that would enable us to reach a
perfectly reliable conclusion.
Classical logic permits only exact reasoning. It assumes that perfect knowledge always
exists and the law of the excluded middle can always be applied:
IF A is true IF A is false THEN A is not false THEN A is not
true
Facts and inferences dealt with so far have been categorical - either true or false; real life
facts and rules are often less than certain
Uncertainty can be expressed numerically as certainty/confidence factor (cf) or measure of
belief (mb)
cf usually is a real number in a particular range, eg, 0 to 1 or -1 to 1
Various schemes have been proposed to deal with uncertainty
Advantages of rule-based expert systems
Separation of knowledge from its processing
• The structure of a rule-based expert system provides an effective
separation of the knowledge base from the inference engine.
• This makes it possible to develop different applications using the
same expert system shell.
Dealing with incomplete and uncertain knowledge
• Most rule-based expert systems are capable of representing and
reasoning with incomplete and uncertain knowledge.
Disadvantages of rule-based expert systems
Opaque relations between rules
• Although the individual production rules are relatively simple and
self-documented, their logical interactions within the large set of rules
may be opaque.
• Rule-based systems make it difficult to observe how individual rules
serve the overall strategy.
Ineffective search strategy
• The inference engine applies an exhaustive search through all the
production rules during each cycle.
• Expert systems with a large set of rules (over 100 rules) can be slow,
and thus large rule-based systems can be unsuitable for real-time
applications
Disadvantages of rule-based expert
systems
Inability to learn
• In general, rule-based expert systems do not have an
ability to learn from the experience.
• Unlike human expert, who knows when to “break the
rules”, an expert system cannot automatically modify its
knowledge base, or adjust existing rules or add new ones.
• The knowledge engineer is still responsible for revising
and maintaining the system
Frame-based Expert systems
Frame-based expert systems are widely used as the knowledge
representation for expert systems with large knowledge base.
Many systems have the ability to connect to external databases.
Facts stored in databases can be loaded into expert system's
knowledge base and inference is performed by the inference engine
of the expert system.
What is Frame
• A frame is a record like structure which consists of a collection of
attributes and its values to describe an entity in the world.
• It consists of a collection of slots and slot values. These slots may
be of any type and sizes. Slots have names and values which are
called facets.
• A frame may consist of any number of slots, and a slot may include
any number of facets and facets may have any number of values. A
frame is also known as slot-filter knowledge representation in
artificial intelligence.
Each frame has its own name and a set of attributes associated with
it.
Name, weight, height and age are slots in the frame Person.
Model, processor, memory and price are slots in the frame
Computer.
Each attribute or slot has a value attached to it.
Frames provide a natural way for the structured and concise
representation of knowledge.
Example
Advantages of frame based expert
systems
• It is very easy to add slots for new attribute and relations.
• It is easy to include default data and to search for missing values.
• Frame representation is easy to understand and visualize.
Question bank
1. What is expert systems? Explain the characteristics of the expert
systems.
2. Explain the components or architecture of the expert systems.
3. Explain the two strategies used by the inference engine in expert
systems.
4. Explain the process of building an expert system in AI
5. Explain the components of rule-based expert system
6. Explain the structure of a rule-based expert system.
7. Explain the conflict resolution and uncertainty management in rule-
based expert system
8. Explain frame in frame based expert system.
Thank you

More Related Content

PPTX
Forward and Backward chaining in AI
PDF
Expert System With Python -1
PPTX
Expert System (Forward and Backward Chaining)
PPTX
Expert Systems in Artificial Intelligence: Revolutionizing Problem Solving
PPTX
expert system for IGCSE students study material
PPTX
Expert system
PPTX
AI system mimicking human expert decision-making..pptx
PPT
Neural network Artificial intelligence ppt
Forward and Backward chaining in AI
Expert System With Python -1
Expert System (Forward and Backward Chaining)
Expert Systems in Artificial Intelligence: Revolutionizing Problem Solving
expert system for IGCSE students study material
Expert system
AI system mimicking human expert decision-making..pptx
Neural network Artificial intelligence ppt

Similar to Module 5 - Expert System-in artificial intelligence (20)

PPTX
5.11 expert system
PDF
Lecture 6 expert systems
PPTX
ASSIGNMENT-2_mallaiah_phd_rule-based1.pptx
PPTX
Expert Systems in Artificial Inteligence
PDF
Expert Systems: Definition, Functioning, and Development Approach - [Part: 2]
PDF
17 2 expert systems
PPTX
Rule based system
PPTX
Artificial intelligence and machine learning
PDF
Lec 4 expert systems
DOCX
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
PDF
artificial intelligence presentation.pdf
PPT
Artificial Intelligence Lecture Slide-04
PDF
Lecture 2 expert system in the Huawei ICT Competition
PDF
Expert Systems
PPT
Lec11- ExpertSystems.ppt
PPTX
Expert Systems
PPTX
Expert system xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PPTX
Expert systems
PPTX
This is my presentation in pptx formate.pptx
5.11 expert system
Lecture 6 expert systems
ASSIGNMENT-2_mallaiah_phd_rule-based1.pptx
Expert Systems in Artificial Inteligence
Expert Systems: Definition, Functioning, and Development Approach - [Part: 2]
17 2 expert systems
Rule based system
Artificial intelligence and machine learning
Lec 4 expert systems
FORWARD CHAINING AND BACKWARD CHAINING SYSTEMS IN ARTIFICIAL INTELIGENCE
artificial intelligence presentation.pdf
Artificial Intelligence Lecture Slide-04
Lecture 2 expert system in the Huawei ICT Competition
Expert Systems
Lec11- ExpertSystems.ppt
Expert Systems
Expert system xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Expert systems
This is my presentation in pptx formate.pptx
Ad

More from veronica380506 (6)

PPT
fundamentals of data networks in data communication
PPT
transmission media in data communication
PPT
Scaling Web Applications with Cassandra Presentation (1).ppt
PPT
introduction to Data communication and networking
PPTX
ACA-CM2 Architecture shared memory model
PPTX
Agents-Artificial Intelligence with different types of agents
fundamentals of data networks in data communication
transmission media in data communication
Scaling Web Applications with Cassandra Presentation (1).ppt
introduction to Data communication and networking
ACA-CM2 Architecture shared memory model
Agents-Artificial Intelligence with different types of agents
Ad

Recently uploaded (20)

PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Lecture Notes Electrical Wiring System Components
DOCX
573137875-Attendance-Management-System-original
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
Construction Project Organization Group 2.pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
Geodesy 1.pptx...............................................
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
CYBER-CRIMES AND SECURITY A guide to understanding
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
UNIT 4 Total Quality Management .pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Lecture Notes Electrical Wiring System Components
573137875-Attendance-Management-System-original
R24 SURVEYING LAB MANUAL for civil enggi
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Internet of Things (IOT) - A guide to understanding
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Mechanical Engineering MATERIALS Selection
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Construction Project Organization Group 2.pptx
Sustainable Sites - Green Building Construction
Geodesy 1.pptx...............................................
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
CH1 Production IntroductoryConcepts.pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx

Module 5 - Expert System-in artificial intelligence

  • 2. Contents Expert Systems: What an expert system is; How it works and how it is built, Basic components of an expert system, Expert System Architectures, Examples of Expert Systems. Rule-based Expert systems: Structure of rule based expert system, Conflict resolution, Uncertainty Management, Advantages & disadvantages of rule-based. Introduction to Frame-based Expert systems.
  • 3. Types of Expert Systems • Types of Expert Systems These include a rule-based expert system, frame-based expert system, fuzzy expert system, neural expert system, and neuro- fuzzy expert system. • Focus is on rule-based expert system
  • 4. What are Expert Systems? • Expert systems (ES) are one of the prominent research domains of AI. • The expert systems are the computer AI applications developed to solve complex problems in a particular domain, at the level of extra- ordinary human intelligence and expertise. • It is introduced by the researchers at Stanford University, Computer Science Department. • Expert System is an interactive and reliable computer-based decision-making system which uses both facts and heuristics to solve complex decision-making problems.
  • 5. Characteristic of Expert System • Highest Level of Expertise: An expert system in artificial intelligence provides the highest level of expertise along with efficiency and accuracy. • Reaction Time: An expert system in artificial intelligence has a very low reaction time. It takes less time than a human expert to solve the same complex problem. • Good Reliability: The Expert system in AI needs to be reliable, and it must not make any a mistake. • Flexible: An expert system in artificial intelligence is flexible to tackle different problems. • Effective: An expert system in artificial intelligence has a robust mechanism to resolve complex problems and later administer them. • Capable: An expert system in artificial intelligence can handle complex problems and deliver solutions on time.
  • 6. Components /Architecture of Expert System There are 5 Components of expert systems: • Knowledge Base • Inference Engine • Knowledge acquisition and learning module • User Interface • Explanation module
  • 7. Knowledge base: The knowledge base in an expert system represents facts and rules. It contains knowledge in specific domains along with rules in order to solve problems, procedures and intrinsic data relevant to the domain. Inference engine: The most basic function of the inference engine is to acquire relevant data from the knowledge base, interpret it, and to find a solution as per the user’s problem. Inference engines also have explanationatory and debugging abilities. Knowledge acquisition and learning module: This component functions to allow the expert systems to acquire more data from various sources and store it in the knowledge base.
  • 8. User interface: This component is essential for a non-expert user to interact with the expert system and find solutions. Explanation module: As the name suggests, this module helps in providing the user with an explanation of the achieved conclusion.
  • 9. Strategies Used By The Inference Engine The Inference Engine uses the following strategies to recommend solutions: • Forward Chaining • Backward Chaining 1.Forward chaining – Answers the question, “What can happen in the future?” 2.Backward chaining – Answers the question, “Why did this happen?”
  • 10. Forward Chaining • Forward chaining is a form of reasoning which start with atomic sentences in the knowledge base and applies inference rules (Modus Ponens) in the forward direction to extract more data until a goal is reached. • The Forward-chaining algorithm starts from known facts, triggers all rules whose premises are satisfied, and add their conclusion to the known facts. This process repeats until the problem is solved. Forward Chaining in Propositional Logic • In propositional logic, forward chaining starts its journey from the given knowledge base. If all the premises of the implication are known, then its conclusion will be added to the set of known facts. • Let’s see an example: 1.If D barks and D eats bone, then D is a dog. 2.If V is cold and V is sweet, then V is ice-cream. 3.If D is a dog, then D is black. 4.If V is ice-cream, then it is Vanilla. • Derive forward chaining using the given known facts to prove Tomy is black.
  • 11. • Let’s see an example: 1.If D barks and D eats bone, then D is a dog. 2.If V is cold and V is sweet, then V is ice-cream. 3.If D is a dog, then D is black. 4.If V is ice-cream, then it is Vanilla. • Derive forward chaining using the given known facts to prove Tomy is black. Tomy barks. Tomy eats bone. Solution: Given Tomy barks. • From (1), it is clear: • If Tomy barks and Tomy eats bone, then Tomy is a dog. • From (3), it is clear: • If Tomy is a dog, then Tomy is black. • Hence, it is proved that Tomy is black.
  • 15. Backward chaining • A backward chaining algorithm is a form of reasoning, which starts with the goal and works backward, chaining through rules to find known facts that support the goal. Properties of backward chaining: • It is known as a top-down approach. • Backward-chaining is based on modus ponens inference rule. • In backward chaining, the goal is broken into sub-goal or sub-goals to prove the facts true. • It is called a goal-driven approach, as a list of goals decides which rules are selected and used. • Backward -chaining algorithm is used in game theory, automated theorem proving tools, inference engines, proof assistants, and various AI applications. • The backward-chaining method mostly used a depth-first search strategy for proof.
  • 17. Backward Chaining in Propositional Logic • In propositional logic, backward chaining begins from the goal and using the given propositions, it proves the asked goal. There is a backward chaining algorithm which is used to perform backward chaining for the given axioms.
  • 18. Given that: 1.If D barks and D eats bone, then D is a dog. 2.If V is cold and V is sweet, then V is ice-cream. 3.If D is a dog, then D is black. 4.If V is ice-cream, then it is Vanilla. Derive backward chaining using the given known facts to prove Tomy is black. • Tomy barks. • Tomy eats bone. Solution: 1.On replacing D with Tomy in (3), it becomes: • If Tomy is a dog, then Tomy is black. • Thus, the goal is matched with the above axiom. • Now, we have to prove Tomy is a dog. …(new goal) • Replace D with Tomy in (1), it will become: • If Tomy barks and Tomy eats bone, then Tomy is a dog. …(new goal) • Again, the goal is achieved. • Now, we have to prove that Tomy barks and Tomy eats bone. …(new goal) • As we can see, the goal is a combination of two sentences which can be further divided as: • Tomy barks. • Tomy eats bone. • From (1), it is clear that Tomy is a dog. • Hence, Tomy is black.
  • 20. As an example of the forward chaining, we have the following rules: Rule 1 If symptoms are headache, sneezing, running nose and sorethroat, then patient has cold. Rule 2 If symptoms are fever, cough and running nose, then patient has measles. Facts are generated in working memory by asking questions to the user whether he has fever, running nose, cough, etc. Thus, in forward chaining, we start with the facts given by the user and try to find an appropriate rule whose iſ part is satisfied and subsequently the then part is concluded. The other important inference mechanism that we are familiar with is backward chaining. Backward chaining starts with a list of goals and works backwards to see if there is data which will allow it to conclude any of these goals. An inference engine using backward chaining would search the inference rules until it finds one whose then part matches a desired goal. If the if part of that inference rule is not known to be true, then it is added to the list of goals. Consider the same example discussed above. In order to satisfy a goal called cold, the inference engine will select a rule with conclusion as cold and will try to find the facts in the if part of the role whether the user has headache, sneezing, running nose, and sore throat. If yes, then cold is established otherwise it tries other rule for goal, if it exists. If we are not able to satsify all the rules with the goal cold then other goals such as measles will be tried. Using rule 2, if the symptoms of the user are fever, running nose, and cough, then measles is concluded. The inference engine using backward chaining tries to prove conclusion of the rules one by one till it succeeds or all the rules are exhausted. Because the list of goals determines which rules would be selected and used, this method is also known as goal-driven method.
  • 21. Building an Expert System in Artificial Intelligence 1.Determine the characteristics of the problem. 2.Knowledge engineers and domain experts collaborate to define the issue. • Domain expert – A person or group of people whose skills and knowledge are acquired to develop the knowledge base. • Knowledge engineer – A technical person who uses the acquired knowledge and integrates it with expert computer systems. 3. The knowledge engineer, after defining the problem, translates it into understandable computer language knowledge. The knowledge engineer designs the inference engine that uses the knowledge when called to assist. 4. The knowledge expert also integrates the use of unknown knowledge in the reasoning process with an explanation.
  • 22. Examples of expert systems Expert systems that are in use include the following examples: • CaDet (Cancer Decision Support Tool) is used to identify cancer in its earliest stages. • DENDRAL helps chemists identify unknown organic molecules. • DXplain is a clinical support system that diagnoses various diseases. • MYCIN identifies bacteria such as bacteremia and meningitis, and recommends antibiotics and dosages. • PXDES determines the type and severity of lung cancer a person has. • R1/XCON is an early manufacturing expert system that automatically selects and orders computer components based on customer specifications.
  • 24. What is knowledge? • is a theoretical or practical understanding of a subject or a domain. • Anyone can be considered as domain expert if he or she has deep knowledge and strong practical experience in a particular domain. • The human mental process is internal, and it is too complex to be represented as an algorithm • However, most experts are capable of expressing their knowledge in the form of rules for problem solving. IF the ‘traffic light’ is ‘green’ THEN the action is go IF the ‘traffic light’ is ‘red’ THEN the action is stop
  • 25. Rules as a Knowledge Representation Technique • The term rule in AI, can be defined as an IF-THEN structure that relates given information or facts in the IF part to some action in the THEN part. • A rule provides some description of how to solve a problem. • Rule are relatively easy to create and understand • Any rules consists of two parts: the IF part, called the antecedent (premise or condition) and the THEN part called the consequent (conclusion or action) IF <antecedent> THEN <consequent> • A rule can have multiple antecedents joined by the keywords AND (conjunction), OR (disjunction) or a combination of both.
  • 26. IF <antecedent 1> IF <antecedent 1> AND <antecedent 2> OR <antecedent 2> AND ⁝ <antecedent n> OR ⁝ <antecedent n> THEN <consequent> THEN <consequent>
  • 27. • The antecedent of a rule incorporates two parts: an object (linguistic object) and its value. The object and its value are linked by an operator. • The operator identifies the object and assigns the value. Operators such as is, are, is not, are not are used to assign a symbolic value to a linguistic object. • Expert systems can also used mathematical operators to define an object as numerical and assign it to the numerical value. IF ‘age of the customer’ < 18 AND ‘cash withdrawal’ > 1000 THEN ‘signature of the parent’ is required
  • 28. Rules can represent Relation: IF the ‘fuel tank’ is empty THEN the car is dead. Recommendation: IF the season is autumn AND the sky is cloudy AND the forecast is drizzle THEN the advice is ‘take an umbrella’ Directive: IF the car is dead AND the ‘fuel tank’ is empty THEN the action is ‘refuel the car’ Strategy: IF the car is dead THEN the action is ‘check the fuel tank’; step1 complete IF step1 is complete AND the ‘fuel tank’ is full THEN the action is ‘check the battery’; step2 is complete Heuristic: IF the spill is liquid AND the ‘spill pH’ < 6 AND the ‘spill smell’ is vinegar THEN the ‘spill material’ is ‘acetic acid’
  • 29. Components of Rule-based expert system There are five components 1. Domain expert 2. Knowledge engineer 3. Programmer 4. Project manager 5. End-user
  • 30. Domain Expert: • is a knowledgeable and skilled person capable of solving problems in a specific area or domain. • the person’s expertise is to be captured in the expert system. • could be more than one expert that contribute to an expert system. • the expert must be able to communicate his or her knowledge, be willing to participate in the expert system development and commit a substantial amount of time to the project. • is the most important person in the expert system development team. Knowledge Engineer: • is someone who is capable of designing, building and testing an expert system. • interviews the domain expert to find out how a particular problem is solved. • establishes what reasoning methods the expert uses to handle facts and rules and decides how to represent them in the expert system. • choose some development software or an expert systems shell, or look at programming languages for encoding the knowledge. • responsible for testing, revising and integrating the expert system into the workplace.
  • 31. Programmer: • is the person responsible for the actual programming, describing the domain knowledge in terms that a computer can understand. • needs to have the skills in symbolic programming in such AI language such as Prolog. • should also know conventional programming language like C, Pascal, FORTRAN and Basic Project Manager: • is the leader of the expert system development team, responsible for keeping the project on track • makes sure that all deliverables and milestones are met, interacts with the expert, knowledge engineer, programmer and end-user End-user: • often called the user • is a person who uses the expert system when it is developed • must not only be confident in the expert system performance but also feel comfortable using it
  • 32. Basic Structure of a rule-based expert system
  • 33. Knowledge base contains the domain knowledge useful for problem solving • In rule-based expert system, the knowledge is represented as a set of rules. Each rule specifies a relation, recommendation, directive, strategy or heuristic and has the IF (condition) THEN (action) structure. • When the condition part of a rule is satisfied, the rule is said to fire and the action part is executed • The database includes a set of facts used to match against the IF (condition) parts of rules stored in the knowledge base. • The inference engineer carries out the reasoning whereby the expert system reaches a solution. It links the rules given in the knowledge base with the facts provided in the database. • The explanation facilities enable the user to ask the expert system how a particular conclusion is reached and why a specific fact is needed • The user interface is the means of communication between a user seeking a solution to the problem and an expert system
  • 34. Conflict Resolution Let us consider two simple rules for crossing a road. And let us now add the third rule: Rule 1: IF the ‘traffic light’ is green THEN the action is go Rule 2: IF the ‘traffic light’ is red THEN the action is stop Rule 3: IF the ‘traffic light’ is red THEN the action is go We have two rules, Rule 2 and Rule 3, with the same IF part. Thus both of them can be set to fire when the condition part is satisfied. These rules represent a conflict set The inference engine must determine which rule to fire from such a set A method for choosing a rule to fire when more than one rule can be fired in a given cycle is called conflict resolution
  • 35. Uncertainty Management in Rule-based Expert Systems Information can be incomplete, inconsistent, uncertain, or all three. Uncertainty is defined as the lack of the exact knowledge that would enable us to reach a perfectly reliable conclusion. Classical logic permits only exact reasoning. It assumes that perfect knowledge always exists and the law of the excluded middle can always be applied: IF A is true IF A is false THEN A is not false THEN A is not true Facts and inferences dealt with so far have been categorical - either true or false; real life facts and rules are often less than certain Uncertainty can be expressed numerically as certainty/confidence factor (cf) or measure of belief (mb) cf usually is a real number in a particular range, eg, 0 to 1 or -1 to 1 Various schemes have been proposed to deal with uncertainty
  • 36. Advantages of rule-based expert systems Separation of knowledge from its processing • The structure of a rule-based expert system provides an effective separation of the knowledge base from the inference engine. • This makes it possible to develop different applications using the same expert system shell. Dealing with incomplete and uncertain knowledge • Most rule-based expert systems are capable of representing and reasoning with incomplete and uncertain knowledge.
  • 37. Disadvantages of rule-based expert systems Opaque relations between rules • Although the individual production rules are relatively simple and self-documented, their logical interactions within the large set of rules may be opaque. • Rule-based systems make it difficult to observe how individual rules serve the overall strategy. Ineffective search strategy • The inference engine applies an exhaustive search through all the production rules during each cycle. • Expert systems with a large set of rules (over 100 rules) can be slow, and thus large rule-based systems can be unsuitable for real-time applications
  • 38. Disadvantages of rule-based expert systems Inability to learn • In general, rule-based expert systems do not have an ability to learn from the experience. • Unlike human expert, who knows when to “break the rules”, an expert system cannot automatically modify its knowledge base, or adjust existing rules or add new ones. • The knowledge engineer is still responsible for revising and maintaining the system
  • 40. Frame-based expert systems are widely used as the knowledge representation for expert systems with large knowledge base. Many systems have the ability to connect to external databases. Facts stored in databases can be loaded into expert system's knowledge base and inference is performed by the inference engine of the expert system.
  • 41. What is Frame • A frame is a record like structure which consists of a collection of attributes and its values to describe an entity in the world. • It consists of a collection of slots and slot values. These slots may be of any type and sizes. Slots have names and values which are called facets. • A frame may consist of any number of slots, and a slot may include any number of facets and facets may have any number of values. A frame is also known as slot-filter knowledge representation in artificial intelligence.
  • 42. Each frame has its own name and a set of attributes associated with it. Name, weight, height and age are slots in the frame Person. Model, processor, memory and price are slots in the frame Computer. Each attribute or slot has a value attached to it. Frames provide a natural way for the structured and concise representation of knowledge.
  • 44. Advantages of frame based expert systems • It is very easy to add slots for new attribute and relations. • It is easy to include default data and to search for missing values. • Frame representation is easy to understand and visualize.
  • 45. Question bank 1. What is expert systems? Explain the characteristics of the expert systems. 2. Explain the components or architecture of the expert systems. 3. Explain the two strategies used by the inference engine in expert systems. 4. Explain the process of building an expert system in AI 5. Explain the components of rule-based expert system 6. Explain the structure of a rule-based expert system. 7. Explain the conflict resolution and uncertainty management in rule- based expert system 8. Explain frame in frame based expert system.

Editor's Notes

  • #9: Forward chaining reads and processes a set of facts to make a logical prediction about what will happen next. An example of forward chaining would be making predictions about the movement of the stock market. Backward chaining reads and processes a set of facts to reach a logical conclusion about why something happened. An example of backward chaining would be examining a set of symptoms to reach a medical diagnosis.