You are on page 1of 30

Expert Systems

Session 3 Slides
What is an Expert system
🠶 An expert system (ES) is a knowledge-based system that
employs knowledge about its application domain and uses
an inferencing (reason) procedure to solve problems that
would otherwise require human competence or expertise.
🠶 The power of expert systems stems primarily from the
specific knowledge about a narrow domain stored in the
expert system's knowledge base.
What is an Expert system?
🠶 It is important to note that expert systems are assistants to
decision makers and not substitutes for them.
🠶 Expert systems do not have human capabilities.
🠶 They use a knowledge base of a particular domain and
bring that knowledge to bear on the facts of the particular
situation at hand.
🠶 The knowledge base of an ES also contains heuristic
knowledge - rules of thumb used by human experts who
work in the domain.
Characteristics of Expert Systems
🠶 High performance
🠶 Understandable
🠶 Reliable
🠶 Highly responsive
.
Capabilities of Expert Systems
🠶 The expert systems are capable of −
🠶 Advising
🠶 Instructing and assisting human in decision making
🠶 Demonstrating
🠶 Deriving a solution
🠶 Diagnosing
🠶 Explaining
🠶 Interpreting input
🠶 Predicting results
🠶 Justifying the conclusion
🠶 Suggesting alternative options to a problem
Capabilities of Expert Systems
🠶 They are incapable of −
🠶 Substituting human decision makers
🠶 Possessing human capabilities
🠶 Producing accurate output for inadequate knowledge base
🠶 Refining their own knowledge
Components of Expert Systems
🠶 The components of ES include −
🠶 Knowledge Base
🠶 Inference Engine
🠶 User Interface
Knowledge representation

🠶 It is the method used to organize and formalize the


knowledge in the knowledge base. It is in the form of IF-
THEN-ELSE rules.
🠶 Knowledge Acquisition
🠶 The success of any expert system majorly depends on the
quality, completeness, and accuracy of the information
stored in the knowledge base.
🠶 The knowledge base is formed by readings from various
experts, scholars, and the Knowledge Engineers.
🠶 The knowledge engineer is a person with the qualities of
empathy, quick learning, and case analyzing skills
Knowledge representation
🠶 He acquires information from subject expert by recording,
interviewing, and observing him at work, etc.
🠶 He then categorizes and organizes the information in a
meaningful way, in the form of IF-THEN-ELSE rules, to
be used by interference machine.
🠶 The knowledge engineer also monitors the development of
the ES
Development and Maintenance of Expert Systems
🠶 Steps in the methodology for the iterative process of ES
development and maintenance include:
🠶 1. Problem Identification and Feasibility Analysis:
🠶 - the problem must be suitable for an expert system to solve it.
🠶 - must find an expert for the project
🠶 - cost-effectiveness of the system has to be established (feasibility)
🠶 2. System Design and ES Technology Identification:
🠶 - the system is being designed.
🠶 The needed degree of integration with other subsystems and databases
is established
🠶 - concepts that best represent the domain knowledge are worked out
🠶 - the best way to represent the knowledge and to perform inferencing
should be established with sample cases
Development and Maintenance of Expert Systems
🠶 3. Development of Prototype:
🠶 - knowledge engineer works with the expert to place the initial kernel
of knowledge in the knowledge base.
🠶 - knowledge needs to be expressed in the language of the specific tool
chosen for the project
🠶 4. Testing and Refinement of Prototype:
🠶 - using sample cases, the prototype is tested, and deficiencies in
performance are noted. End users test the prototypes of the ES.
🠶 5. Complete and Field the ES:
🠶 - the interaction of the ES with all elements of its environment,
including users and other information systems, is ensured and tested.
🠶 - ES is documented and user training is conducted
Development and Maintenance of Expert Systems
🠶 6. Maintain the System:
🠶 - the system is keep current primarily by updating its knowledge base.
🠶 - interfaces with other information systems have to be maintained as
well, as those systems evolve
Inference Engine
🠶 Use of efficient procedures and rules by the Inference
Engine is essential in deducting a correct, flawless
solution.
🠶 In case of knowledge-based ES, the Inference Engine
acquires and manipulates the knowledge from the
knowledge base to arrive at a particular solution.
🠶 In case of rule based ES, it −
🠶 Applies rules repeatedly to the facts, which are obtained
from earlier rule application.
🠶 Adds new knowledge into the knowledge base if required.
🠶 Resolves rules conflict when multiple rules are applicable
to a particular case
Inference Engine
🠶 A rule based system is typically written using a rule language
or as if-then statements.
🠶 Some rule languages are ART (Automated Reasoning Tool).
Rule based systems can also be written in Basic and C, just as
long as you write a procedure that has if-then rules in it, which
typically loops until some terminating condition is reached.
🠶 A knowledge based system codifies human knowledge
typically in a declarative format and acts upon the knowledge.
🠶 The knowledge does not have to be written as rules. It could be
written as algorithmic procedures, or cases (as in case based
reasoning), or as ontologies, or even as neural networks. The
important facet is that human knowledge is codified and acted
upon.
Inference Engine
🠶 To recommend a solution, the Inference Engine uses the
following strategies −
🠶 Forward Chaining
🠶 Backward Chaining
Forward Chaining
🠶 It is a strategy of an expert system to answer the
question, “What can happen next?”
🠶 Forward chaining as the name suggests, start from the
known facts and move forward by applying inference
rules to extract more data, and it continues until it reaches
to the goal,
🠶 It considers all the facts and rules, and sorts them before
concluding to a solution.
🠶 This strategy is followed for working on conclusion, result,
or effect.
🠶 For example, prediction of share market status as an effect
of changes in interest rates.
Forward Chaining
🠶 For example, suppose that the goal is to conclude the color
of a pet named Fritz, given that he croaks and eats flies,
and that the rule base contains the following four rules

