You are on page 1of 42

ARTIFICIAL INELLIGENCE

&
EXPERT SYSTEMS

9-May-18 S.S Kallurkar/NTD/Unit-III/AI&ES 1

Outline
 Artificial intelligence
 Expert system/knowledge-based systems
 Knowledge Engineering
 Knowledge Acquisition
 Knowledge Representation
 Inferencing
 Expert Systems Practicum
 Intelligent Systems Development

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 2
Artificial Intelligence
(Simple Definition)
Behavior by a machine that, if performed by
a human being, would be called intelligent

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 3

AI Objectives
 Make machines smarter (primary goal)
 Understand what intelligence is (Nobel
Laureate purpose)
 Make machines more useful
(entrepreneurial purpose)

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 4
AI Represents Knowledge as
Sets of Symbols
A symbol is a string of characters that stands
for some real-world concept

Examples
 Product
 Defendant
 0.8
 Chocolate

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 5

How AI Works

 AI Programs Manipulate Symbols to Solve


Problems

 Symbols and Symbol Structures Form Knowledge


Representation

 Artificial Intelligence Dealings Primarily with


Symbolic, Nonalgorithmic Problem Solving
Methods
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 6
Some Major AI Areas
 Expert Systems
 Natural Language Processing
 Speech Understanding
 (Smart) Robotics and Sensory Systems
 Neural Computing
 Fuzzy Logic
 Genetic Algorithms
 Intelligent Software Agents

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 7

Expert Systems/Knowledge-
Based Systems
 Attempt to Imitate Expert Reasoning Processes
and Knowledge in Solving Specific Problems
 Most Popular Applied AI Technology
– Enhance Productivity
– Augment Work Forces

 Narrow Problem-Solving Domain or Tasks


 Qualitative Problem-Solving Aspects

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 8
Expert Systems
 Provide Direct Application of Expertise

 Expert Systems Do Not Replace Experts,


But
– Makes their Knowledge and Experience More
Widely Available
– Permits Non Experts to Work Better

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 9

Expert Systems
 Expertise
 Transferring Expertise
 Inferencing
 Rules
 Explanation Capability

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 10
Human Expert
Behaviors
 Recognize and formulating the
problem
 Solve problems quickly and properly
 Explain the solution
 Learn from experience
 Restructure knowledge
 Break rules
 Determine relevance
 Degrade gracefully
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 11

Transferring Expertise
 Objective of an expert system
– To transfer expertise from an expert to a
computer system and
– Then on to other humans (nonexperts)
 Activities
– Knowledge acquisition
– Knowledge representation
– Knowledge inferencing
– Knowledge transfer to the user
 Knowledge is stored in a knowledge base

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 12
Inferencing
 Reasoning (Thinking)
 The computer is programmed so
that it can make inferences
 Performed by the Inference
Engine

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 13

Rules
 IF-THEN-ELSE

 Explanation Capability
– By the justifier, or explanation
subsystem
 ES versus Conventional Systems

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 14
Structure of Expert Systems
 Development Environment
 Consultation (Runtime)
Environment

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 15

Three Major ES
Components
User Interface

Inference
Engine

Knowledge
Base

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 16
All ES Components
 Knowledge Acquisition Subsystem
 Knowledge Base
 Inference Engine
 User Interface
 Blackboard (Workplace)
 Explanation Subsystem (Justifier)
 Knowledge Refining System
 User

 Most ES do not have a Knowledge Refinement


Component

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 17

Knowledge Base
 The knowledge base contains the knowledge
necessary for understanding, formulating,
and solving problems

 Two Basic Knowledge Base Elements


– Facts
– Special heuristics, or rules that direct the use of
knowledge

– Knowledge is the primary raw material of ES


– Incorporated knowledge representation

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 18
Knowledge
 Knowledge can be defined as the body of
facts and principles accumulated by human
kind or the act, fact or state of knowing.

 It is having a familiarity with Language,


Concepts, Procedures, Rules, Ideas,
Abstractions, Places, Customs, Facts and
Associations coupled with an ability to use
these notions effectively in modeling
different aspects of world.

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 19

Knowledge & Intelligence

Intelligence requires possession


of and access to knowledge & a
characteristic of Intelligent
people is that they possess much
knowledge

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 20
Knowledge
 A common way to represent Knowledge
external to a computer or human is in the
form of written language.
 Ex.
Ram is Handsome (Simple Fact)
Lakshman owes money to Bharat
(Complex Binary Relations between two
persons)
Shatrughna has learned to use the
computer and has developed software
for various industrial applications using
Oracle at backend and VB at Front end.
(Most Complex)
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 21

