Expert Systems - Prof. (Dr.) K. R. Chowdhary courses/Expert System… ·  · 2008-04-12thus...

27
Expert Systems KR Chowdhary, Associate Professor, Department of Computer Science & Engineering, MBM Engineering College, JNV University, Jodhpur, [email protected]

Transcript of Expert Systems - Prof. (Dr.) K. R. Chowdhary courses/Expert System… ·  · 2008-04-12thus...

Expert Systems

KR Chowdhary, Associate Professor,

Department of Computer Science & Engineering, MBM Engineering College, JNV University, Jodhpur,

[email protected]

Defining Expert Systems

� Definitions:

Where human expertise is needed to solve problems, expert systems are likely candidates to solve those problems.

What is an expert system (ES)?

� A set of programs that manipulate encoded knowledge to solve problems in a specialized domain that normally require human expertise.

� Encoded knowledge is used in inferencing or reasoning process.

• Uses knowledge rather than data for control the solution.

• Knowledge is maintained separate from control program

• ES are capable of explaining how and why a particular solution arrived.

• Uses symbolic representation of knowledge and performs symbolic computation which closely matches human beings.

• Uses meta-knowledge.

Characteristic features of ES:

Applications of Expert Systems

� Medical Diagnoses

� Diagnosis of complex electronic and electromechanical systems

� Diagnosis of software development projects

� Weather forecasting

� Forecasting crop damages

� Identification of chemical compound structures

� Location faults in computer and communication systems

Applications …

� Scheduling of Customer orders, jobs in OS, in productions.

� Evaluation of applications for loan, eligibility criteria, etc.

� VLSI Design

� Military applications, like those in battle fields

� Law area, like-civil laws, disputes, etc.

� Teaching AI techniques

Why to use ES?

� Commercial viability: whereas there may be only a few experts whose time is expensive and rare, you can have many expert systems

� expert systems can be used anywhere, anytime

� expert systems can have more knowledge than experts

� expert systems can explain their line of reasoning

Weaknesses:

� expert systems are as sound as their KB; errors in rules mean errors in diagnoses

� automatic error correction, learning is difficult (although machine learning research may change this)

� little common sense reasoning: “idiot servants”

Rule-based Expert Systems

� These are most common type of ES

� Uses the knowledge encoded in the form of production rules (if…then .. rules), i.e.

1. If cond1 and cond2 and cond3

Then take action-1

2. If temperature > 200 deg and water level low

Then open the safety valve

� Each rule represents a small chunk of knowledge relating the given domain

� A number of rules may give a chain of inferences starting from some known facts to useful conclusions.

Input

Output

UserExplanatio

n Module

I/O

Interface

Editor

Inference

Engine

Case

History

File

KB Working

Memory

Learning

Module

Expert System

Expert System..

� User interface:

Question answer type

Menu-driven

Natural language

Graphic interface

� KB: Contains facts and rules about some specialized domain.

� Building KB using editor.

� Inference Process: Inference Engine accepts user input queries in response to questions through I/O interface. Inference process is carried out by three stages: match, select, execute.

What is match?

contents of working memory are compared with KB. When match is found, the corresponding rules are placed in the conflict set (i.e. select). Further it needs instantiations to confirm match. This follows execution.

Expert System..

Inferencing

KB Working

Memory

1. Match

Conflict Set

2. Select

3. Execute

Inference Cycle

� Prolog uses backward chaining (goal driven strategy), matching of sub goals for the goal to be achieved.

� Rules may be tested exhaustively or selectively depending on the control strategy.

� The chaining continues as long as matches can be found between clauses in the working memory and the rules in the KB.

� The search can be limited to few hundred rules.

� Uncertainty measures can also be used

Prolog rules:

� Explaining how & why?

How did you know that? (for inference result)

Why do you need to know that? (when additional information is asked)

� I/O Interface: Permits the user to communicate with the system in a more natural may by permitting the the use of simple selection menus or use of a restricted natural language.

Explanation

Explanation..

� When you are asking why a particular action was performed at a node in the tree...� how questions: recite the children

� why questions: recite the parent

� thus backward chaining expert systems naturally support explanation� can be done during inference: when user asked for data, s/he can as “why” and a reason is given

