0% found this document useful (0 votes)
100 views23 pages

Unit 1

This document provides an overview of artificial intelligence (AI), including definitions, characteristics, systems, languages, techniques, and applications. It defines AI as the science and engineering of making intelligent machines, especially computer programs, that can adapt to new situations. The key aspects that distinguish AI from conventional software are its use of symbolic processing, heuristic search techniques, vast knowledge bases, and ability to reason and draw inferences. Common AI techniques include search, pattern recognition, knowledge representation, and learning. The document also outlines several fields and applications of AI such as expert systems, natural language processing, computer vision, and robotics.

Uploaded by

Ishaan Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views23 pages

Unit 1

This document provides an overview of artificial intelligence (AI), including definitions, characteristics, systems, languages, techniques, and applications. It defines AI as the science and engineering of making intelligent machines, especially computer programs, that can adapt to new situations. The key aspects that distinguish AI from conventional software are its use of symbolic processing, heuristic search techniques, vast knowledge bases, and ability to reason and draw inferences. Common AI techniques include search, pattern recognition, knowledge representation, and learning. The document also outlines several fields and applications of AI such as expert systems, natural language processing, computer vision, and robotics.

Uploaded by

Ishaan Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

What is Artificial Intelligence?

Artificial means not natural

Intelligence means detailed information

In precise, ability to acquire, understand and apply knowledge

OR

A machine must be able to adapt to new situations.

Definitions

1. John McCarthy, who coined the term Artificial Intelligence in 1956, defines it as "the science
and engineering of making intelligent machines", especially intelligent computer programs.
2. AI is the study of : How to make computers do things which, at the moment, people
do better.
3. AI is the study concerned with building machines that simulate human behavior.

Characteristics
1. System that learn new concept or tasks.
2. System that reason and draw useful conclusions,
3. System that can understand natural language.
4. System that perceive visual scene.
5. System that perform other types of points that require human type of intelligence.

Conventional Systems

Input Processing Output

AI Systems

Input Processing Knowledgebase Inferencing (Reasoning) Output

Comparison between AI programs and Conventional Software

Features AI programs Conventional Software


Processing Type Symbolic Numeric
Technique Used Heuristic Search (to discover) Algorithmic Search
Answer/Results Satisfactory Optical (0 or 1)
Control/ Data Separation Separate Intermingled
Knowledge Vast Precise
Modification Frequent Rare
Process Inferential Repetition
Intelligence Yes No

Nimish Kumar
AI Languages
1. LISP (List Processing)
2. PROLOG (Programming in Logic)
3. C/ C++/ Java

Application Areas of AI

Application areas can also be classified into following catogaries:


1. Mundane Task
a) Perception
i) Vision
ii) Speech
b) NLP
i) Understanding
ii) Generation
iii) Translation
c) Common sense Reasoning
i) Robot Control
2. Formal Task
a) Games
b) Mathematics
i) Geometry
ii) Logic
iii) Integral Calculus
iv) Proving Theorems
3. Expert Task
a) Engineering
i) Design
ii) Fault Finding
iii) Manufacturing Planning
b) Scientific Analysis
c) Medical Diagnosis
d) Financial Analysis

AI Techniques

a) Search (possible moves in chess)


b) Pattern Recognition (Face Recognition, Fingerprint Recognition, Character Recognition
etc.)
c) Representation (In the form of Mathematical Logic)
d) Inference ( Reasoning or Conclusion drawn from facts)
e) Common sense Knowledge and reasoning (eg. Ram is playing Cricket)
f) Learning from Experience (bcos of knowledge base)
g) Heuristics (to discover something embedded in a program)
h) Planning (it is strategy or just a sequence of actions like algorithm)
i) Genetic Programming (A technique for getting program to solve a task by mating random

Nimish Kumar
LISP program and selecting fittest in million of generations)
j) Epistemology (This is the kind of knowledge that is required for solving problems in the
real world means different kind of logics)

Fields of AI

