Artificial Intelligence: Wester Zela
Artificial Intelligence: Wester Zela
Wester Zela
Session 2
[email protected]
www.ssyspe.org
Agenda
• Expert Systems
• History of Expert Systems
• Characteristics of Expert Systems
• Architecture of Expert Systems
• Expert System Life Cycle
• Exercise
• Discussion about Final Project
Expert Systems
• The most important applied area of AI is the field of expert systems.
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.
• Expert systems are assistants to decision makers and not substitutes
for them.
Generic Categories of Expert System
Applications
• Classification - identify an object based on stated characteristics
• Diagnosis Systems - infer malfunction or disease from observable data
• Monitoring - compare data from a continually observed system to
prescribe behaviour
• Process Control - control a physical process based on monitoring
• Design - configure a system according to specifications
• Scheduling & Planning - develop or modify a plan of action
• Generation of Options - generate alternative solutions to a problem
Knowledge Based System (KBS)
• Expert System is a computer program that contains the knowledge
and analytical skills of one or more human experts in a specific
problem domain
• Expert systems are designed to solve complex problems by reasoning
about knowledge, represented primarily as if-then-rules
• The goal of the design of the expert system is to capture the
knowledge of a human expert relative to some specific domain and
code this in a computer in such a way that the knowledge of the
expert is available to a less experienced user
• Expert system provides high quality experience, domain specific
knowledge; apply heuristics, forward or backward reasoning
Characteristics of Expert Systems
• Expert system provides the high-quality performance which solves
difficult programs in a domain as good as or better than human
experts.
• Expert System possesses vast quantities of domain specific knowledge
to the minute details.
• Expert systems apply heuristics to guide the reasoning and thus
reduce the search area for a solution.
• A unique feature of an expert system is its explanation capability. It
enables the expert system to review its own reasoning and explain its
decisions
Characteristics of Expert Systems
• Expert systems employ symbolic reasoning when solving a problem.
Symbols are used to represent different types of knowledge such as
facts, concepts and rules.
• Expert system can advice, modifies, update, expand & deals with
uncertain and irrelevant data.
Knowledge Representation
• Frame-based systems
A frame specifies the attributes of a complex object and frames for
various object types have specified relationships.
• Production rules
Rule-based expert systems are expert systems in which the knowledge
is represented by production rules.
A production rule, or simply a rule, consists of an IF part (a condition or
premise) and a THEN part (an action or conclusion). IF condition THEN
action (conclusion).
Knowledge Representation - Frames
Knowledge Representation – Production
Rules
PUFF: Rule 31
IF:
1. The severity of obstructive airways disease of the patient is greater than or equal to mild, and
2. the degree of diffusion defect of the patient is greater than or equal to mild, and
3. the TLC observed/predicted of the patient is greater than or equal to 110, and
4. the observed/predicted difference in RV/TLC of the patient is greater than or equal to 10
THEN:
1. There is strongly suggestive evidence (0.9) that the subtype of obstructive airways disease is
emphysema, and
2. It is definite (1.0) that "OAD, Diffusion Defect, elevated TLC, and elevated RV together indicate
emphysema" is one of the findings
Inferencing Process
Forward chaining
is a data-driven strategy. The inferencing process moves from the facts
of the case to a goal (conclusion). The inference engine attempts to
match the condition (IF) part of each rule in the knowledge base with
the facts currently available in the working memory. If several rules
match, a conflict resolution procedure is invoked; for example, the
lowest-numbered rule that adds new information to the working
memory is fired. The conclusion of the firing rule is added to the
working memory.
Commonly used to solve more open-ended problems.
Inferencing Process
• Backward chaining
The inference engine attempts to match the assumed (hypothesized)
conclusion - the goal or subgoal state - with the conclusion (THEN) part
of the rule. If such a rule is found, its premise becomes the new
subgoal. In an Expert System with few possible goal states, this is a
good strategy to pursue.
Best suited for applications in which the possible conclusions are
limited in number and well defined. Example: Classification or diagnosis
type systems
Example Backward Chaining
• For example, suppose a new pet, Rene, is delivered in an opaque box
along with two facts about Rene:
• Rene croaks
• Rene eats flies
• The goal is to decide whether Rene is green, based on a rule base
containing the following four rules:
• If X croaks and X eats flies – Then X is a frog
• If X chirps and X sings – Then X is a canary
• If X is a frog – Then X is green
• If X is a canary – Then X is yellow
Example Backward Chaining
• Rene is substituted for X in rule #3 to see if its consequent matches
the goal, so rule #3 becomes:
• If Rene is a frog – Then Rene is green
• Since the consequent matches the goal (“Rene is green"),the rules engine
now needs to see if the antecedent ("If Rene is a frog") can be proved. The
antecedent therefore becomes the new goal: Rene is a frog
• Again substituting Rene for X, rule #1 becomes:
• If Rene croaks and Rene eats flies – Then Rene is a frog
• Since the consequent matches the current goal (“Rene is a frog"), the
inference engine now needs to see if the antecedent ("If Rene croaks and eats
flies") can be proved. The antecedent therefore becomes the new goal:
• Rene croaks and Rene eats flies
Example Backward Chaining
• Since this goal is a conjunction of two statements, the inference
engine breaks it into two sub-goals, both of which must be proved:
• Rene croaks
• Rene eats flies
• To prove both of these sub-goals, the inference engine sees that both
of these sub-goals were given as initial facts. Therefore, the
conjunction is true:
• Rene croaks and Rene eats flies
• Therefore the antecedent of rule #1 is true and the consequent must be true:
• Rene is a frog
• Therefore the antecedent of rule #3 is true and the consequent must be true:
• Rene is green
Benefits of Expert Systems (ES)
• An ES can complete its part of the tasks much faster than a human expert.
• 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 company can operate an ES in environments hazardous for humans.
Limitations of Expert Systems
• Limitations of the technology
• Problems with knowledge acquisition
• Operational domains as the principal area of ES application
• Maintaining human expertise in organizations
History of Expert Systems
• First Expert Systems:
• Integration functions: in 60’s
• Dendral, in 60’s : Help organic chemists in identifying of unknown organic
molecules using knowledge of chemistry. Developed in LISP
• Mycin, in 70’s at Stanford Universty. System for diagnosing infectious diseases
and recommend antibiotics. Developed in LISP.
• Others like Eliza, PUFF (1979), an expert system for interpretation of
pulmonary function data, Chess Players, etc.
• CLIPS: http://www.clipsrules.net/
• Now days:
• Expert Systems in different domains: Finances, Medicine, Banca, etc.
http://www.academia.edu/5971912/Expert_Systems_in_Real_world_Business
PUFF (1979) - Pulmonary function analysis
• Physician refers patient to pulmonary testing lab
• Patient inhales/exhales through tube connected to computerized
instrument which measures flow rates and air volumes
• PUFF accepts this data along with auxiliary data (age, sex, smoking
history), and prints diagnosis in English
• Initially 64 if-then rules
PUFF Results
• Diagnoses:
• DEGREE OF OBSTRUCTIVE AIRWAYS DISEASE :
• OAD degree by slope: MODERATELY-SEVERE 700
• OAD degree by MMF: SEVERE 900
• OAD degree by FEV1: MODERATELY-SEVERE 700
• Final OAD degree: MODERATELY-SEVERE 910 SEVERE 900
Knowledge base: contains the knowledge necessary for understanding, formulating and for solving
Problems
Inference rules: is a brain of expert system. It uses the control structure (rule interpreter) and
provides methodology for reasoning
Expert System Life Cycle
Development Expert System
• User: Who use the Expert System
• Expert: Who provide the knowledge
• Knowledge Engineer: Building, validating, and maintaining the
knowledge base
Expert System - Example
• The game of animal is an old children’s game.
• There are two participants in the game — the player and the guesser.
• The player is asked to think of an animal, which the guesser will try to guess.
• The guesser asks the player a series of yes-no questions, such as:
• Guesser: Does it live on land?
• The Player will answer yes or not.
• By remembering the new animal and the difference between his or her animal
and the new animal, the guesser learns to distinguish between the two animals.
• A computer program that plays the animal game provides a classic example of a
situation in which a program can seemingly learn
Sample Run of Animal Game
Decision Trees – Knowledge adquisition
Exercise
• Problem: create an expert system that can detect anomalies in the
use of a credit card.
• Activities: 40 minutes
• Define the roles
• Define the problem (scope)
• Propose the solution
• Adquisition of data, knowledge engine, knowledge base, Interfaces,architecture?
• Rules IF-THEN?
• Prototype
• Plan of development
• Presentation: 10 minutes each team
And for very large knowledge bases?
• Why not the knowledge is adquired by the Computer by itself:
-> Machine Learning
Final project
• Definition of Topics for Final Project (20 minutes)
Paper for this week
• The expert system virtual ophthalmologist, Aynur Jabiyeva, 9th
International Conference on Theory and Application of Soft
Computing, Computing with Words and Perception, ICSCCW 2017,
24-25 August 2017, Budapest, Hungary
References
• A Review on Knowledge-based Expert System: Concept and Architecture, K P
Tripathi, Bharati Vidyapeeth Deemed University, Institute of Management,
Kolhapur, India.
• Fuzzy logic based systems in management and business applications, Animesh
kumar sharma, Badri Vishal Padamwar.
• Expert Systems and Applied Artificial Intelligence,
http://www.umsl.edu/~joshik/msis480/chapt11.htm
• Expert System in Real World Applications,
http://www.generation5.org/content/2005/Expert_System.asp