introduction to expert systems dr. salah gad foda 2001
TRANSCRIPT
Introduction to Expert Systems
Dr. Salah Gad Foda
2001
Introduction:
There has been a tremendous development in the field of expert
systems, also known as knowledge-based systems, for the
past few decades. Expert systems development tools or
shells are now standard inclusion of computer software
packages. Applications for expert systems do abound in
various areas such as economics, tax preparation and
planning, operations research, management, medical
diagnosis, mining, food industry, computers design, and
engineering applications; to mention only a few.Expert Systems
Definition of Artificial Intelligence:
AI is the study and creation of machines that exhibit humanlike qualities, including the ability to reason.
Subfields of AI: Natural language processing Robotics Perceptive systems (e.g. vision) Expert systems Artificial neural networks Intelligent software (“ordinary” software with embedded
AI features such as grammar checkers).
Expert Systems
What is an expert system?
An expert system may be defined as a computer program that
models and exhibits, within a specific domain, a degree of
expertise in problem solving that is comparable to that of a
human expert. It should, however, be emphasized that one
can develop expert systems and derive conclusions from them
through a strictly manual process. Thus, the essence of an
expert system is constituted of the formation of a model of
knowledge base.
Expert Systems
In short, an expert system is a program that seeks to capture expertise in limited domains of knowledge and experience and to apply this expertise to solving problems.
Building an expert system involves the following: knowledge engineer extracts knowledge from experts develops expert system using highly iterative process
(because experts often can not, or sometimes do not, describe what they do know)
helpful user interface facility for the user to question the program learning from experience and an ability to give a reasoned
explanation for conclusions that have been reached.
Expert Systems
Structure of an Expert System:
Expert Systems
Knowledge engineers are those who develop and implement
expert systems solution for appropriate engineering
applications. Thus, the primary role of an expert engineer is to
acquire and represent, in the form of knowledge base, the
rules employed by a human expert in the solution of a
particular problem. More precisely, Knowledge engineers
develop models for knowledge bases. Once this has been
done, knowledge engineers will select an expert system
software package to perform the inference process. Inference
is simply the derivation of conclusions for the given problem.
Expert Systems
What can expert systems do?
There are several features that distinguish problems suitable for tackling with expert systems:
Experts in the field perform measurably better than non-experts. Picking lottery numbers would not be a good problem domain; choosing winning horses would.
Expertise in the field is not common. If there are lots of experts, there's probably no point in building a system to emulate them.
The problem has a small, well-defined knowledge domain. The knowledge of the expert is stable. Rapidly changing fields, such
as fashion design, are not suitable. The knowledge in the domain is at least partially heuristic. Problem attributes are symbolic rather than numeric Knowledge base is transparent and visible There is a need to cope with uncertainty in solving the problem. Analytical solutions are precluded by combinatorial explosion
Expert Systems
What tasks can expert systems perform?
Expert Systems
Design Configuring objects under constraints. Typical applications: computer configuration, architectural design.
Diagnosis System infers malfunctions from observations. Typical applications: medical, electronics.
Debugging System suggests remedies for malfunctions. Typical applications: not common.
Planning System designs future actions. Typical applications: scheduling, routing, agent behavior.
Expert Systems
Control System interprets, predicts, diagnosis, remedies and monitors execution, often in real time. Typical applications: air traffic control.
Repair System develops and carries out plans to administer remedies. Typical applications: aerospace, automotive.
Monitoring System compares observations to features crucial to outcomes. Typical applications: statistical process control, financial systems, nuclear power plants.
Interpretation System infers situation descriptions from observations. Typical applications: surveillance, speech understanding, image analysis, chemical structure determination.
What are the advantages of using expert systems?
Permanence - An expert system never forgets (which is why they are best for static domains)
Reproducibility - much easier to copy than human experts Efficiency - expert systems are cheap to use and can spread
development costs over many users Consistency - an expert system will give the same answer to the same
problem every time (human experts are often influenced by more recent information)
Documentation - most expert systems can offer a detailed hard copy of the decision-making process employed to reach a conclusion
Completeness - an expert system will always consider all relevant information, every time
Speed - on large, complex problems, the speed of an expert system can be many times that of a human expert
Breadth - an expert system can capture the knowledge and experience of more than one expert (although this can lead to conflicts)
Expert Systems
What are the disadvantages of using expert systems?
Stupidity - Expert systems are substantially less idiot-tolerant than human experts. You put garbage in, you get garbage out. "Common sense" is extremely hard to put into an expert system.
Creativity - None. If a solution is not in the bounds of the system, it will not be selected.
Learning - Very few expert systems learn, and none do without substantial feedback on previous results. Learning is largely the domain of Case Based Reasoning (CBR) and Artificial Neural Network systems (ANNs).
Domain bounds - If the problem is outside the intended domain, solution impossible.
Expert Systems
Expert Systems Tools
Free Expert Systems Tools Programming Languages
Freeware expert systems tools?
CLIPS (C Language Integrated Production System)
Description: A forward-chaining rule-based tool written in C by NASA. It can be easily embedded in other applications and includes an object-oriented language called COOL.
Platforms: DOS, Windows, VMS, Mac, and UNIX. Source: The latest version is available from the
CMU AI Repository or Nortwestern University. Reference: Additional information is available at
http://www.tnt.uni-hannover.de/data/www/soft/case/lang/clips/ Contact: For problems with usage or installation of CLIPS
contact NASA's Client/Server Systems Branch Help Desk.
Expert Systems
DynaCLIPS (Dynamic CLIPS Utilities)
Description: A number of tools are available to be linked with
CLIPS. DYNACLIPS is a set of blackboard, dynamic knowledge exchange, and agent tools implemented as a set of libraries that can be linked with CLIPS.
Platforms: Same as CLIPS. Source: The latest version is available from the CMU AI
Repository. Reference: Additional information is available from the CMU AI
Repository.
Contact: [email protected]
Expert Systems
FuzzyCLIPS Description: This version of CLIPS provides handling of fuzzy
concepts and reasoning, in addition to the other CLIPS features.
Platforms: Same as CLIPS. Source: The latest version is available from the National
Research Council of Canada. Reference: Additional information is available from the
National Research Council of Canada. Contact: mailto:%[email protected]
Expert Systems
BABYLON Description: This is a modular, configurable, hybrid
environment for developing expert systems. It provides the following knowledge representation formalisms: frames, rules, logic (Prolog) and constraints. It requires Common Lisp.
Platforms: Mac, and UNIX. Source: The latest version is available from
ftp://ftp.gmd.de:/gmd/ai-research/Software/Babylon/ Reference: Additional information is available from
ftp://ftp.gmd.de:/gmd/ai-research/Software/Babylon/README
Expert Systems
ES Description:The ES Expert system development tool supports
backward/forward chaining, and fuzzy set relations. Platforms: PC. Source: The latest version is available from
ftp://ftp.uu.net/pub/ai/expert-sys/summers.tar.Z. Reference: For additional information see the
October/November 1990 issue of BYTE.
Expert Systems
GEST (Generic Expert System Tool)
Description: This shell can be used in a variety of problem domains and supports backward and forward chaining. Its knowledge representation schemes include frames, rules and procedures. Support is also present for fuzzy logic and certainty factor maintenance. It includes a blackboard architecture. The user interface utilizes the Symbolics windowing system and is menu and mouse driven.
Platforms: Symbolics Lisp Machines, Genera 7.2. Source: N/A. Contact: [email protected].
Expert Systems
Languages optimized for expert systems and AI:
Prolog Prolog is a language of facts, relations and rules. Facts are things
like raining or umbrella. Relations express relationships between facts, for example is-carrying(john,umbrella) might be used to express the concept that John is carrying an umbrella. Prolog rules express inferences that can be made from facts.
Thus the rule armed(X):- is_carrying(X,gun). Note the :- construction, which loosely means 'IF', and the use of a variable, X (all Prolog variables begin with upper case to distinguish them from facts, which begin with lower case). Translated, this rule means "IF x is carrying a gun, THEN x is armed".
Prolog works by backward chaining, and can express complex logical problems with very few rules (but can't easily operate as a procedural language).
Expert Systems
LISP LISP is a list processing language. Everything in lisp is treated as a list of
symbols. Even the program itself is a list. There's a free evaluation version of Common LISP.
Scheme Scheme is a statically scoped and properly tail-recursive dialect of the Lisp
programming language invented by Guy Lewis Steele Jr. and Gerald Jay Sussman. It was designed to have an exceptionally clear and simple semantics and few different ways to form expressions. A wide variety of programming paradigms, including imperative, functional, and message passing styles, find convenient expression in Scheme.
KEE KEE is the basis upon which Kappa-PC was built.
Smalltalk There is a version called Dolphin Smalltalk which comes with online tutorial
and help, but is restricted as it is a cut-down commercial product.
Expert Systems
Problem Solving
Searching Techniques Game Theory Prepositional Logic
Searching for Solutions:
DefinitionsProblem: A goal and a set of means to achieve the defined goal is
called a problem.
Search: The process of exploring different possible sequences to reach the “best” sequence to meet the goal is called a search.
Search Cost: Search cost is usually defined in terms of computational time and memory required to reach a solution.
In general a search strategy is measured according to the following criteria:
Completeness – guarantees of solutions? Time complexity – computational cost? Space complexity – memory cost? Optimality – best sequence if different sequences exist?
Expert Systems
Search Trees:
Nodes – (a,b,c,…,g) Root – (a) Leaves – (d,e,f,g)
Expert Systems
a
f
edc
b
g
Search Complexity:
Complexity Theory is concerned with tractability or intractability of computational sequences.
P Problems – All deterministic search sequences with O(nk) execution steps are called polynomial or P problems.
NP Problems – Class of nondeterministic search algorithms with polynomial complexity.
NP-hard Problems – Class of search algorithms whose complexities grow exponentially with size of their input, e.g. O(2n), O(n3 2n), etc.
Examples:Simple search has O(n) complexity.
Binary search has O(log2 n) complexity.
Matrix multiplication has O(n3) complexity. Expert Systems
Search Strategies:
Breadth-First Search – Nodes at depth d in the search tree are expanded before nodes at depth d+1.
Depth-First Search – Start with deepest level node expansion till hitting a dead end then go back and expand nodes at a shallower level.
Heuristic Search – Hill climbing is a good example where next step is determined with an evaluation
function.
Expert Systems
Coin Example:
Expert Systems
Table: Coin Attributes
Expert Systems
Coin Color Shape Size
1 Dinar Gold Circle 2.4cm
1 Dinar Gold Hexagon 3.1cm
½ Dinar Gold Hexagon 2.8cm
½ Dinar Silver & Gold Hexagon 2.8cm
¼ Dinar Gold Hexagon 2.6cm
10 Piasters Silver Circle 2.7cm
5 Piasters Silver Circle 2.5cm
2.5 Piasters Silver Circle 2.1cm
1 Piaster Bronzy Circle 2.4cm
Decision Trees:
No use for shape attribute in some parts of the tree.Expert Systems
2.6cm2.8cm
Circle
2.4cm
CircleHexagonHexagon
2.8cm2.4cm
Circle
Gold
Bronzy Gold & Silver
Silver
Hexagon
Circle
3.1cm
2.1cm 2.5cm
2.7cm
ColorColor
ShapeShape
SizeSize
½ D½ D1 P1 P
2.5 p2.5 p5 p5 p 10 p10 p
1 D1 D
SizeSize
¼ D¼ D ½ D½ D 1 D1 D
ShapeShape ShapeShape
SizeSizeSizeSize
ShapeShape
????
SizeSize
P=PIASTERSD=DINAR
Size attribute is not so effective in some areas of decision tree.
Expert Systems
2.8cm2.4cm
Gold
Bronzy Gold & Silver
Silver
HexagonCircle
2.6cm 2.8cm 3.1cm
2.1cm 2.5cm
2.7cm
ColorColor
ShapeShapeSizeSize
½ D½ D1 P1 P
2.5 p2.5 p5 p5 p 10 p10 p
1 D1 DSizeSize
¼ D¼ D ½ D½ D 1 D1 D
SizeSizeSizeSize
P=PIASTERSD=DINAR
Final decision tree.
Expert Systems
Gold
Bronzy Gold & Silver
Silver
HexagonCircle
2.6cm 2.8cm 3.1cm
2.1cm 2.5cm
2.7cm
ColorColor
ShapeShape SizeSize½ D½ D1 P1 P
2.5 p2.5 p 5 p5 p 10 p10 p
1 D1 DSizeSize
¼ D¼ D ½ D½ D 1 D1 DP=PIASTERS
D=DINAR
Decision Rules:
Based on this tree we can create the following rules:
IF (Color is bronzy) THEN (Coin is 1 Piaster) IF (Color is gold AND silver) THEN (Coin is ½ Dinar) IF (Color is silver) AND (Size is 2.1 cm) THEN (Coin is 2.5
Piasters) IF (Color is gold) AND (Shape is Hexagon) AND (Size is 2.8)
THEN (Coin is 1 Dinar)
And so on.
Expert Systems
Two-Person Games:
A game can be defined as a search problem with the following components:
Initial state which includes initial sequences and who moves first
Operators which define legal sequences a player may make
Terminal state which determines when game or search is over
Payoff function which gives a numeric value for each outcome of a sequence or a move
Expert Systems
Expert SystemsTic-Tac-Toe game
X
X X XO
OO etc
X
XX
X
X
XO
OO
OOOO
OO X
X
X X
X
X
O
OO
X
XO
etc
Payoff = 1Payoff = 1 Payoff = 0
X
…