1. Expert System
2. Natural Language Processing (NLP)
3. Speech and Voice Understanding
4. Robotics and sensory system
5. Computer Vision (Interpretate scenarios)
6. Neural Computing
7. Automatic Programming (Create special programs that act as intelligent)
8. Genetic Algorithm
9. Fuzzy Logic

Before starting production system consider an example


To sort a string composed of letters a, b and c. string given is c b a c a
Solution: Production Set
Rule:
1. ba ab
2. ca ac
3. cb bc

Iteration Working Memory Conflict Set Rule Fired


0 cbaca 1, 2, 3 1

1 cabca 2 2

2 acbca 2, 3 2

3 acbac 1, 3 1

4 acabc 2 2

5 aacbc 3 3

6 aabcc NULL HALT

Problem Definition
1. Initial State: From where the program starts
2. Operator or Successor Function: A description of the possible actions available to
solve the problem.
<action, successor>
Here successor is the state that can be reached from current state by applying the action
(operator).

Nimish Kumar
3. State Space: All state space reachable from initial state by any sequence of actions.
4. Path: Sequence through state space.
5. Path cost function: Assigns numeric cost to each path. Path cost is measured by means
of step cost that is cost of taking an action A to go from state C to state Y and is denoted
as C ( C, A, Y)
6. Goal test: Determines whether a given state is a goal state or not.

Production System
Production systems are applied to problem solving programs that perform a wide range of
searches.
Composed of 5 parts:
1. A set of production Rule: Production rules are conditional if-then branches (condition
action pair)
WHEN (condition) IS SATISFIED Perform
2. Working Memory: It contains the description of the current state. Here the given pattern
is matched against the condition part of a production to select appropriate problem
solving action.
3. Global database: It is the systems short term memory. These are the collections of the
facts that are to be analyzed. Working memory is also the part of global database.
4. Control Strategy: The order in which the rules are to be compared to the database and
resolves conflicts that arises when several rules match at once.
5. Rule Applier: It applies the rule after the satisfaction of the condition in rule and update
the working memory.

Working Memory Match pattern C1 A1 C1 Conflict Set


A1 Action
Pattern
C1 A1

Cn An If matched conflict resolution

Fig. A production system: Controls loops until working memory pattern no longer matches the
conditions of any production.

Process terminates when the contents of working memory do not match any rule condition. This
process is known as recognize act cycle. The pure production system model has no mechanism
for recovering from dead ends, the only solution is backtracking.

Categories of Production System


1. Monotonic Production System
2. Partially Commutative Production System
3. Non Monotonic Production System
4. Commutative Production System

Nimish Kumar
Production System Type Monotonic Non Monotonic
Partially Commutative Theorem Proving (Ignorable Robot Navigation (Order of
Problems) Operation is not critical)
Non Partially Commutative Chemical Synthesis Bridge (Many Search State)
(Irreversible Changes Occurr)

Characteristics of production system


1. Simplicity
2. Modification
3. Flexibility
4. Language Independence
5. A Plausible Model of Human Problem Solving
6. A Natural Mapping
7. Modularity of Production Rules
8. Separation of Knowledge and Control

State Space: A set of all possible states for a given problem is known as state space of the
problem.

Problems

A water Jug Problem


You are given two jugs, 4 gallon and 3 gallon neither has any measuring marks on it. There is a
pump that can be used to fill the jugs with water. How can you get exactly two gallons of water
into the four gallon jug.

Solution:
State Space (x, y) where x = 0, 1, 2, 3 and 4
and y = 0, 1, 2 and 3
Here x represents the no of gallon of water in 4 gallon Jug and
y represents the no of gallon of water in 3 gallon Jug

Initial State <x, y> = <0, 0>


Goal State <x, y> = <2, n>

Production Rules
1. (x, y)  (4, y) Fill the 4 gallon Jug
if x < 4

2. (x, y)  (x, 3) Fill the 3 gallon Jug


if y < 3

3. (x, y)  (x-d, y) pour some water out of 4 gallon Jug


if x > 0

