Introduction To AI & Expert System
Introduction To AI & Expert System
Intelligence
functions that require the design of intelligent
intelligence when agents” (Poole et al. ,
performed by people” 1998)
(Kurzwell, 1990)
Overview of artificial intelligence (AI), problem
solving in AI, knowledge representation in AI, “The study of how to “AI is concerned with
search methods, predicate and propositional make computers do intelligent behavior in
logic, Formal symbolic logic, LISP and PROLOG things at which, at the artifacts” (Nilson, 1998)
moment, people are
basics, network representations of knowledge,
better” (Rich and
natural language study in AI (seminar I), Fuzzy Knight, 1991)
sets and Fuzzy logic, Expert systems, rule based
expert systems, nonproduction system I. Acting humanly-Turing Test approach
architectures, examples of expert systems. The Turing test was proposed by Alan Turing in
(Chapters 1,2,4,5,7,9,12 & 15 of Patterson; 1950. The Turing test measures the performance
Chapter 1-5 and 8 of Rich and Knight) of an intelligent machine against that of a human
being. In this test, a machine and a human being
1. Overview of Artificial Intelligence are allowed to interact with another human being
Definition of AI who is referred as the interrogator. The
Artificial intelligence may be defined as
interrogator is not able to see or speak directly to
the branch of computer science that is concerned
either of them. He may communicate with the
with the automation of intelligent behavior.
human being or machine solely by the use of a
The definitions of AI as per various books textual device such as a terminal. The interrogator
are shown in the table. The ones on top are is asked to distinguish the computer from the
concerned with thought processes and reasoning, human being on the basis of the answer to the
whereas the ones on the bottom address behavior. questions asked over the textual device. IF the
The definitions on the left measure success in interrogator cannot distinguish the machine from
terms of fidelity to human performance, whereas
the human, then, Turing argues, the machine may
the ones on the right measure against an ideal
concept of intelligence, which we will call be assumed to be intelligent.
rationality. A system is rational if it does the
"right thing," given what it knows.
Systems that think like Systems that think rationally
human
“The exciting new effort “The study of mental
to make computers faculties through the use
think…machines with of computational models”
minds in the full and (Chamiak and
literal sense”
McDermott, 1985)
(Haugeland, 1985)
“[The automation of]
activities that we “The study of
associate with human computations that make it
thinking, activities such possible to perceive,
The computer would need to possess the
as decision making, reason and act.” (Winston,
problem solving, 1992) following capabilities
learning….” (Bellman, 1. natural language processing to enable it
1978) to communicate successfully in English
Systems that act like Systems that act rationally
humans
Search Algorithm
The notion of search is computation inside the
agent. The agent constructs a set of potential
partial solutions to a problem that can be checked
to see if they truly are solutions or if they could
lead to solutions. Search proceeds by repeatedly
selecting a partial solution, stopping if it a path to A directed graph
a goal, and otherwise extending it by one or more
arc in all possible ways.
A heuristic function is also needed that Where the two components g*(n) and
estimates the merits of each node generated. H*(n) are estimates of the cost (or distance)
from the start node to node n and cost from
4. Branch and Bound Search node n to a goal node, respectively. The
asterisks are used to designate estimate of
The branch and bound search strategy the corresponding true values f(n) = g(n) +
applies to problems having more than one h(n). For state space tree problems g*(n) =
alternative path existing between nodes. g(n) since there is only one path and for
This strategy saves all path lengths from a graphs there are alternative paths to the
node to all generated nodes and chooses the same node n.
shortest path for further expansion. It then
compares the new path lengths with all old The A* algorithm proceeds as follows
ones and again chooses the shortest path for
expansion. • Place the starting node s on open
• If open is empty, stop and return
• Place the start node of zero path failure
length on the queue • Remove from open the node n that
• Until the queue is empty or a goal has the smallest value of f*(n). If
node has been found (a) determine
Solution 1
4G 3G Rule
0 0
0 3 2
3 0 9 Two levels of BFS Tree
3 3 2 Continue process until some rule produces a goal
4 2 7 state.
0 2 5 Another systematic control strategy is
2 0 9 DFS.
Solution 2
0 0
4 0 1
1 3 8
1 0 6
0 1 10
4 1 1
2 3 8
Problem Tree in water jug problem
One systematic control strategy for water-jug
problem is to construct a tree with the initial
states as the roots. Continue the off-springs of the
root by applying each of the applicable rules to DFS Tree
the initial states. When a dead end which produces a previous state
is reached, backtracking occurs.
Search Graph Water-Jug problem
In search trees, the same node is generated more
than once. This is avoided in search graphs. In
this method, the set of new nodes created is
examined to see if the new node already exists or
not. If it doesn’t exist, it is added to the graph. In
One level of BFS tree the search graph, cycles are introduced. A cycle is
a path through the graph in which a given node
appears more than once.
In the graph drawn there are 2 cycles; 1st cycle
including (0,0) and (4,0) and a 2nd cycle including
the nodes (0,0) and (0,3). A search graph reduces
the effort that is spent to explore the same path
several times. But it requires additional effort
each time a node is generated to see if it has been
Append
Merges two or more lists into a single list
CAR and CDR can be combined to get any
element in a list. Consider the operation given
below
LAST
Returns a list containing the last element
7.1.4 Defining Functions, Predicates and Greaterp and lessp each take one or more
Conditionals arguments. If there is only one argument, each
returns t. If more than one argument is used,
The user can define a new function in LISP. For
greater returns t if they arguments, from left to
defining a new function, it requires three
right, successively larger; otherwise nil is
arguments: (1) the new function name (2) the
returned. Lessp requires that the arguments are
parameters of the function and (3) the function
successively smaller from left to right to return t.
body of LISP code which performs the desired
Otherwise it returns nil. The predicates >= and <=
function operation.
have the same meaning as greater and lessp
As an example, defining a new function named respectively, except they return t if successive
averagethree to compute the average of three elements are also equal. Finally listp and null
numbers both returns t if its argument evaluates to nil;
otherwise it returns nil.
->(defun averagethree (n1 n2 n3) (/(+ n1 n2
n3)3)) Conditional cond
PROLOG
PROLOG is the abbreviation for
“PROgramming in LOGic”. It was invented by
%predicates
can_reach(X, Y) : X can reach Y
dexterous(X) : X is dexterous animal
is_close(X,Y) : X is close to Y
can_climb(X, Y) : X can get on the top of Y
under(X, Y) : X is under Y
in_room(X) : X is in the room
can_move(X,Y,Z) : X can move Y near Z
%axioms
▪ Atoms and numbers %in_room(monkey)
%in_room (bananas)
%in_room(chair)
8. Network representation of
Syntax and semantics of associative networks
knowledge The syntax of the associative network is
For AI problems with a small knowledge mostly designer dependent and varies from one
base, there is no importance in grouping or implementer to another. Most network systems
ordering of the knowledge. All the facts in the are based on PL or FOPL.
problem appear independently without any
linkage to other facts, even though they are The language of the associative network is
closely related. When the quantity of information formed from letters of the alphabet, relational
becomes large and more complex, the acquisition, symbols, set membership and subset symbols,
comprehension, use and maintenance of decimal digits, square and oval node and directed
knowledge can become difficult or even arcs. Nodes are used for objects or nouns and arcs
intractable. In such cases, some form of for relation. The direction of the arc is usually
knowledge structuring and organization become taken from the first to subsequent arguments as
necessary. Various schemes are used for they appear in a relational statement. Thus
structured representation of knowledge like OWNS(bob, house) would be written as
Associative networks, Frames, and scripts and
memory organization packets etc.
For example the sentence “Every car has (PIN (VALUE 695015)))
an engine” is written in Conceptual graph as
(<facet2><value1>…<valuek2>))
Inference can be accomplished by
modifying and combining graphs through the use .
of operators and basic graph inference rules.
Other important inference methods like Property .
inheritance and default reasoning are also (<slot2> (<facet1><value1>…<valuekm>))
possible with conceptual graphs. Heuristic
reasoning can also be accomplished within the .
theory of conceptual graphs. .)
Conceptual graph is an efficient means to It can be seen that a frame may have any
represent natural language statements accurately number of slots, and a slot may have any number
and to perform many form of inference found in of facets, each with any number of values.
common sense reasoning.
The slots in a frame specify general or
8.2 Frame structures specific characteristics of the entity for which the
Frames as data structure to represent a frame represents, and sometimes they include
mental model of stereotypical situation such as instructions on how to apply or use the slot
driving a car, attending a meeting, or eating in a values. Typically a slot contains information such
restaurant. Knowledge about an object or event is as attribute value pairs, default values, condition
stored together in memory as a unit. Then, when for filling a slot, pointers to other related frames,
a new situation is encountered, an appropriated and procedures that are activated when needed
frame is selected from memory for use in for different purposes.
reasoning about the situation.
Like associative network, frames are
Frames are general record like structures which usually linked together in a network through the
consists of a collection of slots and slot values. use of special pointers such as AKO (A Kind Of)
The slots may be of any size and type. Slots pointer. It is possible to implement property
Measure of Performance
There are systems based on different
learning methods and different architectures,
“To evaluate the performance of a given system”
or to compare the relative performance of two
Negation or Complement
given systems we use the following definitions
Let A be a fuzzy set defined in the space X.
for performance measure. These include
Then the fuzzy set B is a complement of 1. Generality: It is the measure of the ease with
the fuzzy set A, if and only if, for all x in the set the method can be adopted
X, B(x) = 1 - A(x). 2. Efficiency: It is the measure of the average
time required to construct the target
The complement of the fuzzy set A is knowledge structures from initial structures.
often denoted by A' or Ac or Ā 3. Robustness: It is the ability of a learning
system to function with unreliable feedback.
A = {(1, 1 ), (3, 0.9), (4, 0.6), (5, 0.4), (7, 0.2), (8, 0.1), (11,
0), (12, 0)} 4. Efficacy: It is the measure of overall power
A' = {(1, 0 ), (3, 0.1), (4, 0.4), (5, 0.6), (7, 0.8), (8, 0.9), of the system
(11, 1), (12, 1)} 5. Ease of implementation: This term relates to
the complexity of programs and data
structures required to develop the system.
Characteristic Features of Expert System The inference engine is the main processing
Expert Systems differ from conventional element of the expert system. The inference
computer systems in several ways engine chooses rules from the agenda to fire. If
there are no rules on the agenda, the inference
1. ES use knowledge rather than data engine must obtain information from the user in
2. Much of the knowledge is used is order to add more rules to the agenda. It makes
heuristic in nature (rather than algorithms) use of knowledge base, in order to draw
3. Knowledge is encoded and maintained as conclusions for situations. It is responsible for
an entity separate from control programs gathering the information from the user, by
4. ES are capable of explaining how a asking various questions and applying it wherever
particular conclusion was reached and necessary. It seeks information and relationships
why the required information is needed from the knowledge base and to provide answers,
during a consultation. predictions and suggestions the way a human
5. ES use symbolic representation for expert would.
knowledge and perform inference through
symbolic computations (iii) User Interfaces.
6. ES often reason with meta-knowledge i.e.
A user interface is the method by which the
they reason with knowledge about
expert system interacts with a user using
themselves and their own knowledge
interfaces such as editor, graphics, NLP,
limits and capabilities.
documentation etc.. These can be through dialog
boxes, command prompts, forms, or other input
methods. Some expert systems interact with other
computer applications, and do not interact
directly with a human.
☼☼☼☼☼☼☼☼☼☼☼☼☼☼☼☼
References
1. Artificial Intelligence, Rich
2. Introduction to artificial intelligence and
expert systems, pattenson
3. Artificial Intelligence a Modern
Approach, Stuart Russell and Peter
Norvig
4. Artificial Intelligence structure and
strategies for complex problem solving,