Knowledge & Data


 Difference
 Example

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 22
Knowledge
 Knowledge includes and requires the
use of Data and Information. But it is
more. It combines Relationships,
Correlations and Notion of gestalt
with Data and Information.

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 23

Knowledge
 Belief is defined as essentially any
meaningful and coherent expression that
can be represented. A Belief may be True
or False
 Hypothesis is defined as a justified belief
that is not known to be true. Thus,
Hypothesis is a belief which is backed up
with some supporting evidence, but it
may still be false.
 Finally we define Knowledge as true
justified belief.

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 24
Knowledge
Epistemology Metaknowledge

Epistemology is the study of the nature of


knowledge.

Metaknowledge is knowledge about


knowledge.

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 25

Representation Scheme
 First Order Predicate Logic
Teacher (Dronacharya, Eklavya)
 Frame and Associative Networks or
Semantic and Conceptual Networks
 Fuzzy Logic
 Modal Logics
 Object Oriented Methods
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 26
Frames
 Frames are flexible Structures that permit the
grouping of closely related knowledge.
Example:
An object such as a Projector and its
properties (Size, Specifications, Functions,
Color) and its relationship to other objects (to the
right of PC, on the top of Table and so on) are
grouped together into a single structure of easy
access.
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 27

Networks
 Networks permits easy access to groups of
related items. They associate objects with
their Attributes and Linkages show their
relationship to other objects.

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 28
Fuzzy Logic
 Fuzzy Logic is a generalization of Predicate
Logic, developed to permit varying degrees
of some property such as fat. In classical
two-valued logic, FAT (Tuntun) is either
true or false, but in Fuzzy Logic this
statement may be partially true.

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 29

Modal Logic
 Modal Logic is an extension of Classical
Logic. It was also developed to better
represent commonsense reason in by
permitting conditions such as likely or
possible.

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 30
Object Oriented Methods
 Object Oriented representations package an
object together with its attributes and
functions, therefore, hiding these facts.
 Operations are performed by sending
messages between the objects.

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 31

Knowledge Organization
 It is key to efficient programming
 KB system may require tens of thousands
of facts and rules to perform their intended
tasks.
 It is essential that appropriate Facts and
Rules be easy to Locate & Retrieve.
 Indexing

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 32
Indexing
 Indexing is the method for easy accession of
Knowledge, organized in memory.
 Knowledge is grouped in the way that key words
can be used to access the group.
 Key words points to the group, hence the search
of some specific chunk of knowledge is limited
to the group (a fraction of Knowledge base rather
than the whole memory)

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 33

Choice of Representation
 It simplifies the organization and access
operations
 Example:
Frames linked together in a network
represents a versatile organization structure.
Each frame contains all closely associated
information about an object and pointers to
related object frames making it possible to
quickly gain access to this information.
Subsequent processing involves only a few
related frames
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 34
Knowledge Manipulation
 Knowledge Manipulation facilitates Decisions and
Actions in Knowledge based systems in specified ways.
 Typically, some form of Input (keyboard or sensors)
initiates a search for a goal or decision
 This requires that known facts in the knowledge base be
Located, Compared and Altered in some way.
 This process may set up some other subgoals and require
further inputs and so on until a final solution is found.
 Manipulations are Computational equivalent of
Reasoning.
 This requires a form of inference or deduction, using the
knowledge and inferring rules.

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 35

Knowledge Manipulation
 All form of Reasoning require a certain
amount of Searching and Matching.
 These two operations consume maximum
computational time.
 It is important to have techniques available
that limit the amount of Search and Matching
required to complete any given task.
 Methods are available to limit or avoid the
Combinatorial explosion in problems which
are so common in search.
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 36
Inference Engine
 The brain of the ES
 The control structure (rule
interpreter)
 Provides methodology for
reasoning

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 37

User Interface
 Language processor for friendly,
problem-oriented communication

 NLP or menus and graphics

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 38
The Human Element
in Expert Systems

 Expert
 Knowledge Engineer
 User
 Others

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 39

How Expert Systems Work

Major Activities of
ES Implementation and Use
 Development
 Consultation
 Improvement

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 40
ES Shell
 Includes All Generic ES
Components
 But No Knowledge
– EMYCIN from MYCIN
– (E=Empty)

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 41

Expert Systems (Rule-Based)


Shells/Software Development Packages
 Corvid Exsys
 K-Vision
 KnowledgePro
 XpertRule KBS
 G2
 Guru
 CLIPS
 JESS
 VIDWAN
 Many More: Free and Costly
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 42
Problem Areas Addressed by
Expert Systems
 Interpretation systems
 Prediction systems
 Diagnostic systems
 Design systems
 Planning systems
 Monitoring systems
 Debugging systems
 Repair systems
 Instruction systems
 Control systems

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 43

