Dr. J. VijiPriya Expert System Lecture Notes Chapter 1,2,3,4&5 PDF
Dr. J. VijiPriya Expert System Lecture Notes Chapter 1,2,3,4&5 PDF
Institute of Technology
School of Informatics
Course Code: InTe 4392/InSy 3102
Course Tile: Expert System
Course Credit: 3
Instructor Name: Dr. J. VIJIPRIYA
1. Course Description:
The course will explains and explores essential concepts and methods of Expert Systems and their
design and development, and reviews expert knowledge-based problem-solving systems. It will
concentrate on an analysis of the architecture, knowledge and problem- solving style, their
classification and comparison. Topics covered includes: introduction to AI, definitions and historical
development of ES, methodology tools for analysis and design, survey of existing systems, inference
engines, and theory and applications of fuzzy relational products to new developments in inference
engines. In addition students will be introduced with the practical application of Expert Systems
technology using CLISP- expert system development language.
2. Course Goals or Learning Outcome:
After completing this course students will be able to:
comprehend and explain the main principles, components, and application areas for expert
systems
express methods for knowledge representation and reasoning in computers
demonstrate expert systems role in operations and strategy, and specify their strength and
limitations
understand the structure of expert systems
apply expert systems techniques for specific tasks implementation
design and develop expert systems using appropriate knowledge based software tools
3. Required Texts:
v Text Book
Joseph Giarratano, Gary Riley, Expert Systems: Principles and Programming (4th Edition),
Thomson Course Technology, 2004
CLIPS Users Guide
v Reference
Peter Jackson, Introduction to Expert Systems (3rd edition), Addison Wesley Longman,
Harlow, England, 1999
David S. Prerau, Developing and Managing Expert Systems,
John Durkin, Expert Systems: Catalog of Applications,
4. Assessment:
Tests/Quiz:
Project/Assignment:
Attendance
Quiz
Final examination:
(20%)
(10%)
(5%)
(15%)
(50%)
Introduction to AI
Definition of AI
State of the art
Intelligent agents. types, structure and environments
Problem types & its formulation
ES and AI
Introduction to Expert Systems
What is an Expert System?
Expert System: Principles, Elements, Characteristics
Advantages and Limitations of ES
Applications of ES
ES relationship with other programming
Knowledge definition
Knowledge Representation
Inference Methods
Probability
Inexact Reasoning
Stage in development of ES
Expert System
Chapter 1
Introduction to Artificial Intelligence
1.1
Definition of AI , AI Technologies
Definition of AI
-
Used to make computer that think and act like humans Intelligent rationally
(through the use of computer models)
Expert systems
Neural networks
Intelligent agents
Fuzzy logic
Genetic algorithms
Robotics
Speech understanding
Expert System
IBMs Deep Blue is the first computer program to defeat the world champion
in chess
3. Autonomous Control :
ALVINN computer vision system control the steering of vehicle
4. Diagnosis:
Medical diagnosis program based on probabilistic analysis have been able to
perform at the level of expert physician.
5. Logistics Planning:
Logistics planning and scheduling for transport
6. Robotics:
Many surgeons now use robot assistants in microsurgery
7. Language Understanding and Problem solving:
Computer program that solves crossword puzzles better than human beings
using constraints on possible word fillers, large database of past puzzles and a
variety of information sources including dictionaries and online database
An ideal rational agent always takes the action that maximizes its
performance given the percept sequence and its environment knowledge
Example 1:
A human agent has eyes, ears, and other organs for sensors, and hands, legs,
mouth, and other body parts for effectors.
Example 2:
A robotic agent substitutes cameras and infrared range finders for the sensors
and various motors for the effectors.
Example 3:
Software Agent
2
Prepared by Dr. J. VIJIPRIYA
Expert System
Actions
Effectors
Figure 1.1 Agents interact with environments through sensors and effectors
Vacuum-cleaner world
Agent Function
3
Prepared by Dr. J. VIJIPRIYA
Expert System
Percept Sequence
Action
[A, Clean]
Move Right
[A, Dirty]
Suck up to dirty
[B, Clean]
Left
[B. Dirty]
Suck up to dirty
Agent Program
Function Vacuum-gent (location, states) returns an action
If status = dirty then return suck
Else if location = A then return Right
Else if location=B then return Left
Rational agents
An agent should strive to "do the right thing", based on what it can perceive and the
actions it can perform. The right action is the one that will cause the agent to be
most successful
Rational Agent: For each possible percept sequence, a rational agent should select
an action that is expected to maximize its performance measure, given the evidence
provided by the percept sequence and whatever built-in knowledge the agent has.
Agents can perform actions in order to modify future percepts so as to obtain useful
information (information gathering, exploration)
4
Prepared by Dr. J. VIJIPRIYA
Expert System
Expert System
are generated. The relationship among agents, architectures, and programs can be summed
up as follows:
agent = architecture + program
Agent functions and programs
An agent is completely specified by the agent function mapping percept sequences
to actions.AI designs the agent program. The program runs on some kind of architecture.
To design an agent program, need to understand: Percepts, Actions, Goals and
Environment
Figure 1.2 shows the basic elements for a selection of agent types.
Agent Type
Percepts
Actions
Goals
Environment
Medical
diagnosis
Symptoms,
Questions, tests,
Healthy patient,
Patient, hospital
System
findings, patients
Treatments
minimize costs
Answers
Satellite image
Pixels of varying
Print a
Correct
Images from
analysis system
intensity, color
categorization of
Categorization
orbiting satellite
Scene
Part-picking
robot
Refinery
controller
Pixels of varying
Place parts in
Conveyor belt
Intensity
correct bins
with parts
Temperature,
Open, close
Maximize purity,
Refinery
pressure readings
valves; adjust
yield, safety
Temperature
Interactive
English
Tutor
Typed words
Print exercises,
Maximize
suggestions,
students score on
corrections
Test
Set of students
Expert System
1. Table Driven Agent: use a percept sequence/action table in memory to find the
next action. They are implemented by a lookup table.
2. Simple Reflex Agent: based on condition-action rule implemented with an
appropriate production system
3. Agent with Memory: Internal State-used to keep track of part states of the world.
4. Agent with Goals: In addition to state information, have goal information that
describes desirable situation (past state and future state of the world).
5. Utility-based Agents: based their decisions on classic axiomatic utility theory.
Environment types
Fully observable (vs. partially observable): An agent's sensors give it access to the
complete state of the environment at each point in time.
Episodic (vs. sequential): The agent's experience is divided into atomic "episodes"
(each episode consists of the agent perceiving and then performing a single action),
and the choice of action in each episode depends only on the episode itself.
Discrete (vs. continuous): A limited number of distinct, clearly defined percepts and
actions.
7
Prepared by Dr. J. VIJIPRIYA
Expert System
Fully observable
Deterministic
Episodic
Static
Discrete
Single agent
Chess with
Chess without
Taxi driving
a clock
Yes
Strategic
No
Semi
Yes
No
a clock
Yes
Strategic
No
Yes
Yes
No
No
No
No
No
No
No
The real world is (of course) partially observable, stochastic, sequential, dynamic,
continuous, multi-agent
2.
3.
search
4.
execute solution
Consider the vacuum cleaner world.
8
Prepared by Dr. J. VIJIPRIYA
Expert System
Imagine that our intelligent agent is a robot vacuum cleaner. Let's suppose that
the world has just two rooms. The robot can be in either room and there can be dirt in zero,
one, or two rooms.
Goal formulation: intuitively, we want all the dirt cleaned up. Formally, the goal is { state
7, state 8 }. Note that the { } notation indicates a set.
Problem formulation: After goal formulation, the agent must do problem formulation.
This means choosing a relevant set of states, operators for moving from one state to
another, the goal test function and the path cost function.
- The relevant set of states should include the current state, which is the initial
state, and (at least one!) goal state.
- The operators correspond to "imaginary" actions that the agent might take.
- The goal test function is a function which determines if a single state is a goal
state.
- The path cost is the sum of the cost of individual actions along a path from one
state to another.
In Vacuum cleaner , we already know what the set of all possible states is. The operators
are "move left", "move right", suck and "vacuum".
Choosing states and actions:
-
The secret of success for any intelligent agent is to choose state descriptions and
actions well. The keyword is abstraction.
- Abstraction means leaving out details about the world which are irrelevant such
as the scenery or how hungry the driver is in the case of driving from Hawassa
to Addis.
Measuring performance
With any intelligent agent, we want it to find a (good) solution based on the
interesting quantities are:
the search cost--how long the agent takes to come up with the
solution to the problem, and
The total cost of the solution is the sum of the above two quantities.
9
Prepared by Dr. J. VIJIPRIYA
Expert System
1.
2.
Types of problems:
Single state problems: state is always known with certainty.
Multi state problems: know in which states the agent might be, the regardless of what
but only if the carpet is already clean!. Now [right, vacuum, left, vacuum] is NOT a correct
plan.One room might be clean originally, but they become dirty. [right, vacuum, vacuum,
left, vacuum, vacuum] doesn't work either, and so on. There doesn't exist any FIXED plan
that always works. An agent for this environment MUST have a sensor and it must
combine decision-making, sensing, and execution. This is called interleaving.
4.
the robot knows how many rooms there are and what the effect of each available action is.
Suppose the robot is completely ignorant. Then it must take actions for the purpose of
acquiring knowledge about their effects, NOT just for their contribution towards achieving
a goal. This is called "exploration" and the agent must do learning about the environment.
Example Problems:
-
Toy problems:
o 8-puzzle
o 8-queen/n-queen
o vacuum world
Real World
o Traveling Salesperson
o robot navigation
o assembly sequencing
10
Prepared by Dr. J. VIJIPRIYA
Expert System
Expert Systems are computer programs that are derived from a branch of
computer science research called Artificial Intelligence (AI). AI's scientific goal is to
understand intelligence by building computer programs that exhibit intelligent behavior. It
is concerned with the concepts and methods of symbolic inference, or reasoning, by a
computer, and how the knowledge used to make those inferences will be represented inside
the machine.
The term intelligence covers many cognitive skills, including the ability to solve
problems, learn, and understand language; AI addresses all of those. But most progress to
date in AI has been made in the area of problem solving -- concepts and methods for
building programs that reason about problems rather than calculate a solution.
AI programs that achieve expert-level competence in solving problems in task
areas by bringing to bear a body of knowledge about specific tasks are called knowledgebased or expert systems. The term expert system is reserved for programs whose
knowledge base contains the knowledge used by human experts, in contrast to knowledge
gathered from textbooks or non-experts. The two terms, expert systems (ES) and
knowledge-based systems (KBS), are used synonymously. Taken together, they represent
the most widespread type of AI application. The area of human intellectual endeavor to be
captured in an expert system is called the task domain. Task refers to some goal-oriented,
problem-solving activity. Domain refers to the area within which the task is being
performed. Typical tasks are diagnosis, planning, scheduling, configuration and design. An
example of a task domain is aircraft crew scheduling.
Building an expert system is known as knowledge engineering and its practitioners
are called knowledge engineers. The knowledge engineer must make sure that the
computer has all the knowledge needed to solve a problem. The knowledge engineer must
choose one or more forms in which to represent the required knowledge as symbol patterns
in the memory of the computer -- that is, knowledge representation. He must also ensure
that the computer can use the knowledge efficiently by selecting from a handful of
reasoning methods.
11
Prepared by Dr. J. VIJIPRIYA
Expert System
Chapter 2
Expert System and Knowledge Representation
2.1
ES take their roots in Cognitive Science the study of human mind using
combination of AI and psychology.
Intelligence vs Expertise
Expertise and intelligence are not the same things (although they are related).
Expertise requires long time to learn (e.g. it takes 6 years to become a doctor).
1
Prepared by Dr. J. VIJIPRIYA
Expert System
The experts knowledge about solving specific problems is called the knowledge
domain.
Expert System
User interface
mechanism by which user and system communicate.
Language processor for friendly, problem-oriented communication
menus and graphics
3
Prepared by Dr. J. VIJIPRIYA
Expert System
Inference engine
makes inferences deciding which rules are satisfied and prioritizing.
The brain of the ES
The control structure (rule interpreter)
Provides methodology for reasoning
Agenda a prioritized list of rules created by the inference engine, whose patterns are
satisfied by facts or objects in working memory.
Knowledge acquisition facility automatic way for the user to enter knowledge in the
system bypassing the explicit coding by knowledge engineer.
Knowledge Base
includes the rules of the expert system
The knowledge base contains the knowledge necessary for understanding,
4
Prepared by Dr. J. VIJIPRIYA
Expert System
The User
Possible Classes of Users
Designing ES
Characteristics of Expert System
Expertise
Symbolic reasoning
o Represent knowledge symbolically
o Reformulate symbolic knowledge
Depth
o Handle difficult problem domains
o Use complex rules
Self-knowledge
o Examine its own Reasoning
o Explain its operation
Expert System
2.3 Applications of ES
Interpretation drawing highlevel conclusions based on data.
Prediction projecting probable outcomes.
Diagnosis determining the cause of malfunctions, disease, etc.
Design finding best configuration based on criteria.
Planning proposing a series of actions to achieve a goal.
Monitoring comparing observed behaviour to the expected behaviour.
Debugging and Repair prescribing and implementing remedies.
Instruction assisting students in learning.
Control governing the behaviour of a system.
When are expert systems useful?
Nature of the task
o Experts can do better than nonexperts
6
Prepared by Dr. J. VIJIPRIYA
Expert System
Expert System
ES Shell
Includes All Generic ES Components
But No Knowledge
8
Prepared by Dr. J. VIJIPRIYA
Expert System
Shells
Prog. Lang.
Higher
Less
KB maintenance
Easier
Difficult
Interfaces
Efficient /Performance
Slower
Faster
Explanation
9
Prepared by Dr. J. VIJIPRIYA
Expert System
Chapter 3
Knowledge Representation
3.1 Introduction - Knowledge Representation
Definition: Knowledge-representation is the field of artificial intelligence that
focuses on designing computer representations that capture information about the
world that can be used to solve complex problems such as diagnosing a medical
condition
Knowledge and Representation are two distinct entities. They play central but
distinguishable roles in intelligent system.
- Knowledge is a description of the world. It determines a system's
competence by what it knows
- Representation is the way knowledge is encoded. It defines a system's
performance in doing something
- Knowledge is a progression that starts with data which is of limited utility.
1. Data is viewed as collection of disconnected facts
Example: It is raining
2. By organizing or analyzing the data, we understand what the data
means, and this becomes information. It provides answers to "who",
"what", "where", and "when".
Example: The temperature dropped 15 degrees and then it started
raining
3. The interpretation or evaluation of information yield knowledge. It
provides answers as "how".
Example: If the humidity is very high and the temperature drops
substantially, then atmospheres is unlikely to hold the moisture, so it
rains
4. An understanding of the principles embodied within the knowledge is
wisdom. It provides answers as "why".
1
Prepared by Dr. J. VIJIPRIYA
Expert System
Explicit knowledge
it is embodied.
it is embedded.
2.
3.
Expert System
subjective insight
- Concepts: are classes of items, words, or ideas that are known by a common
name and share common features.
- Processes: are flows of events or activities that describe how things work rather
than how to do things. Procedures: are series of step-by-step actions and
decisions that result in the achievement of a task.
- Principles :are guidelines, rules, and parameters that govern; principles allow to
make predictions and draw implications;
A good knowledge representation enables fast and accurate access to knowledge
and understanding of the content
3.2 Knowledge Representation Methods
Knowledge is represented by Production Rules, Semantic Net, Frames and Logic
Production Rules or Production System:
Rules are used to represent relationships. Rule-based knowledge representation
employs
IF condition (premise or consequent)
THEN action (goal or antecedent) statements.
For example,
IF the heating element glows AND the bread is always dark
THEN the toaster thermostat is broken
When the problem situation matches th IF part of a rule, the action specified by the
THEN part of the rule is performed
3
Prepared by Dr. J. VIJIPRIYA
Expert System
Production rules are one of the most popular and widely used knowledge
representation languages
Production rule system consists of three components
o working memory contains the information that the system has gained about
the problem thus far.
o rule base contains information that applies to all the problems that the
system may be asked to solve.
o interpreter solves the control problem, i.e., decide which rule to execute on
each selection-execute cycle.
Used both for KR and Problem solving system
Advantages of Production System:
o Naturalness of expression
o Modularity
o Restricted syntax
o Ability to Represent Uncertain Knowledge
Disadvantages of Production System:
o Inefficient
o Less expressive
3.3 Semantic Net
It is formalism/mechanism for representing information /Knowledge about
objects, people, concepts and specific relationship between them.
The syntax of semantic net is simple. It is a network of labeled nodes and links.
- Its a directed graph with nodes corresponding to concepts, facts, objects etc.
and arcs showing relation or association between two concepts.
The commonly used links in semantic net are of the following types.
- isa subclass of entity (e.g., child hospital is subclass of hospital)
- inst particular instance of a class (e.g., India is an instance of country)
- prop property link (e.g., property of dog is bark)
4
Prepared by Dr. J. VIJIPRIYA
Expert System
Every human, animal and bird is living thing who breathe and eat. All birds can fly.
All man and woman are humans who have two legs. Cat is an animal and has a fur. All
animals have skin and can move. Giraffe is an animal who is tall and has long legs. Parrot
is a bird and is green in color
Inheritance in Semantic Net
- Inheritance mechanism allows knowledge to be stored at the highest possible level of
abstraction which reduces the size of knowledge base.
It facilitates inference of information associated with semantic nets.
It is a natural tool for representing taxonomically structured information and
ensures that all the members and sub-concepts of a concept share common
properties.
It also helps us to maintain the consistency of the knowledge base by adding new
concepts and members of existing ones.
- Properties attached to a particular object (class) are to be inherited by all subclasses and
members of that class.
Semantic Net
breathe, eat
Living_thing
prop
isa
isa
two legs
isa
Human
isa
fly
Animal
isa
Bird
inst
isa
inst
prop green
Man
Woman
Giraffe
Cat
prop
prop
inst
john
Parrot
prop
fur
skin, move
Expert System
Instance facts
Property facts
isa(living_thing, nil).
inst(john, man).
prop(breathe, living_thing).
isa(human, living_thing).
inst(giraffe, animal).
prop(eat, living_thing).
isa(animals, living_thing).
inst(parrot, bird)
prop(two_legs, human).
isa(birds, living_thing).
prop(skin, animal).
isa(man, human ).
prop(move, animal).
isa(woman, human).
prop(fur, bird).
isa(cat, animal).
prop(tall, giraffe).
prop(long_legs, giraffe).
prop(tall, animal).
prop(green, parrot).
Queries
Expert System
7
Prepared by Dr. J. VIJIPRIYA
Expert System
Book Frame
Slot Filler
Title
Year
2003
8
Prepared by Dr. J. VIJIPRIYA
Expert System
Disadvantages
9
Prepared by Dr. J. VIJIPRIYA
Expert System
3.5 Logic
Logic is studied as Knowledge Representation language in Artificial Intelligence
Logic is a language for reasoning, a collection of rules used while doing logical
reasoning
Logic is concerned with the truth of statements about the world.
Generally each statement is either TRUE or FALSE.
Logic includes: Syntax, Semantics and Inference Procedure.
Syntax :
Specifies the symbols in the language about how they can be combined to form
sentences. The facts about the world are represented as sentences in logic.
Semantic :
Specifies how to assign a truth value to a sentence based on its meaning in the
world. It Specifies what facts a sentence refers to. A fact is a claim about the world,
and it may be TRUE or FALSE.
Inference Procedure :
Specifies methods for computing new sentences from the existing sentences.
Note
Facts : are claims about the world that are True or False.
Representation : is an expression (sentence), stands for the objects and relations.
Sentence s : can be encoded in a computer program.
Expert System
Logic defines ways of putting symbols together so that user can define legal
11
Prepared by Dr. J. VIJIPRIYA
Expert System
properties that are derived from the methods of combining or altering statements.
Statement, Variables and Symbols
These and few more related terms, such as, connective, truth value,
contingencies,
Symbols
assertion
negation
conjunction
disjunction
implication
P
p is true"
p ~ ! NOT "p is false"
p q && & AND
"both p and q are true"
P v q || | OR
"either p is true, or q is true, or both "
pq
if ..then "if p is true, then q is true"
" p implies q "
equivalence
Read as
12
Expert System
The propositions and connectives are the basic elements of propositional logic.
Tautologies
A proposition that is always true is called a "tautology".
e.g., (P v P) is always true regardless of the truth value of the proposition P.
Contradictions
Contingencies
A proposition is called a "contingency", if that proposition is neither a tautology
nor a contradiction .
e.g., (P v Q) is a contingency.
Antecedent, Consequent
These two are parts of conditional statements.
In the conditional statements, p q , the
1st statement or "if - clause" (here p) is called antecedent , 2nd statement or
"then - clause" (here q) is called consequent.
Argument
An argument is a demonstration or a proof of some statement.
sentences (or
other propositions.
13
Prepared by Dr. J. VIJIPRIYA
Expert System
Take all the premises, conjoin them, and make that conjunction the antecedent of a
"if and only if" their truth table columns are identical;
"if and only if"
tautology.
Note: The truth tables are adequate to test validity, tautology, contradiction, contingency,
consistency, and equivalence.
14
Prepared by Dr. J. VIJIPRIYA
Expert System
Chapter 4
Inference Methods and Reasoning
4.1 Predicate Logic (First Order Logic)
Predicate Logic allows more flexible and compact representation of knowledge.
FOL assumes that world contains
Objects: people, houses, numbers, colors, wares
Relations: brother of , bigger than, inside, part of
Properties: red, round, long, short,,,
Functions: father of, best friend, one more than
Example
One Plus Two Equals Three
Objects: One, Two, Three, One Plus Two
Relations: Equals
Functions: Plus
Predicate :
Every complete "sentence" contains two parts: a "subject" and a "predicate".
The subject is what (or whom) the sentence is about.
The predicate tells something about the subject;
Example :
A sentence "Judy {runs}".
The subject is Judy and the predicate is runs .
Predicate, always includes verb, tells something about the subject.
Predicate is a verb phrase template that describes a property of
objects, or a relation among objects represented by the variables.
1
Prepared by Dr. J. VIJIPRIYA
Expert System
AtomicSentence
| Sentence Connective Sentence
| Quantifier Var,,,,,Sentence
| Sentence
| (Sentence)
AtomicSentence
Term
Function( Term,,,)
| Constant
| Variable
Connective
=> | | L |
Quantifier
$ | "
Constant
A | 1 | 3 | John | Riad,,,,
Variable
a|b|c| x|y|z
Predicate
Function
2
Prepared by Dr. J. VIJIPRIYA
Expert System
Expert System
Eg:
Sold(John,car,Fred) => Own(Fred, Car)
Own(Jothn,Car) Own(Fred,Car)
Quantifiers:
Allows statements about entire collection of objects rather than having to
"x x P
where
P(x)is predicate tells x has wheels
X is variable of object car
Eg:
Someone loves you
$x
is written as $x, P
where
P(x) is predicate tells x loves you
X is variable of object someone
4
Prepared by Dr. J. VIJIPRIYA
Expert System
Functions
4.2 Inference Rule
Proofs in Mathematics are valid arguments that establish truth of the mathematical
statements. Argument is the sequence of statements that ends with conclusion. Rules of
inference are template for building argument.
5
Prepared by Dr. J. VIJIPRIYA
Expert System
4.3 Chaining
Simple methods used by most inference engines to produce a line of reasoning
Forward chaining: the engine begins with the initial content of the workspace and
proceeds toward a final conclusion
Backward chaining: the engine starts with a goal and finds knowledge to support
that goal
Forward Chaining
Data driven reasoning
o bottom up
o Search from facts to valid conclusions
Given database of true facts
o Apply all rules that match facts in database
o Add conclusions to database
o Repeat until a goal is reached, OR repeat until no new facts added
Example
Suppose we have three rules:
R1: If A and B then D
R2: If B then C
R3: If C and D then E
If facts A and B are present, we infer D from R1 and infer C from R2. With D and C
inferred, we now infer E from R3.
6
Prepared by Dr. J. VIJIPRIYA
Expert System
o Otherwise, find a rule which can be used to conclude G, and try to prove
each of that rules conditions.
Example
The same three rules:
R1: If A and B then D
R2: If B then C
R3: If C and D then E
If E is known, then R3 implies C and D are true. R2 thus implies B is true (from C) and
R1 implies A and B are true (from D).
Example
7
Prepared by Dr. J. VIJIPRIYA
Expert System
start with set of hypotheses and try to prove each one, asking
additional questions of user when fact is unknown.
4.4 Resolution
Resolution is a procedure used in proving that arguments which are expressible in
predicate logic are correct.
It produces proofs by refutation or contradiction
Resolution leads to refute a theorem-proving technique for sentences in
propositional logic and first-order logic
Resolution is a rule of inference
Resolution is a computerized theorem prover
Resolution is only defined for propositional logic. The strategy is that the resolution
techniques of propositional logic can be adapted in predicate logic
Expert System
Objective
be familiar with various sources of uncertainty and imprecision in knowledge
representation and reasoning
understand the main approaches to dealing with uncertainty
o
probability theory
Bayesian networks
Dempster-Shafer theory
heuristics
o
empirical associations
o
experiential reasoning
probabilities
o
Expert System
reproducibility
o
expressiveness
o
comprehensibility
o
representation of uncertainty
correctness
o
probabilities
adherence to the formal aspects of probability theory
relevance ranking
probabilities dont add up to 1, but the most likely result is
sufficient
computational complexity
o
Sources of Uncertainty
data
o
expert knowledge
o
plausibility
best guess of experts
10
Prepared by Dr. J. VIJIPRIYA
Expert System
quality
causal knowledge
deep understanding
statistical associations
observations
scope
o
knowledge representation
o
inference process
o
deductive
inductive
o
errors
o
domain errors
representation errors
likelihood of evidence
o
Expert System
conflict resolution
o
subsumption
one rule is a more general version of another one
redundancy
missing rules
data fusion
integration of data from multiple sources
for mutually exclusive events, the probability for at least one of them is
the sum of their individual probabilities
experimental probability
based on the frequency of events
subjective probability
12
Prepared by Dr. J. VIJIPRIYA
Expert System
Conditional Probabilities
conditional probability
of event A given that event B has already occurred P(A|B) = P(A B) / P(B)
Advantages and Problems: Probabilities
advantages
o
formal foundation
problems
o
may be inappropriate
the future is not always similar to the past
inexact or incorrect
especially for subjective probabilities
ignorance
probabilities must be assigned even if no information is available
assigns an equal amount of probability to all such items
non-local reasoning
13
Prepared by Dr. J. VIJIPRIYA
Expert System
no compositionality
complex statements with conditional dependencies can not be
decomposed into independent parts
Expert System
15
Prepared by Dr. J. VIJIPRIYA
Expert System
Chapter 5
Expert System Design
5.1 Creating an expert system
The steps in a typical expert systems analysis and design methodology are summarized in
Figure .
1
Prepared by Dr. J. VIJIPRIYA
Expert System
The first step in the identification phase, Identify problem, is similar to the
problem definition phase in the traditional systems development life cycle. The objective is
to identify, characterize, and define the problems the system will be expected to solve and
then partition the problem into appropriate sub-tasks.
Once the problem is defined, the resources necessary for acquiring knowledge,
implementing the system, and testing the system are identified. Typical resources include
knowledge, time, computing facilities, and money. Because expert systems are expensive
and creating one takes considerable time, a feasibility study is often conducted before
work progresses beyond this point.
In addition to identifying resources, the expert system analysts and/or designers
also identify the systems goals and objectives. It is helpful to identify and explicitly
document the goals because certain design approaches, such as heuristic search, breadth
search, depth search, and reasoning are goal-driven.
2. Conceptualization phase
The central task of the conceptualization phase is to diagram the systems key
concepts and relations to define a conceptual base for a prototype system. Key objectives
include separating the inference engine from the problem domain, factoring (analyzing)
the problem into meta-problems, identifying the systems key concepts and relations, and
testing those concepts and relations by challenging them (with specific examples of
problem-solving activities) to ensure that they cover every general case. Many of the tools
and techniques are used in this phase.
3. Formalization Phase
The formalization phase involves mapping key concepts, sub-problems, and
information flow characteristics isolated during conceptualization into more formal
representations based on various knowledge engineering and problem solving tools and
knowledge representation frame-works. The key objectives are to identify the solution
space (a domain with a collection of all possible solutions), the hypothesis space (the
hypothetical solution space), the underlying model, and the characteristics of the data.
To define the structure of the hypothesis space, the systems analysts or designers
2
Prepared by Dr. J. VIJIPRIYA
Expert System
must formalize the concepts (knowledge in an abstract format that can be used to guide a
searching or reasoning process) and determine how they are joined to form a hypothesis.
The concepts provide clues about the nature of the space such as if it is finite, if a
hierarchy must to be considered, if certain levels of abstraction can be applied, and if a
specific class of the concept must be generated. Such searching techniques as blind search,
heuristic search, and abstracting the solution space are often used. Reasoning techniques
such as assumption building, justification building, and the constraints and goal technique
help to identify the underlying model of the process used to generate solutions in the
domain.
4. System design phase
During the system design phase (sometimes called the logical design phase) the
analyst and/or designer specifies how the system will meet the requirements identified
during the previous three phases. Typically, the reports and other outputs the systems must
produce are defined first. This phase is similar to the design stage in the traditional systems
development life cycle. Note, however, that the representation schemes used to describe
knowledge differ from traditional methodologies.
Using the knowledge you have acquired and the tool you have selected, you can
now begin the design of the expert system. First, you will need to create an outline, a
hierarchal flow chart, a matrix, decision table, or other format that will help you organize
and understand the knowledge. Using these aids, you will convert the knowledge in to IFTHEN rules. It is best to follow the specific procedures recommended by the software tool
you are using. Once the basic design is complete, you can begin using the tool to create a
prototype of one segment of the system. Translate a portion of the knowledge into rules
and test the newly created segment. Test the concept before going ahead with the entire
program.
5. System development phase
A prototype expert system is created during the system development (or physical
design) stage. This stage is similar to the development stage in the traditional system
development life cycle.
3
Prepared by Dr. J. VIJIPRIYA
Expert System
Once you have satisfied yourself that the system is going to work satisfactorily, now you
can begin to expand the prototype into the final system.
The best way to go about this is to expand the prototype one segment at a time.
6. Testing and evaluation phase
During this phase, the prototype system is evaluated. This phase parallels the
testing stage in the traditional system development life cycle. However, in addition to the
testing tools and techniques, expert systems utilize a dynamic testing technique to verify
the reasoning and/or inference process.
After the expert system has been developed, you will need to spend some time to
testing and debugging it. No expert system will be perfect the first time, and a considerable
amount of work will be required to validate it.
User feedback will show you where to make final changes, corrections, and additions to
achieve the desired performance.
7. Prototype revision phase
An expert system evolves over time, calling for almost constant revision, a trait
expert systems share with most prototypes. Based on the results of the testing/evaluation
phase, concepts and relations are refined, the solution space, the model, the data
characteristics are re-formalized, and the system is redesigned.
8. Maintain the System
An important part of expert system development is ongoing maintenance, updating
the system with new knowledge, removing knowledge that is no longer applicable, and
otherwise fine tuning the system to keep it fully current and applicable to the problem.
5.2 Software
LISP (list programming language) and PROLOG (programming logic language)
are popular expert system programming languages. Variations include common LISP,
Franz LISP, CProlog, Knowledge Workbench, Quintus Prolog, Prolog-2, Arity Prolog,
UNSW Prolog, and Turbo Prolog.
Popular
systems
building
products
include
Expert-Ease,
ADVISE,
4
Prepared by Dr. J. VIJIPRIYA
Expert System
RULEMASTER, SEEK, and RULE WRITER. Other relevant products include KEE,
KMS, RLL, SRL, SRL+ (frame-based), APES and HSRL (logic based), ROSS,
SMALLTALK, and KBS (object oriented), INTERLISP and PSL (procedure-oriented),
and ARS, ART, EXPERT, EXPERT-II, OPS5, RITA, and ROSIE (rule-based).
CLIPS is a productive development and delivery expert system tool which provides
a complete environment for the construction of rule and/or object based expert
systems. Created in 1985, CLIPS is now widely used throughout the government, industry,
and academia. Its key features are:
Portability: CLIPS is written in C for portability and speed and has been installed
on many different operating systems without code changes. Operating systems on
which CLIPS has been tested include Windows XP, MacOS X, and Unix. CLIPS
can be ported to any system which has an ANSI compliant C or C++ compiler.
CLIPS comes with all source code which can be modified or tailored to meet a
user's specific needs.
Expert System
integrated editors, and multiple windows have been developed for the MacOS,
Windows XP, and X Window environments.
Expert System
The Development team, acquires, analyzes, models, and implements the proposed
expert systems according to the standards specified by the methodology team, using the
developed tools.
Requirements
Specification
Development
Team
Design
Verification
report
Training &
Evaluation
Team
Validation
report
Evaluation
report
Implementation
The Training and Evaluation team, takes the responsibility of expert systems verification, validation,
and evaluation, in addition to organizing training courses for end users on the developed expert
Systems
The actual expert system life cycle runs between the development team, and the training & evaluation
team. As illustrated in Figure the
Requirements specification
report, the design report, and the first implemented version of the expert
system. The training & evaluation team takes this output and generates three reports: verification
report, validation
the requirements specification report and the design report, and between the design report and the
Implemented system.
behavior and the behavior expected by domain experts. Evaluation report includes comments given
by domain experts other than those who participated in knowledge acquisition, to certify that the
system is accepted from their point of view.
The produced reports by the testing & evaluation team are forwarded to the development
team who analyzes these reports, and starts new cycle based on the comments documented in these
reports.
Expert System
Components of CLIPS
1.Rule-based language
can create a fact list
can create a rule set
an inference engine matches facts against rules
Expert System
----------------
Shapes
9
Prepared by Dr. J. VIJIPRIYA
Expert System
memory
o rules for which facts can be found are satisfied
o the combination of a rule with the facts that satisfy it is used to form
activation records
one of the activation records is selected for execution
10
Prepared by Dr. J. VIJIPRIYA