Nimish Kumar
4. (x, y)  (x, y-d) pour some water out of 3 gallon Jug
if y > 0

5. (x, y)  (0, y) Empty the 4 gallon Jug on the ground


if x > 0

6. (x, y)  (x, 0) Empty the 3 gallon jug on the ground


if y > 0

7. (x, y)  (4, y-(4-x)) Pour water from the 3 gallon Jug into the 4
if x+y >= 4 & y > 0 gallon Jug until the 4 gallon Jug is full

8. (x, y)  (x – (3-y), 3) Pour water from the 4 gallon Jug into the 3
if x+y >= 3 & x > 0 gallon Jug until the 3 gallon Jug is full

9. (x, y)  (x+y, 0) Pour all water from the 3 gallon Jug into the
if x+y < =4 & y > 0 4 gallon Jug

10. (x, y)  (0, x+y) Pour all water from the 4 gallon Jug into the
if x+y <= 3 & x > 0 3 gallon Jug

Control Strategy

Water in 4 gallon Jug Water in 3 gallon Jug Rule Applied


0 0 2
0 3 9
3 0 2
3 3 7
4 2 5
0 2 9
2 0

Husband Wife Problem or Missionary and Cannibal Problem or Tiger, Goat and Grass
Problem

Three couple wants to cross a river but the condition imposed is that either Husband and Wife
should travel together or two Husband or two Wife can travel together in a boat or a single
Husband and a single Wife can travel alone. There should be no mismatch among them. There is
a condition that the number of Wife’s should never be less than husbands as they don’t trust each
other.

Solution:

State Space
Let H1  Husband1

Nimish Kumar
H2  Husband2
H3  Husband3
W1  Wife1
W2  Wife2
W3  Wife3

Bank1 Bank2
Initial State: H1W1 H2W2 H3W3 --------
Final State: -------- H1W1 H2W2 H3W3

Action: Transfer < >

Production Rules
1. Transfer < Hi, Wi >
2. Transfer < Hi, Hj >
3. Transfer < Wi, Wj >
4. Transfer < Hi, - >
5. Transfer < Wi, - >

Where i, j <= 3

Control Strategy

Bank1 Bank2 Initial State

H1W1 H2W2 H3W3 --------

H2W2 H3W3  H1W1 1

W1H2 W2H3 W3  H1 5

W1W2W3  H1H2H3 2

H1W1 W2W3  H2H3 4

H1W1  H2W2 H3W3 3

H1W1 H2W2  H3W3 1

H1H2  W1W2 H3W3 3

H1H2H3  W1W2W3 2

H1  W1 H2W2 H3W3 2

H1W1  H2W2 H3W3 5

Nimish Kumar
--------  H1W1 H2W2 H3W3 1

8 Puzzel Problem

2 8 3 1 2 3
1 6 4 8 4
7 5 7 6 5

Initial State Goal State

Action: move < >


Production Rules:
1. move < blank, Up >
2. move < blank, Down >
3. move < blank, Right >
4. move < blank, Left >
*Here heuristic applied is h(n)= No. of misplaced tiles
Control Strategy

Nimish Kumar
1. Expert System
What is Expert System?

• An expert system is an interactive computer-based decision tool that uses both facts and
heuristics to solve difficult decision making problems, based on knowledge acquired from an
expert.

• An expert system is a model and associated procedure that exhibits, within a specific domain, a
degree of expertise in problem solving that is comparable to that of a human expert.

• An expert system compared with traditional computer:

Inference engine + Knowledge = Expert system

(Algorithm + Data structures = Program in traditional computer)

• First expert system, called DENDRAL, was developed in the early 70’s at Stanford University.

1.1 Expert System Components And Human Interfaces

Expert systems have a number of major system components and interface with individuals who
interact with the system in various roles. These are illustrated below.

Nimish Kumar
Components and Interfaces

Knowledge base: A declarative representation of the expertise; often in IF THEN rules

Working storage: The data which is specific to a problem being solved;