Expert Systems Benefits


 Improved Decision Quality
 Increased Output and Productivity
 Decreased Decision Making Time
 Increased Process(es) and Product Quality
 Capture Scarce Expertise
 Can Work with Incomplete or Uncertain
Information
 Enhancement of Problem Solving and
Decision Making
 Improved Decision Making Processes
 Knowledge Transfer to Remote Locations
 Enhancement of Other MIS
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 44
Lead to
 Improved decision making
 Improved products and customer
service
 Sustainable strategic advantage
 May enhance organization’s
image

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 45

Problems and Limitations of Expert Systems


 Knowledge is not always readily available
 Expertise can be hard to extract from
humans
 Expert system users have natural cognitive
limits
 ES work well only in a narrow domain of
knowledge
 Knowledge engineers are rare and
expensive
 Lack of trust by end-users
 ES may not be able to arrive at valid
conclusions
 ES sometimes produce incorrect
recommendations
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 46
Expert System Success Factors

 Most Critical Factors


– Champion in Management
– User Involvement and Training
 Plus
– The level of knowledge must be sufficiently high
– There must be (at least) one cooperative expert
– The problem must be qualitative (fuzzy) not
quantitative
– The problem must be sufficiently narrow in scope
– The ES shell must be high quality, and naturally
store and manipulate the knowledge
– A friendly user interface
– Important and difficult enough problem
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 47

For Success
1. Business applications justified
by strategic impact (competitive
advantage)
2. Well-defined and structured
applications

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 48
Knowledge Acquisition
Knowledge Engineering

Knowledge acquisition, representation,


validation, inferencing, explanation
and maintenance
– Involves the cooperation of human
experts
– Synergistic effect

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 49

Knowledge Engineering
Process Activities
 Knowledge Acquisition
 Knowledge Validation
 Knowledge Representation
 Inferencing
 Explanation and Justification

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 50
Knowledge Engineering Process

Knowledge Sources of knowledge


validation (experts, others)
(test cases)
Knowledge
Acquisition
Encoding
Knowledge Knowledge
base Representation

Explanation
justification

Inferencing

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 51

Knowledge Acquisition
Methods
 Manual (Interviews)

 Semiautomatic (Expert-driven)

 Automatic (Computer Aided -


Induction driven)

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 52
Interviews
 Most Common Knowledge
Acquisition: Face-to-face
interviews

 Interview Types
– Unstructured (informal)
– Semi-structured
– Structured

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 53

Recommendation
Before a knowledge engineer interviews the
expert(s)
1. Interview a less knowledgeable (minor)
expert
– Helps the knowledge engineer
• Learn about the problem
• Learn its significance
• Learn about the expert(s)
• Learn who the users will be
• Understand the basic terminology
• Identify readable sources
2. Next read about the problem
3. Then, interview the expert(s) (much more
effectively) S.H.Wankhade/DBIT/Unit-VI/AI&ES
9-May-18 54
Induction/Knowledge Table
Example
 Induction tables (knowledge
maps) focus the knowledge
acquisition process

 Choosing a hospital clinic facility


site

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 55

Induction Table (Knowledge Map) Example

Population Density Number of Average Near Public Decision


Density over How Near (within Family Transportation? (Choices)
People / Many Sq. 2 miles) Income Yes, No Yes, No
Square mi Competitors Numeric,
Mile Numeric, 0, 1, 2, 3, ... Rs / Year
>= 2000 >=4 0 Yes

>=3500 >=4 1 Yes

>=2 No

<30,000 No

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 56
Knowledge Representation

Once acquired,
knowledge
must be organized for use

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 57

Introduction
 A good knowledge representation naturally
represents the problem domain

 An unintelligible knowledge representation


is wrong

 Most artificial intelligence systems consist


of
– Knowledge Base
– Inference Mechanism (Engine)

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 58
 Knowledge Base
– Forms the system's intelligence source
– Inference mechanism uses to reason and draw
conclusions
 Inference mechanism: Examines the
knowledge base to answer questions, solve
problems or make decisions within the
domain

 Many knowledge representation schemes


– Can be programmed and stored in memory
– Are designed for use in reasoning
 Major knowledge representation schemas:
– Production rules
– Frames
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 59

Production Rules

 Condition-Action Pairs
– IF this condition (or premise or antecedent)
occurs,
– THEN some action (or result, or conclusion, or
consequence) will (or should) occur

– IF the stop light is red AND you have stopped,


THEN a Left turn is OK

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 60
 Each production rule in a knowledge base
