Expert System Shells, Languages and Tools - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Expert System Shells, Languages and Tools

Description:

A survey by Touche Ross in 1992 found that - 42% used shells ... resp(simon,acute). A sample question: Do any male patients have an acute respiratory condition ? ... – PowerPoint PPT presentation

Number of Views:264
Avg rating:3.0/5.0
Slides: 27
Provided by: simons4
Category:

less

Transcript and Presenter's Notes

Title: Expert System Shells, Languages and Tools


1
Expert System Shells, Languages and Tools
  • A Knowledge Engineer has a range of tools
    available -
  • K.A. tools (not covered here)
  • K.B.S. shells (Crystal, Esta)
  • K.B.S. environments
  • (Aion DS, Kee, Art, Goldworks)
  • A.I. Languages (Prolog, Lisp)
  • Conventional Languages
  • (C, Fortran, Pascal, Basic)

Which one should I use ?
2
Expert System Shells, Languages and Tools
  • There are Expert System development tools that
    have built in inference engines such as -
  • Shells (Crystal)
  • Development Environments (Aion DS)
  • A.I. Languages (Prolog)

3
Expert System Shells, Languages and Tools
  • Crystal
  • A relatively simple shell that supports a
    knowledge base of rules
  • Has a backward chaining inference engine
  • Can interface with text files, databases,
    spreadsheets and C code
  • Has been used successfully for a variety of real
    world problems

4
Expert System Shells, Languages and Tools
  • Aion DS
  • A more complex and powerful expert system
    development tool
  • Supports -
  • multiple knowledge bases
  • forward chaining
  • backward chaining
  • mixed chaining
  • rules and other knowledge representation schemes
  • declarative and procedural programming
  • object oriented programming and inheritance

5
Expert System Shells, Languages and Tools
  • Prolog
  • An Artificial Intelligence language
    (PROgramming in LOGic)
  • Prolog automatically backward chains
  • Can easily represent facts and rules
  • Can be made to support more flexible knowledge
    representation schemes

6
Expert System Shells, Languages and Tools
  • Expert System Shells
  • Components include -
  • A user interface
  • A developer interface
  • Interfaces into other software systems
    or databases
  • Schemes for knowledge representation
  • An inference engine to operate on the knowledge
    held in the knowledge base

7
Expert System Shells, Languages and Tools
A survey by Touche Ross in 1992 found that -
42 used shells
10 used sophisticated KBS development
environments
12 used AI languages, such as Prolog or Lisp
21 used conventional packages or languages
60 of KBSs were small, PC-based, stand-alone
systems
Shells are a suitable inexpensive means of
developing small, stand alone systems
8
Expert System Shells, Languages and Tools
9
Expert System Shells, Languages and Tools
Press F10
10
Expert System Shells, Languages and Tools
11
Expert System Shells, Languages and Tools
  • Conventional Procedural Languages
  • Often used for a particular class of problems
  • Organised as a set of procedures
  • Examples include - C, C, Cobol and Pascal
  • Declarative Languages
  • Designed specifically for A.I KBS applications
  • Consist of a set of declarations
  • Examples include - Lisp and Prolog
  • Are run to determine the truth of a statement

