lecture 8: expert system shells. building expert systems if one wishes to build an expert system,...

56
Lecture 8: Expert system shells

Post on 20-Dec-2015

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Lecture 8:Expert system shells

Page 2: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Building expert systems

If one wishes to build an expert system, one has several choices of software tool:

(1) conventional programming languages (e.g. Pascal, C++, Java)

(2) artificial intelligence programming languages (particularly LISP and Prolog)

(3) expert system shells

Page 3: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Building expert systems

The first choice is almost certainly a bad idea.

Conventional programming languages are not designed for this sort of job, and too much work is required to make the program perform in the way required.

However, if it is important to have highly efficient software, this might be a suitable choice.

Page 4: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Building expert systems

Choice (2) has the advantage: a flexible system can be built, accurately

reflecting the peculiarities of the knowledge domain and system task.

and the disadvantages: Programming skills in these languages are

not common. It may be necessary to hire specialist programmers, or retrain the programming staff.

Programming the system will always be a larger (and hence longer and more expensive) task than using a shell.

Page 5: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Building expert systems

Choice (3) has been the most frequent choice for commercial systems in recent years.

Page 6: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Building expert systems

You will remember that an expert system shell is a ready-made expert system, with the knowledgebase missing, together with instructions for building a knowledgebase in the customer's chosen domain.

Page 7: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

The idea of an e.s. shell

User Interface

Inference Engine

Knowledgebase on blood infections

Page 8: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

The idea of an e.s. shell

User Interface

Inference Engine

Knowledgebase on chest infections

Page 9: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

The idea of an e.s. shell

User Interface

Inference Engine

Knowledgebase on skin diseases

Page 10: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Shells

Some organisations avoid using shells for building complete expert systems; but even they frequently use them for training building prototypes

Page 11: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Expert system programming environments

Some people make a distinction between e.s.shells and e.s.programming environments (or "hybrid systems"). For instance, Efraim Turban does in his book (Turban, 1992).

Page 12: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Expert system programming environments

Historically, this has been important because, in the 1980s, most expert systems projects in the UK used shells (as described below), and most expert systems projects in the USA used environments.

Page 13: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Expert system programming environments

Environments were so called because they provided several different forms of knowledge representation, for instance, rules metarules frames semantic nets

and several different forms of inference, e.g. forward chaining backward chaining bidirectional chaining non-monotonic reasoning

Page 14: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Expert system programming environments

They needed more powerful hardware than a microcomputer - usually, a workstation.Historically, e.s. shells have been more constrained, perhaps offering only a single kind of knowledge representation. They would usually be designed to run on a PC.

Page 15: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Expert system programming environments

However, in recent years,E.S.shells have become more sophisticated, and added multiple forms of knowledge representation and of inference strategy.PCs have become more powerful, and PC versions of e.s.environment software have been released.

Page 16: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Expert system programming environments

It is probably not useful to make the distinction any more. One could simply speak of "simple shells" and "sophisticated shells".

Page 17: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Advantages and disadvantages of expert system shells

Advantages:The programming effort that has gone into building the user interface and inference engine is re-used.

Page 18: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Using a shell: advantages

Advantages: The level of programming skill needed to

produce the finished system is much lower than it would be if the system was programmed from scratch using a language.

This means that, if an appropriate shell is chosen, the project can be completed faster, and cheaper.

Page 19: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Using a shell: disadvantages

Disadvantages:e.s.tools are "end-user tools". Compared with systems programmed from a language, such software packages tend to produce systems that have

poor documentation weak security difficult maintenance problems

Page 20: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Using a shell: disadvantages

Disadvantages:the problem of flexibility If the shell is a poor match for the type of

knowledge in the domain concerned, it is liable to produce a system which simply doesn't correspond to the expertise of the original domain expert;

Page 21: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Using a shell: disadvantages

In an attempt to model a non-standard piece of reasoning, the system builders may produce a "system" which consists of two or more expert system shells side by side. Such a "system" is bound to be unsatisfactory, and to lead to problems of use, maintenance and training.

Page 22: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

The problem of flexibility

The principle underlying the expert system shell is that a knowledgebase can be removed from an expert system, another can replace it, and the system will reason just as effectively with the new knowledge as with the old.

Page 23: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