Inference engine: The code at the core of the system which derives recommendations from the
knowledge base and problem- specific data in working storage;

User interface: The code that controls the dialog between the user and the system.

Roles of Individuals who interact with the system

Domain expert: The individuals who currently are experts in solving the problems; here the
system is intended to solve.

Knowledge engineer: The individual who encodes the expert’s knowledge in a declarative
form that can be used by the expert system.

User: The individual who will be consulting with the system to get advice which would have
been provided by the expert.

Expert System Shells

Many expert systems are built with products called expert system shells. A shell is a piece of
software which contains the user interface, a format for declarative knowledge in the knowledge
base, and an inference engine. The knowledge and system engineers uses these shells in making
expert systems.

Knowledge engineer: uses the shell to build a system for a particular problem domain.

System engineer: builds the user interface, designs the declarative format of the knowledge base,
and implements the inference engine.

1.2 Expert System Characteristics

Expert system operates as an interactive system that responds to questions, asks for clarifications,
makes recommendations and generally aids the decision-making process.

Expert systems have many Characteristics:

Nimish Kumar
 Operates as an interactive system

This means an expert system:

 Responds to questions

 Asks for clarifications

 Makes recommendations

 Aids the decision-making process

 Tools have ability to filter knowledge

 Storage and retrieval of knowledge

 Mechanisms to expand and update knowledge base on a continuing basis

 Make logical inferences based on knowledge stored

 Simple reasoning mechanisms is used

 Knowledge base must have means of exploiting the knowledge stored, else it is useless;
e.g., learning all the words in a language, without knowing how to combine those words to
form a meaningful sentence.

 Ability to Explain Reasoning

 Remembers logical chain of reasoning; therefore user may ask for explanation of a
recommendation factors considered in recommendation

 Enhances user confidence in recommendation and acceptance of expert system

 Domain-Specific

 A particular system caters a narrow area of specialization; e.g., a medical expert system
cannot be used to find faults in an electrical circuit.

 Quality of advice offered by an expert system is dependent on the amount of knowledge


stored.

 Capability to assign Confidence Values

 Can deliver quantitative information

 Can interpret qualitatively derived values

 Can address imprecise and incomplete data through assignment of confidence values

Nimish Kumar
 Applications

 Best suited for those dealing with expert heuristics for solving problems

 Not a suitable choice for those problems that can be solved using purely numerical
techniques.

 Cost-Effective alternative to Human Expert

 Expert systems have become increasingly popular because of their specialization,


though in a narrow field.

 Encoding and storing the domain-specific knowledge is economic process due to


small size.

 Specialists in many areas are rare and the cost of consulting them is high; an expert
system of those areas can be useful and cost-effective alternative in the long run.

1.3 Expert System Features

The features which commonly exist in expert systems are:

 Goal Driven Reasoning or Backward Chaining


Goal-driven reasoning, or backward chaining, is an efficient way to solve problems. An
inference technique which uses IF-THEN rules to repetitively break a goal into smaller
sub-goals, which are easier to prove. The algorithm proceeds from the desired goal,
adding new assertions found.

Data  Rules  Conclusion


a=1 if a = 1 & b = 2 then c = 3, if c = 3 then d = 4, d=4
b=2

The knowledge is structured in rules which describe how each of the possibilities might be
selected. The rule breaks the problem into sub-problems.
Example:
KB contains Rule set:
Rule 1: If A AND C Then F
Rule 2: If A AND E Then G
Rule 3: If B Then E
Rule 4: If G Then D
Problem: prove
If A and B true Then D is true

 Coping with Uncertainty


Often the Knowledge is imperfect which causes uncertainty. The ability of the system to
reason with rules and data which are not precisely known. To work in the real world,

Nimish Kumar
Expert systems must be able to deal with uncertainty.
 One simple way is to associate a numeric value with each piece of information in the
system.
 The numeric value represents the certainty with which the information is known.
There are different ways in which these numbers can be defined, and how they are
combined during the inference process.

 Data Driven Reasoning or Forward Chaining