� after expert advice given, user can ask “how”, “why”, and even “why not” (ie. why did some rule fail)

� a great tool for KB debugging!

� forward chaining: explanation not as structured;

Knowledge Acquisition and validation

� This is also called knowledge engineering process

� Needs acquiring of knowledge and then encoding it

� Knowledge is derived from experts, journals, texts, reports, interviews, etc.

� Job is performed by knowledge engineer.

� Consolidating of the knowledge may need collective efforts of many persons.

Knowledge acquisition process

Domain

Expert

KB System

Editor

Knowledge

Engineer

� 1. Medical expert systemsMedical expert systems are an active area.

� Humanitarian uses: remote areas can have world-class expertise,

� medical science is complex; expert systems are intelligent advisors and assistants

� MYCIN

� diagnose bacterial infections� uses certainty factors: ranked diagnoses are generated

� EMYCIN: empty MYCIN - the “shell” of MYCIN for use in other applications

� CADUCEUS: � expert system with entire internal medicine KB

� it’s been active since 1970’s

Examples expert systems

2. XCON � configures VAX systems from user requirements

� DEC uses it; has increased throughput of system design

� 10,000 rules

� said to have replaced X system designers with 4X expert system maintainers!

3. DELTA/CATS� diesel electric locomotive trouble shooter

� problem: system maintenance

Examples expert systems…

4. Jonathan’s Wave� commodities trading

� incorporates several expert’s approaches

� runs in Prolog and C

� lots of AI groups on Wall Street!

5. DENDRAL(1960): For determining the structure of chemical compounds given its specification.

6. PROSPECTOR: Assists the geologists in discovering the minerals deposits.

Examples expert systems…

7. Codecheck� expert system to evaluate C source code

� complexity, formatting, standards and portability adherence

� identifies overly complex code (prime source of program problems!)

8. CHORAL� expert system for harmonizing chorales in the style of J.S. Bach

� similar system: harmonic analysis of tonal music

� rules obtained from: studying composers music, musicologists

� some systems used for composition (with interesting results)

Examples expert systems…

� Expert systems are now ubiquitous (I.e.,present every where)

� still lots of active research:

� probabilistic knowledge and deduction

� large system maintenance

� knowledge acquisition

� popular domains

� industrial, financial, medical

� legal: interpret laws “by the book”

� education: intelligent tutoring

� Some domains remain difficult to implement

� those requiring ‘artistic’ creativity and skill

� those requiring common sense

The state of the art

� The need for a solution must justify the costs involved in development

� Human expertise is not available in all situations where it is needed

� The problem may be solved using symbolic reasoning techniques

� The problem is well structured and does not require (much) common sense knowledge

� The problem cannot be easily solved using more traditional computing methods

� Cooperative and articulate experts exist

� The problem is of proper size and scope

Steps in expert system building: Choosing Problem:

� expert system building is a software engineering task, but with a twist: knowledge base� KB will be continually refined, corrected, updated

� expert system design & implementation steps1. initial proposal - identification of problem, expert(s), benefits

2. create a prototype

3. knowledge engineering: interview expert for many weeks (months)

4. implement expert’s expertise in KB

5. test expert system; go to 3 (let expert see results)

6. put in production ; refine errors when found

Steps in expert system building

� Knowledge engineering: the extraction of knowledge from an expert, and encoding it into machine-inferrable form

� K.E. is the most difficult part of expert system implementation

� the knowledge engineer must extract detailed info from an expert; but s/he is not expected to understand it

� the expert relies on years of experience and intuition: asking them to deconstruct knowledge is difficult and frustrating

� can also be political factors

� many strategies for knowledge engineering

� multiple KE’s

� multiple experts

� watch expert in the field

� continual expert feedback on expert system performance

Knowledge engineering

Other types of expert system

� Called Non-production systems

� These are:

Semantic Network based

Frame based

Decision tree based

Neural net based

Problems of using expert systems

� Choice of domain

� Acceptability

� Uncertainty

� Updating

� Limitation (ES do not know itself)

� Testing

� Behavior

� Knowledge acquisition

Advantages of using expert Systems

� Availability

� Consistency

� Comprehensiveness (detailed knowledge)