The problem of flexibility

This assumes that the same inferencing techniques are used by every expert, and in every domain.

Page 24: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

The problem of flexibility

In fact, there is evidence that

Different experts use different problem-solving skills;

Different types of problem-solving task require different types of reasoning.

Page 25: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

The problem of flexibility

"...it must be established that the logic and reasoning method incorporated in the shell correspond to those used by the human expert in problem solving, otherwise the project is almost certainly doomed to failure."

Ian Graham, in Forsyth (1989), p.81

Page 26: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Factors involved in choosing a shell, or other software tool, for an

e.s. project

1. The characteristics of the knowledge, and the style of inference, used by the domain expert or experts.2. The time and money available for the project.3. The programming capabilities available in-house (what languages do the programmers know? Is it feasible to retrain them?).

Page 27: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Factors involved in choosing a shell, or other software tool, for an

e.s. project

4. The hardware available for development.5. The hardware the system will eventually run on.6. The required performance of the system.

Page 28: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Factors involved in choosing a shell, or other software tool, for an

e.s. project

The selection procedure should involve:a) Doing enough knowledge acquisition to establish (1).b) Deciding whether shells are available whose inference strategies and knowledge representation match the requirements of the problem. If not, is the skill available to treat this as a job for programming in a computer language?

Page 29: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Factors involved in choosing a shell, or other software tool, for an

e.s. project

c) Establishing that software suggested by stage (b) will run on the available hardware, and provide adequate performance in terms of speed, etc.

d) Establishing that sufficient time and money is available for the project.

Page 30: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Factors involved in choosing a shell, or other software tool, for an

e.s. project

e) Establishing that any shell still under consideration has the capabilities required by the project. Has it got adequate explanation

facilities? Can it handle a large enough

knowledgebase? Can it interface easily with other

pieces of software which are to be used by the finished system?

Page 31: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Factors involved in choosing a shell, or other software tool, for

an e.s. project

These questions should decide whether the project is viable at all and, if it is, which shell, or AI language, or conventional language, is the appropriate tool for the job.

Page 32: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

Acquire SDK is marketed by a Canadian software house (Acquired Intelligence Inc) as one of a range of expert system tools.The knowledge-representation involves objects (as used in object-orientated programming; these are conceptually very similar to frames) combined with rule-based reasoning.

Page 33: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

Product description, and testimonials, taken from their web site (Nov.2001):

Page 34: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

“The Acquire Software Development Kit (SDK) lets you integrate the Acquire inference engine and knowledge bases into your applications. You can build intelligent applications using many popular development environments -- including Visual Basic, Visual C++, Java, Delphi, PowerBuilder, ToolBook -- or any other development environment that supports ActiveX controls or DLL function calls.”

Page 35: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

“Acquire SDK 2.1 lets you operate multiple knowledge bases simultaneously within a single application, and lets many users access the same knowledge base at the same time.

Under special arrangements, the Acquire SDK libraries are available for SCO Unix, Sun OS, Solaris, and Linux, and can be ported to almost any Unix variant.”

Page 36: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

“ Easy to use -- you can build a full-featured intelligent application in Visual Basic with just a handful of statements.

The inference engine generates events when a rule fires, when a conflict occurs, or when it needs additional information.

Ability to utilize multiple knowledge bases simultaneously in one application.

Ability to deliver client/server applications.”

Page 37: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

“ Includes sample applications that show you how to build WWW applications with CGI or Java.

Ability to access the contents of knowledge bases, including messages written by the knowledge base author that can be used to give situation-specific commands to your application, and permitting customization from within the knowledge base.”

Page 38: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

“ Flexibility of data source: obtain input interactively from the user, from the knowledge base, from a database or spreadsheet, or from a hardware device or other source.

The expert system is embedded - the user needn't be aware that an expert system is being used at all.”

Page 39: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

“When we first discussed the possibility of an expert system in neuropsychology, I thought it was an interesting, albeit impossible idea. Now that I have used ACQUIRE® to build two different knowledge bases (in neuropsychology and school psychology) I am looking forward to building other applications for my clinical practice.”

Dr. Diane Russell, Neuropsychologist

Page 40: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