The data driven approach, or forward chaining, uses rules similar to those used for
backward chaining. An inference technique which uses IF-THEN rules to deduce a
problem solution from initial data. However, the inference process is different. The system
keeps track of the current state of problem solution and looks for rules which will move
that state closer to a final solution. The Algorithm proceeds from a given situation to a
desired goal, adding new assertions found.

Data  Rules  Conclusion


a=1 if a = 1 & b = 2 then c = 3, if c = 3 then d = 4, d=4
b=2

The knowledge is structured in rules which describe how each of the possibilities might be
selected. The rule breaks the problem into sub-problems.
Example:
KB contains Rule set:
Rule 1: If A AND C Then F
Rule 2: If A AND E Then G
Rule 3: If B Then E
Rule 4: If G Then D
Problem: prove
If A and B true Then D is true

 Data Representation
 The way in which the problem specific data in the system is stored and accessed
 Expert system is built around a knowledge base module.
 Knowledge acquisition is transferring knowledge from human expert to computer.
 Knowledge representation is faithful representation of what the expert knows.

No single knowledge representation system is optimal for all applications. The success of
expert system depends on choosing knowledge encoding scheme best for the kind of
knowledge the system is based on.
The IF-THEN rules, Semantic networks and Frames are the most commonly used
representation schemes.

 User Interface
That portion of the code which creates an easy to use system. The acceptability of
an expert system depends largely on the quality of the user interface.
 Scrolling dialog interface: It is easiest to implement and communicate with the

Nimish Kumar
user.
 Pop-up menus, windows, mice are more advanced interfaces and powerful tools
for communicating with the user; they require graphics support.

 Explanations
An important feature of expert systems is their ability to explain themselves. Given that
the system knows which rules were used during the inference process, the system can
provide those rules to the user as means for explaining the results. By looking at
explanations, the knowledge engineer can see how the system is behaving, and how the
rules and data are interacting. This is very valuable diagnostic tool during development.

2. Knowledge Acquisition

Knowledge acquisition includes the elicitation, collection, analysis, modeling and validation of
knowledge.

2.1 Issues in Knowledge Acquisition

The important issues in knowledge acquisition are:


 Knowledge is in the head of experts
 Experts have vast amounts of knowledge
 Experts have a lot of tacit knowledge
 They do not know all that they know and use
 Tacit knowledge is hard (impossible) to describe
 Experts are very busy and valuable people
 One expert does not know everything

2.2 Techniques for Knowledge Acquisition

The techniques for acquiring, analyzing and modeling knowledge are:


i) Protocol-generation techniques
Include many types of interviews, reporting and observational techniques.

ii) Protocol analysis techniques


Used with transcripts of interviews or text-based information to identify basic knowledge
objects within a protocol, such as goals, decisions, relationships and attributes. These act
as a bridge between the use of protocol-based techniques and knowledge modeling
techniques.

iii) Hierarchy-generation techniques


Involve creation, reviewing and modification of hierarchical knowledge. Hierarchy-
generation techniques, such as laddering, are used to build taxonomies or other
hierarchical structures such as goal trees and decision networks. The Ladders are of
various forms like concept ladder, attribute ladder, composition ladders.

iv) Matrix-based techniques

Nimish Kumar
Involve the construction and filling-in a 2-D matrix (grid, table), indicating such things, as
may be, for example, between concepts and properties (attributes and values) or between
problems and solutions or between tasks and resources, etc. The elements within the
matrix can contain: symbols (ticks, crosses, and question marks), colors, numbers, and
text.

v) Sorting techniques
Used for capturing the way people compare and order concepts; it may reveal knowledge
about classes, properties and priorities.

vi) Limited-information and constrained-processing tasks


Techniques that either limit the time and/or information available to the expert when
performing tasks. For example, a twenty-question technique provides an efficient way of
accessing the key information in a domain in a prioritized order.

vii) Diagram-based techniques


Include generation and use of concept maps, state transition networks, event diagrams and
process maps. These are particularly important in capturing the "what, how, when, who
and why" of tasks and events.