🠶 If X croaks and eats flies – Then X is a frog


🠶 If X chirps and sings – Then X is a canary
🠶 If X is a frog – Then X is green
🠶 If X is a canary – Then X is yellow
Forward Chaining
🠶 For example, suppose that the goal is to conclude the color of a
pet named Fritz, given that he croaks and eats flies, and that
the rule base contains the following four rules

🠶 This rule base would be searched and the first rule would be
selected, because its antecedent (If Fritz croaks and eats flies)
matches our data.
🠶 Now the consequents (Then X is a frog) is added to the data.
🠶 The rule base is again searched and this time the third rule is
selected, because its antecedent (If Fritz is a frog) matches our
data that was just confirmed.
🠶 Now the new consequent (Then Fritz is green) is added to our
data
Forward Chaining
Backward Chaining
🠶 With this strategy, an expert system finds out the answer to
the question, “Why this happened?”
🠶 Backward chaining starts from the goal and works
backward through inference rules to find the required facts
that support the goal.
🠶 On the basis of what has already happened, the Inference
Engine tries to find out which conditions could have
happened in the past for this result.
🠶 This strategy is followed for finding out cause or reason.
🠶 For example, diagnosis of blood cancer in humans.
Backward Chaining
User interface

🠶 User interface provides interaction between user of the ES


and the ES itself.
🠶 It is generally Natural Language Processing so as to be
used by the user who is well-versed in the task domain.
🠶 The user of the ES need not be necessarily an expert in
Artificial Intelligence.
User interface

🠶 It explains how the ES has arrived at a particular


recommendation.
🠶 The explanation may appear in the following forms −
🠶 Natural language displayed on screen.
🠶 Verbal narrations in natural language.
🠶 Listing of rule numbers displayed on the screen.
🠶 The user interface makes it easy to trace the credibility of
the deductions.
Expert Systems Limitations

🠶 No technology can offer easy and complete solution.


🠶 Large systems are costly, require significant development
time, and computer resources.
🠶 ESs have their limitations which include −
🠶 Limitations of the technology
🠶 Difficult knowledge acquisition
🠶 ES are difficult to maintain
🠶 High development costs
Applications of Expert System

🠶 Research on the application areas of ES


Homework

🠶 Critically examine the differences between forward


chaining and backward chaining with the aid of examples
End of session 3
🠶 Any Questions
Term paper
🠶 You work in your usual groups
🠶 Develop an Expert system that addresses a problem in your chosen doman
application
🠶 The problem to be addressed needs to be well articulated
🠶 Come up with facts and rules that will be used to address the problem
🠶 You need to use the rule based system when developing the ES
🠶 Implement the Expert system

🠶 Materials to assist
🠶 Check the example pdf for your reference
🠶 https://www.javatpoint.com/forward-chaining-and-backward-chaining-in-ai
🠶 Due date: 27 November 2020
🠶 30 marks
PROLOG
🠶 Prolog is a logic programming language associated with artificial intelligence
and computational linguistics.
🠶 Prolog has its roots in first-order logic, a formal logic, and unlike many other
programming languages, Prolog is intended primarily as a declarative
programming language:
🠶 the program logic is expressed in terms of relations, represented as facts and
rules.
🠶 A computation is initiated by running a query over these relations
PROLOG
🠶 Prolog was one of the first logic programming languages, and remains the
most popular among such languages today, with several free and commercial
implementations available.
🠶 The language has been used for theorem proving, expert systems as well as its
original intended field of use, natural language processing.
🠶 Modern Prolog environments support the creation of graphical user interfaces,
as well as administrative and networked applications.

You might also like