“Radio interference is a complex, diagnostic problem that all countries have. Using ACQUIRE® has allowed us to build a huge, comprehensive and complex knowledge base (The Radio Interference Advisor) that is so well structured that it is very easy to understand, use and maintain. It usually takes up to three years to teach a new technician to be a radio inspector.

Page 41: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

Once trained as a radio inspector, solving particularly difficult radio interference problems (e.g., intermodulation products) can still be very labour intensive. We are using this as a tool to speed up both the training process and the diagnostic process. It is an extraordinary learning tool, so it can also be used in the classroom.

Page 42: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

We've been finding new applications for the software even before it's finished.”

Dave Sinclair

Operations Manager, Spectrum

Industry Canada (Retired)

Page 43: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

“MacMillan Bloedel is using the powers of ACQUIRE® to assist personnel in machine startup and to help diagnose machine breakdown. One of the greatest strengths of this product is that it is designed for the expert to build his/her own knowledge base.

Page 44: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

Bypassing the requirement of a knowledge engineer can significantly reduce the project costs and lower the risk of misinterpreted information. In addition, ACQUIRE® operates on a PC platform, eliminating the need to purchase specialized computer equipment.”

Sharlene Yap Computer Scientist, Wood Harvesting MacMillan Bloedel Research Corp.

Page 45: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

“The ACQUIRE® knowledge acquisition system is the underlying technology for an intelligent tutoring system for crew training. The resultant system, ACQUIRE®ITS, inherits the benefits of ACQUIRE® while providing the tools with which the general PC user can develop and maintain their own intelligent tutoring applications.”

Canadian Space Agency

Page 46: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

“Analysing international trade in commodities and forecasting market prices are particularly difficult tasks. Each market differs considerably, and the trader or analyst must develop detailed knowledge of his/her specialist area. Mathematical modeling is often unsuccessful because it fails to represent this knowledge adequately, especially that relating to the

Page 47: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

nonquantitative factors which affect commodity markets. ACQUIRE® allowed us to rapidly model an important and complex commodity market (for Soybeans), paying attention to the psychological elements of "market sentiment". The resulting system, SoyTrader, incorporates a number of rules which make it a considerable advance on other formal models of this

Page 48: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example of an up-to-date PC shell: Acquire SDK

market. ACQUIRE® allowed us to prototype SoyTrader quickly, and to achieve impressive forecasting results; results which other analysts had doubted were possible.”

Geoffrey Bastin Economist, MIL, London, U.K.

Page 49: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Examples

One piece of knowledge represented in three rule-based shells.

Original knowledge, elicited from the domain expert (a salesman for life assurance products):

Page 50: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

"Suppose the customer has a lump sum to invest, and they want to see some growth in the investment. Suppose also that they do want a pension, but don't need life cover. In that case, I'd advise them to buy an annuity.”

Page 51: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

This knowledge represented in Crystal:

Annuity

IF lump sum to invest

AND growth desirable

AND pension needed

AND NOT life cover needed

AND: conclusion display

Example: Crystal

Page 52: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example: Leonardo

This knowledge represented in Leonardo:

1:if investment is 'lump sum'

2:and growth is desirable

3:and pension is desirable

4:and life.cover is unnecessary

5:then advice is annuity

Page 53: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example: Leonardo

Object number: 2g

1:Name: investment

2:Type:

3:Certainty:

4:Default value:

5:Allowed value: regular, lump sum

6:Compute value:

7:Query prompt: What kind of payment are you prepared to make?

Page 54: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example: Leonardo

8:Query preface:

We have to establish first whether you wish to save regularly or merely invest a single lump sum. Later we may explore a combined approach.

- NB there are 18 slots in an object frame.

Page 55: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example: Guru

This knowledge represented in Guru:RULE: R1

IF: INVESTMENT = "lump sum" AND GROWTH = "desirable"

AND PENSION = "desirable" AND LIFECOVER = "unnecessary"

NEEDS: INVESTMENT, LIFECOVER, GROWTH, PENSION

THEN: ADVICE = "annuity"

Page 56: Lecture 8: Expert system shells. Building expert systems  If one wishes to build an expert system, one has several choices of software tool: l (1) conventional

Example: Guru

REASON: For someone who wants capital growth and a pension but has no need of life cover, the best use of a lump sum is the purchase of a deferred annuity.