3. Knowledge Base (Representing and Using Domain Knowledge)

Expert system is built around a knowledge base module. Expert system contains a formal
representation of the information provided by the domain expert. This information may
be in the form of problem-solving rules, procedures, or data intrinsic to the domain. To
incorporate this information into the system, it is necessary to make use of one or more
knowledge representation methods. Some of these methods are:

Transferring knowledge from the human expert to a computer is often the most difficult
part of building an expert system.

The knowledge acquired from the human expert must be encoded in such a way that it
remains a faithful representation of what the expert knows, and it can be manipulated by a
computer.

Three common methods of knowledge representation evolved over the years are IF-THEN
rules ,Semantic networks and Frames.

3.1 IF-THEN rules

Human experts usually tend to think along:


condition  action or situation  conclusion

Rules "if-then" are predominant form of encoding knowledge in expert systems. These
are of the form:

Nimish Kumar
if a1 , a2 , . . . . . , an

then b1 , b2 , . . . . . , bn where
each ai is a condition or situation, and
each bi is an action or a conclusion.

3.2 Semantic Networks


In this scheme, knowledge is represented in terms of objects and relationships between
objects.

The objects are denoted as nodes of a graph. The relationships between two objects are
denoted as a link between the corresponding two nodes.

The most common form of semantic networks uses the links between nodes to represent
IS-A and HAS relationships between objects.

Example of Semantic Network

The Fig. below shows a car IS-A vehicle; a vehicle HAS wheels.
This kind of relationship establishes inheritance hierarchies in the network, with the
objects lower down in the network inheriting properties from the objects higher up.

Nimish Kumar
3.3 Frames
In this technique, knowledge is decomposed into highly modular pieces called frames,
which are generalized record structures.
Knowledge consists of concepts, situations, attributes of concepts, relationships between
concepts, and procedures to handle relationships as well as attribute values.

 Each concept may be represented as a separate frame.


 The attributes, the relationships between concepts and the procedures are allotted to
slots in a frame.
 The contents of a slot may be of any data type - numbers, strings, functions or
procedures and so on.
 The frames may be linked to other frames, providing the same kind of inheritance as
that provided by a semantic network.

A frame-based representation is ideally suited for objected-oriented programming


techniques.
Example: Frame-based Representation of Knowledge.
Two frames, their slots and the slots filled with data type are shown.
Frame Car

Inheritance Slot Is-A

Value Vehicle

Attribute Slot Engine

Value Vehicle

Value 1

Value

Attribute Slot Wheels

Value 4

Value

Value

Attribute Slot Battery

Value 1

Value

Value

Nimish Kumar
Frame Car

Inheritance Slot Is-A

Value Car

Attribute Slot Make

Value Honda

Value

Value

Attribute Slot Year

Value 1989

Value

Value

Attribute Slot

Value

Value

Value

4. Working Memory
Working memory refers to task-specific data for a problem. The contents of the working
memory, changes with each problem situation. Consequently, it is the most dynamic
component of an expert system, assuming that it is kept current.
 Every problem in a domain has some unique data associated with it.
 Data may consist of the set of conditions leading to the problem, its parameters and so on.
 Data specific to the problem needs to be input by the user at the time of using, means
consulting the expert system. The Working memory is related to user interface.
Fig. shows how Working memory is closely related to user interface of the expert system.

Nimish Kumar
5. Inference Engine
The inference engine is a generic control mechanism for navigating through and manipulating
knowledge and deduce results in an organized manner. The inference engine's generic
control mechanism applies the axiomatic (self-evident) knowledge present in the knowledge
base to the task-specific data to arrive at some conclusion.
 Inference engine the other key component of all expert systems.
 Just a knowledge base alone is not of much use if there are no facilities for navigating
through and manipulating the knowledge to deduce something from knowledge base.
 A knowledge base is usually very large, it is necessary to have inferencing mechanisms
that search through the database and deduce results in an organized manner.