represents an autonomous chunk of expertise

 When combined and fed to the inference


engine, the set of rules behaves
synergistically

 Rules can be viewed as a simulation of the


cognitive behavior of human experts

 Rules represent a model of actual human


behavior

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 61

Forms of Rules

 IF premise, THEN conclusion


– IF you work smartly, THEN your chance of being
successful is high

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 62
More on Rules
 Inclusion of ELSE
– IF your income is high, OR your deductions are
unusual, THEN your chance of being audited by the
IRS is high, OR ELSE your chance of being audited
is low

 More Complex Rules


– IF credit rating is high AND salary is more than
Rs.30,000, OR assets are more than Rs.75,000, AND
pay history is not "poor," THEN approve a loan up
to Rs.10,000, and list the loan in category "B.”
– Action part may have more information: THEN
"approve the loan" and "refer to an agent"

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 63

Advantages of Rules
 Easy to understand (natural form of
knowledge)

 Easy to derive inference and explanations

 Easy to modify and maintain

 Easy to combine with uncertainty

 Rules are frequently independent

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 64
Limitations of Rules

 Complex knowledge requires many rules

 Builders like rules (hammer syndrome)

 Search limitations in systems with many


rules

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 65

Multiple Knowledge Representations

 Rules + Frames
 Others

Knowledge Representation Must Support

 Acquiring knowledge
 Retrieving knowledge
 Reasoning

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 66
Considerations for
Evaluating a Knowledge
Representation
 Naturalness, uniformity & understandability

 Degree to which knowledge is explicit


(declarative) or embedded in procedural code

 Modularity and flexibility of the knowledge


base

 Efficiency of knowledge retrieval and the


heuristic power of the inference procedure

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 67

 No single knowledge representation method


is ideally suited by itself for all tasks

 Multiple knowledge representations: each


tailored to a different subtask

 Production rules and frames works well in


practice

 Object-oriented knowledge representations


– Hypermedia

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 68
Inference Techniques

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 69

Reasoning in Artificial Intelligence

 Knowledge must be processed (reasoned with)

 Computer program accesses knowledge for


inferencing

 Inference engine or control program

 Rule interpreter (in rule-based systems)

 Directs search through the knowledge base

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 70
Inferencing with Rules:
Forward and Backward Chaining
– Firing a rule: When all of the rule's hypotheses
(the “if parts”) are satisfied

– Can check every rule in the knowledge base in a


forward or backward direction

– Continues until no more rules can fire, or until a


goal is achieved

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 71

Forward and Backward Chaining

– Chaining: Linking a set of pertinent rules

– Search process: directed by a rule interpreter


approach:

• Forward chaining. If the premise clauses match the


situation, then the process attempts to assert the conclusion

• Backward chaining. If the current goal is to determine the


correct conclusion, then the process attempts to determine
whether the premise clauses (facts) match the situation

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 72
Backward Chaining
 Goal-driven - Start from a potential conclusion
(hypothesis), then seek evidence that supports
(or contradicts) it

 Often involves formulating and testing


intermediate hypotheses (or subhypotheses)

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 73

Forward Chaining
 Data-driven - Start from available information
as it becomes available, then try to draw
conclusions

 What to use?
– If all facts available up front (as in auditing) -
forward chaining
– Diagnostic problems - backward chaining

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 74
Representing Uncertainty
 Numeric

 Graphic

 Symbolic

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 75

Numeric Uncertainty Representation

 Scale (0-1, 0-100)


– 0 = Complete uncertainty
– 1 or 100 = Complete certainty

 Problems with Cognitive Biases


 People May be Inconsistent at Different Times

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 76
Expert Systems Demo

 VIDWAN

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 77

Intelligent Systems
Development
 (Rapid) Prototyping

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 78
Prototyping:
ES Development Life Cycle
 Nonlinear process
Planning

Analysis

Design

Implementation

Prototype

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 79

Software Classification:
Technology Levels
Expert System Applications (Specific ES)

Shells
Hybrid Systems

Support Tools, Facilities,


and Construction Aids

Programming Languages
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 80
Rapid Prototyping
and a Demonstration
Prototype
 Build a small prototype

 Test, improve, expand

 Demonstrate and analyze feasibility

 Complete design
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 81

Rapid Prototyping
 Crucial to ES development
 Small-scale system
 Includes knowledge representation
 Small number of rules
 For proof of concept

9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 82
What We’ve Done
 Basic definitions/methods/ideas

 Advanced definitions/methods/ideas

 How to KBS/ES

 KBS/ES with a business focus

 Very rich area – still much potential in


business
9-May-18 S.H.Wankhade/DBIT/Unit-VI/AI&ES 83

You might also like