The document discusses expert systems and the programming language Prolog. It provides an overview of expert systems, how they work by analyzing information using rules, and examples like Dendral. It describes Prolog's history and use in developing expert systems. The document also covers forward and backward chaining in rule-based systems, an example dialog between a user and expert system, and advantages and disadvantages of expert systems.
2. EXPERT SYSTEMS
OVERVIEW
An experts system is a system that incorporates
concepts derived from experts in a field and uses
their knowledge to provide problem analysis
through programs available to clinical practitioners.
2
3. EXPERT SYSTEMS
IDEA OF EXPERT SYSTEMS
The most common form of expert system is
software made up of a set of rules that analyze
information.
3
4. EXPERT SYSTEMS
IDEA OF EXPERT SYSTEMS
INPUT
INPUT SYSTEM OUTPUT
KNOWLEDGE
KNOWLEDGE
Result BASE Feedback
BASE
4
5. EXPERT SYSTEMS
SOME PROMINENT EXPERT SYSTEMS
Dendral, analyses mass spectra
CADUCEUS, blood-borne infectious bacteria
R1/XCon, order processing
5
6. EXPERT SYSTEMS
SOME PROGRAMMING LANGUAGE
Prolog, programming language used in the development of
expert systems
CLIPS, programming language used as Prolog to develop
expert systems
Jess (Java Expert System Shell), A CLIPS engine
implemented in Java used to develop expert systems.
6
7. EXPERT SYSTEMS
CHAINING
There are two main methods of reasoning when
using inference rules:
Forward Chaining
Backward Chaining
7
8. EXPERT SYSTEMS
FORWARD CHAINING
Forward chaining starts with the data available and
uses the inference rules to conclude more data
until a desired goal is reached.
8
9. EXPERT SYSTEMS
FORWARD CHAINING
An inference engine using forward chaining
searches the inference rules until it finds one in
which the if-clause is known to be true. It then
concludes the then-clause and adds this
information to its data. It would continue to do this
until a goal is reached.
9
10. EXPERT SYSTEMS
FORWARD CHAINING
IF
IF TRUE
TRUE THEN
THEN
KNOWLEDGE ADD
CONCLUDE
BASE KNOWLEDGE
D
10
11. EXPERT SYSTEMS
BACKWARD CHAINING
Backward chaining starts with a list of goals and
works backwards to see if there is data which will
allow to it to conclude ant of these goals.
11
12. EXPERT SYSTEMS
BACKWARD CHAINING
An inference engine using backward chaining
would search the inference rules until it finds one
which has a then-clause that matched a desired
goal.
12
13. EXPERT SYSTEMS
BACKWARD CHAINING
Suppose a rule-based contains two rules:
1. If Fritz is green then Fritz is a frog.
2. If Fritz is a frog then Fritz hops.
13
14. EXPERT SYSTEMS
BACKWARD CHAINING
IF
IF
IF
IF FRITZ is Green THEN
THEN FRITZ is Frog
THEN
THEN
Knowledge
FRITZ is Frog
Frog is green.
Frog is green.
Frog hops.
Frog hops.
14
15. EXPERT SYSTEMS
END USER
Here is a dialog between end user and an expert
system:
15
16. EXPERT SYSTEMS
DIALOG:
Q. Do you know which restaurant you want to go to?
A. No
Q. Is there any kind of food you would particularly like?
A. No
Q. Do you like spicy food?
A. No
Q. Do you usually drink wine with meals?
A. Yes
Q. When you drink wine, is it French wine?
A. Yes
16
17. EXPERT SYSTEMS
RESULT:
A. I am trying to determine the type of restaurant to suggest.
So far Chinese is not a likely choice. It is possible that French
is a likely choice. I know that if the diner is a wine drinker, and
the preferred wine is French, then there is strong evidence
that the restaurant choice should include French.
17
18. PROLOG
HISTORY
The name Prolog was chosen by Philippe Roussel as an
abbreviation for "PROgrammation en LOGique” (French for
programming in logic).
It was created around 1972 by Alain Colmerauerr with
Philippe Roussell, based on Robert Kowalski's procedural
interpretation of Horn clauses.
18
20. PROLOG
Programming in Prolog
Prolog programs describe relations, defined by means of
clauses. Pure Prolog is restricted to Horn clauses, a Turing-
complete subset of first-order predicate logic. There are two
types of clauses: Facts and rules.
20
21. PROLOG
Programming in Prolog
An example of a fact is:
cat(tom).
which is equivalent to the rule:
cat(tom) :- true.
21
22. PROLOG
EVALUATION
Execution of a Prolog program is initiated by the user's
posting of a single goal, called the query. Logically, the
Prolog engine tries to find a resolution refutation of the
negated query. The resolution method used by Prolog is
called SLD resolution. If the negated query can be refuted, it
follows the query.
22
23. PROLOG
For example:
sibling(X, Y) :- parent_child(Z, X), parent_child(Z, Y).
parent_child(X, Y) :- father_child(X, Y).
parent_child(X, Y) :- mother_child(X, Y). mother_child(trude,
sally).
father_child(tom, sally).
father_child(tom, erica).
father_child(mike, tom).
This results in the following query being evaluated as true:
?- sibling(sally, erica). Yes
23
24. PROLOG
Related languages
Visual Prolog, also formerly known as PDC Prolog and
Turbo Prolog.
Datalog is actually a subset of Prolog.
In some ways Prolog is a subset of Planner. The ideas in
Planner were later further developed in the Scientific
Community Metaphor.
24
25. EXPERT SYSTEMS
ADVANTAGES
Provide consistent answers for repetitive decisions,
processes and tasks
Hold and maintain significant levels of information
Reduces creating entry barriers to competitors
Review transactions that human experts may overlook
25
26. EXPERT SYSTEMS
DISADVANTAGES
The lack of human common sense needed in some decision
makings
Domain experts not always being able to explain their logic and
reasoning
The lack of flexibility and ability to adapt to changing environments
as questions are standard and cannot be changed
Not being able to recognize when no answer is available
26