The forward chaining, backward chaining and Tree searches are some of the techniques used for
drawing inferences from the knowledge base.
5.1 Forward Chaining Algorithm

Forward chaining is a technique for drawing inferences from Rule base. Forward-chaining
inference is often called data driven.
 The algorithm proceeds from a given situation to a desired goal, adding new assertions
(facts) found.
 A forward-chaining, system compares data in the working memory against the conditions
in the IF parts of the rules and determines which rule to fire.
 Data Driven

Data  Rules  Conclusion


a=1 if a = 1 & b = 2 then c = 3,
b=2 if c = 3 then d = 4 d=4

Example: Forward Channing

Given: A Rule base contains following Rule set


Rule 1: If A AND C Then F
Rule 2: If A AND E Then G
Rule 3: If B Then E
Rule 4: If G Then D

Problem: Prove, If A and B true Then D is true


Solution:
i) Start with input given A, B is true and then
 Start at Rule 1 and go forward/down till a rule “fires'' is found.

First iteration:
ii) Rule 3 fires: conclusion E is true
*new knowledge found
iii) No other rule fires;
*end of first iteration.

Nimish Kumar
iv) Goal not found;
*new knowledge found at (ii);
*go for second iteration

Second iteration:
(v) Rule 2 fires: conclusion G is true
*new knowledge found
(vi) Rule 4 fires: conclusion D is true
*Goal found;
*Proved

5.2 Backward Chaining Algorithm


Backward chaining is a techniques for drawing inferences from Rule base. Backward-
chaining inference is often called goal driven.
 The algorithm proceeds from desired goal, adding new assertions found.
 A backward-chaining, system looks for the action in the THEN clause of the rules that
matches the specified goal.
 Goal Driven

Data  Rules  Conclusion


a=1 if a = 1 & b = 2 then c = 3,
b=2 if c = 3 then d = 4 d=4
Example : Backward Channing
Given : Rule base contains following Rule set
Rule 1: If A AND C Then F
Rule 2: If A AND E Then G
Rule 3: If B Then E
Rule 4: If G Then D
Problem : Prove If A and B true Then D is true
Solution
(i) Start with goal i.e. D is true
*go backward/up till a rule "fires'' is found.

First iteration:
(ii) Rule 4 fires :
*new sub goal to prove G is true
*go backward
(iii) Rule 2 "fires''; conclusion: A is true
*new sub goal to prove E is true
*go backward;
(iv) No other rule fires; end of first iteration.
*new sub goal found at (iii);
*go for second iteration

Second iteration:
(v) Rule 3 fires:

Nimish Kumar
*conclusion B is true (2nd input found)
*both inputs A and B ascertained
*Proved

5.3 Tree Searches


Often a knowledge base is represented as a branching network or tree. Many tree searching
algorithms exists but two basic approaches are depth-first search and breadth-first search.
i) Depth-First Search
 Algorithm begins at initial node
 Check to see if the left-most below initial node (call node A) is a goal node.
 If not, include node A on a list of sub-goals outstanding.
 Then starts with node A and looks at the first node below it, and so on.
 If no more lower level nodes, and goal node not reached, then start from last node on
outstanding list and follow next route of descent to the right.
ii) Breadth-First Search
 Algorithm starts by expanding all the nodes one level below the initial node.
 Expand all nodes till a solution is reached or the tree is completely expanded.
 Find the shortest path from initial assertion to a solution.

6. Expert System Shells


An Expert system shell is a software development environment. It contains the basic
components of expert systems. A shell is associated with a prescribed method for building
applications by configuring and instantiating these components.

6.1 Shell components and description


The generic components of a shell: the knowledge acquisition, the knowledge Base, the
reasoning, the explanation and the user interface are shown below. The knowledge base and
reasoning engine are the core components.
Expert System Shell

 Knowledge Base
A store of factual and heuristic knowledge. Expert system tool provides one or more
knowledge representation schemes for expressing knowledge about the application
domain. Some tools use both Frames (objects) and rules. In the IF-THEN PROLOG