12
Expert System Shells, Languages and Tools
The simplest way in which we can give knowledge
to Prolog is the form of a collection of facts
Consider a simple English Fact
The expert system monitors the ventilator
This fact consists of two important components
A relationship is called a predicate in Prolog
i.e. monitors
Objects are called arguments in Prolog i.e.
expert system, ventilator
This fact would be expressed in Prolog as
monitors(expert_system,ventilator).
13
Expert System Shells, Languages and Tools
The order of the two arguments within the
brackets does not have any significance to Prolog
The user must be consistent in the way he/she
orders arguments within a particular program
For instance
The doctor treats the patient
treats(doctor,patient)
The patient treats the doctor
treats(patient,doctor)
Two different facts that must be reflected in
their translation into Prolog
14
Expert System Shells, Languages and Tools
Fact Meaning surname(smith). The
surname is smith. age(56). The age is
56. value(pH,7.27). The pH value is
7.27. value(pCO2,46). The value of pCO2 is
46. resp_rate(9). The respiratory rate is
9. initial_set(0.6,800,9,12,0) The initial
setting of the ventilator is
0.6, 800, 9, 12, and
0.
15
Expert System Shells, Languages and Tools
Facts
Prolog
Fred is male. Tina is female. Susan is
female. Fred is on a ventilator. Susan is on a
ventilator
male(fred). female(tina). female(susan). ventilato
r(fred). ventilator(susan).
?
Tina is not on a ventilator !
16
Expert System Shells, Languages and Tools
Is Fred on a ventilator ?
?- ventilator(fred).
Yes
You can then use query mode to ask Prolog
questions about patients.
Prolog then examines the knowledge base for facts
which match the question
The query is entered in Prolog format
?
Is Tina on a ventilator ?
?- ventilator(tina).
No
17
Expert System Shells, Languages and Tools
A variable is used when it is possible for a
particular structure to have one of several
different values
For instance
Which patients are female ?
?- female(Patient).
Patient is a variable name and begins with an
uppercase letter
Variables must begin with an uppercase letter
18
Expert System Shells, Languages and Tools
Which patients are female ?
?- female(Patient).
Patienttina?
Prolog attempts to answer the question and finds
a match. The variable Patient then takes the
value tina and Prolog responds.
Patienttina? Patientsusan? no

ltreturngt
To tell Prolog to search for more answers type
Return tells Prolog to stop searching
19
Expert System Shells, Languages and Tools
Consider the program below
male(tim). male(marc).
male(simon).
male(X) succeeds if X is male
resp(tim,acute). resp(marc,medium).
resp(simon,acute).
resp(X,Y)succeeds if the patient X has
respiratory condition of state Y
A sample question
Do any male patients have an acute respiratory
condition ?
To solve this question in Prolog it is necessary
to form a complex query because it involves the
use of two forms of fact from the knowledge base
those facts which state which patients are
male those facts which state which respiratory
condition a patient has
20
Expert System Shells, Languages and Tools
?- male(X),resp(X,acute).
This translates literally to -
Is there an X who is male and has a respiratory
condition which is acute ?
This known as a conjunction of goals
In order to satisfy the complete goal Prolog must
first satisfy the two subgoals. If it cannot find
a value for X which will satisfy both subgoals
the complete goal will fail
21
Expert System Shells, Languages and Tools
Prolog has powerful facilities for making
inferences from rules expressed in the knowledge
base
A simple rule
can_marry(X,Y)- male(X), female(Y), not(marrie
d(X)), not(married(Y)).
2 people can marry if the first is male, the
second is female, and neither are married.
22
Expert System Shells, Languages and Tools
  • Summary of Prolog Definitions
  • Rules
  • Consist of a head goal and a conjunction of sub
    goals which form the body of the rule
  • Clause
  • a fact or rule within a Prolog knowledge base
  • Goal
  • a query that we set and ask Prolog to satisfy
  • Instantiation
  • the process of setting a variable to a particular
    value

23
Expert System Shells, Languages and Tools
  • Summary of Prolog Definitions
  • Matching
  • the process Prolog follows when it attempts to
    match queries given to it with the rules and and
    the facts specified within the knowledge base
  • Predicate
  • the name of a clause within the knowledge base
  • Programme
  • mainly consists of a series of clauses

24
Expert System Shells, Languages and Tools
  • Knowledge Engineering Environments
  • Can support large scale KB systems
  • Often structured
  • Support multiple knowledge representation schemes
  • Examples include -
  • Aion DS
  • KEE (Knowledge Engineering Environment)
  • ART (Automatic Reasoning Tool)

25
Expert System Shells, Languages and Tools
  • For developing an expert
    system using a P.C. there
    are three choices -
  • A commercial shell
  • (e.g. Crystal)
  • An environment
  • (e.g. Aion DS)
  • A programming language
  • (e.g. Prolog)

Use a shell if you can an environment where you
should and an AI language when you must.
26
Expert System Shells, Languages and Tools
(Preece Moseley, 1992)
Units in hours
Write a Comment
User Comments (0)
About PowerShow.com