Nimish Kumar
knowledge is represented as logical statements.
 Reasoning Engine
Inference mechanisms for manipulating the symbolic information and knowledge in the
knowledge base form a line of reasoning in solving a problem. The inference mechanism
can range from simple modus ponens backward chaining of IF-THEN rules to Case-Based
reasoning.
 Knowledge Acquisition subsystem
A subsystem to help experts in build knowledge bases. However, collecting knowledge,
needed to solve problems and build the knowledge base, is the biggest bottleneck in
building expert systems.
 Explanation subsystem
A subsystem that explains the system's actions. The explanation can range from how the
final or intermediate solutions were arrived at justifying the need for additional data.
 User Interface
A means of communication with the user. The user interface is generally not a part of the
expert system technology. It was not given m uch attention in the past. However, the user
interface can make a critical difference in the perceived utility of an Expert system.

7. Explanation
Most expert systems have explanation facilities that allow the user to ask questions - why and
how it reached some conclusion .
The questions are answered by referring to the system goals, the rules being used, and existing
problem solving. The rules typically reflect empirical, or "compiled" knowledge. They are
codes of an expert's rules of thumb, not the expert's deeper understanding.
Example :
Dialog with an expert system designed to give advice on car problems.
System Does the car start ?
User No.

System Does the engine turn over ?


User Yes.
System Do you smell gas ?
User Yes
System Recommendation - Wait 5 minutes and try again.
User Why ?
System I used the rule:
If not start, and engine_turn_over, and smell_gas
Then recommendation is 'Wait 5 minutes and try again'
User

Note: The rule gives the correct advice for a flooded car, and knows the questions to be
ask to determine if the car is flooded, but it does not contain the knowledge of what a
flooded car is and why waiting will help.
Types of Explanation
There are four types of explanations commonly used in expert systems.

Nimish Kumar
 Rule trace reports on the progress of a consultation;
 Explanation of how the system reached to the given conclusion;
 Explanation of why the system did not give any conclusion.
 Explanation of why the system is asking a question;

8. Application of Expert Systems

The Expert systems have found their way into most areas of knowledge work. The applications of
expert systems technology have widely proliferated to industrial and commercial problems, and
even helping to plan NASA the maintenance of a space shuttle for its next flight.
Diagnosis and Troubleshooting of Devices and Systems
Medical diagnosis was one of the first knowledge areas to which Expert system
technology was applied in 1976. However, the diagnosis of engineering systems quickly
surpassed medical diagnosis.
 Planning and Scheduling
The Expert system's commercial potential in planning and scheduling has been recognized
as very large. Examples are airlines scheduling their flights, personnel, and gates; the
manufacturing process planning and job scheduling.
 Configuration of Manufactured Objects from sub-assemblies
Configuration problems are synthesized from a given set of elements related by a set of
constraints. The Expert systems have been very useful to find solutions. For example,
modular home building and manufacturing involving complex engineering design.
 Financial Decision Making
The financial services are the vigorous user of expert system techniques. Advisory
programs have been created to assist bankers in determining whether to make loans to
businesses and individuals. Insurance companies to assess the risk presented by the
customer and to determine a price for the insurance. ES are used in typical applications in
the financial markets / foreign exchange trading.
 Knowledge Publishing
This is relatively new, but also potentially explosive area. Here the primary function of the
Expert system is to deliver knowledge that is relevant to the user's problem. The two most
widely known Expert systems are : one, an advisor on appropriate grammatical usage in
a text; and the other, is a tax advisor on tax strategy, tactics, and individual tax policy.
 Process Monitoring and Control
Here Expert system does analysis of real-time data from physical devices, looking for
anomalies, predicting trends, controlling optimality and failure correction. Examples of
real-time systems that actively monitor processes are found in the steel making and oil
refining industries.
 Design and Manufacturing
Here the Expert systems assist in the design of physical devices and processes, ranging
from high-level conceptual design of abstract entities all the way to factory floor
configuration of manufacturing processes.

Nimish Kumar

You might also like