Beruflich Dokumente
Kultur Dokumente
INTRODUCTION
TO
ARTIFICIAL INTELLIGENCE
Encyclopedia Britannica:
Jan 2, 2014
2
Artificial Intelligence???
Elaine Rich
Jan 2, 2014
3
The Differences Between Us and Them
Emotions
Understanding
Consciousness
4
Jan 2, 2014
AI is the branch of computer science concerned with making
computers behave like humans.
5
Jan 2, 2014
Artificial intelligence includes
games playing: programming comps to play games sa chess
expert systems : programming comps to make decisions in real-
life situations (e.g some expert systems help doctors diagnose
diseases based on symptoms)
natural language : programming comps to understand natural
human languages
neural networks : Systems that simulate intelligence by
attempting to reproduce the types of physical connections that
occur in animal brains
robotics : programming comps to see & hear & react to other
sensory stimuli
6
Jan 2, 2014
Discipline that systematizes and automates reasoning
processes to create machines that:
Jan 2, 2014
7
Major Branches of AI
Jan 2, 2014
8
Currently, no computers exhibit full artificial intelligence (that
is, are able to simulate human behavior).
The greatest advances have occurred in the field of games
playing.
Deep Blue?
Jan 2, 2014
9
Behind the success
The system derived its playing strength mainly out of brute
force computing power.
It was a massively parallel, with 30 nodes, with each node
containing a 120 MHz.
Its chess playing program was written in C and ran under the
AIX operating system.
It was capable of evaluating 200 million positions per second,
twice as fast as the 1996 version.
The Deep Blue chess computer that defeated Kasparov in
1997 would typically search to a depth of between six and
eight moves to a maximum of twenty or even more moves in
some situations.
Jan 2, 2014
10
Things to be Done to build a system to solve a
problem
Jan 2, 2014
13
E.g. Water Jug Problem
We give you two jugs with a maximum capacity of 4-
litre and 3-litre each and a pump to fill each of the jugs.
Neither have any measuring markers on it. Now your
job is to get exactly 2 litres of water into the
4-litre jug. How will you do that? How will you define
the state space?
The state space can be described as the set of ordered pairs of integers
(x, y), viz. x = 0, 1, 2, 3, or 4 and y = 0, 1,2, or 3; where x and y represent the
quantity of water in the 4-litre jug and 3-litre jug respectively.
Jan 2, 2014
14
Production rules for Water Jug Problem
Sl Current state Next State Description
No
1 (x,y) if x < 4 (4,y) Fill the 4 litre jug
2 (x,y) if y <3 (x,3) Fill the 3 litre jug
3 (x,y) if x > 0 (x-d, y) Pour some water out of the 4 litre jug
4 (x,y) if y > 0 (x, y-d) Pour some water out of the 3-litre jug
5 (x,y) if x>0 (0, y) Empty the 4 litre jug
6 (x,y) if y >0 (x,0) Empty the 3 litre jug on the ground
7 (x,y) if x+y >= 4 & y >0 (4, y-(4-x)) Pour water from the 3 litre jug into the 4 litre jug until the
4-litre jug is full
8 (x, y) if x+y >= 3 & x>0 (x-(3-y), 3) Pour water from the 4-litre jug into the 3-litre jug until the 3-
What other litre
rules can
jug is full we have?
9 (x, y) if x+y <=4 & y>0 (x+y, 0) Pour all the water from the 3-litre jug into the 4-litre jug
10 (x, y) if x+y <= 3 & x>0 (0, x+y) Pour all the water from the 4-litre jug into the 3-litre jug
11 (0,2) (2,0) Pour the 2 litres from 3-litre jug into the 4-litre jug
12
Jan 2, 2014 (2,y) (0,y) Empty the 2 litres in the 4-litre jug on the ground 15
Find a sequence of rules to solve the water jug problem
Required a control structure that loops litres in litres in Rule
through a simple cycle in which some the 4-litre the 3-litre applied
rule whose left side matches the current jug jug
state is chosen, the appropriate change
to the state is made as described in the 0 0 2
corresponding right side, and the 0 3 9
resulting state is checked to see if it
corresponds to goal state. 3 0 2
3 3 7
One solution to the water jug problem
4 2 5 or 12
Shortest such sequence will have a
impact on the choice of appropriate 0 2 9 or 11
mechanism to guide the search for 2 0
solution.
Jan 2, 2014
16
A Production system consists of:
A set of rules, each consisting of a LHS that determines the
applicability of the rule and a RHS that describes the operation
to be performed if the rule is applied.
A rule applier
17
Jan 2, 2014
A Heuristic is a technique that improves the efficiency of a search process,
possibly by sacrificing claims of completeness.
On the average they improve the quality of the paths that are explored.
Using Heuristics, we can hope to get good (though possibly non-optimal)
solutions to hard problems such as Travelling Salesman Problem in non
exponential time.
There are good general purpose heuristics that are useful in a wide variety of
problem domains.
Jan 2, 2014
19
Consider the problem of answering questions based on a database of simple
facts. E.g.
Different reasoning
paths lead to the
answer. It does not
matter which path
we follow.
Jan 2, 2014
20
Cryptarithmetic
Solve
SEND + MORE = MONEY
SEND
9 5 6 7
+ MORE
1 0 8 5
---------
MONEY
1 0 6 52
Jan 2, 2014
21
It is a problem-solving technique that
It addresses the systematically explores a space of
problem of capturing problem states, i.e., successive and
in a language, i.e., one alternative stages in the problem-solving
suitable for computer process.
manipulation, the full Examples of problem states might include
range of knowledge the different board configurations in a
required for game or intermediate steps in a reasoning
intelligent behavior. process. This space of alternative solutions
is then searched to find an answer.
Jan 2, 2014
22
|| Shri Hari ||
How???
Knowledge Representation
Jan 5, 2013
23
Jan 5, 2013
24
Jan 5, 2013
25
The human brain
associative memory
Brain : a computational machine? (contd.)
sensors
percepts
?
environment
agent
actuators actions
Jan 2, 2014
33
2. Automated Reasoning and Theorem Proving
Jan 2, 2014
34
3. Expert Systems
Jan 2, 2014
36
5. Planning and Robotics
Jan 2, 2014
40
Feb 4, 2013
41
Biological Neuron
Cell structures
Cell body
Dendrites
Axon
Synaptic terminals
Feb 4, 2013
42
1. Soma is a large, round central body in which almost all the logical functions of the neuron are
realized (i.e. the processing unit).
2. The axon (output), is a nerve fibre attached to the soma which can serve as a final output channel of
the neuron. An axon is usually highly branched.
Feb 4, 2013
43
Biological NN
The many dendrites receive signals from other neurons.
The signals are electric impulses that are transmitted across a synaptic gap by
means of a chemical process.
The action of the chemical transmitter modifies the incoming signal (typically,
by scaling the frequency of the signals that are received) in a manner similar to
the action of the weights in an artificial neural network.
The soma, or cell body sums the incoming signals. When sufficient input is
received, the cell fires; that is, it transmits a signal over its axon to other cells.
It is often supposed that a cell either fires or doesn't at any instant of time, so
that transmitted signals can be treated as binary
Feb 4, 2013
44
Several key features of the processing elements of ANN are suggested by the properties
of biological neurons
5. The output from a particular neuron may go to many other neurons (the
axon branches).
Feb 4, 2013
45
6. Information processing is local.
7. Memory is distributed:
a) Long-term memory resides in the neurons' synapses or weights.
b) Short-term memory corresponds to the signals sent by the
neurons.
8. A synapse's strength may be modified by experience.
9. Neurotransmitters for synapses may be excitatory or inhibitory.
Feb 4, 2013
46
ANNs vs. Computers
Digital Computers Artificial Neural Networks
No requirement of an explicit description of the
Analyze the problem to be solved
problem.
Deductive Reasoning. We apply known rules to Inductive Reasoning. Given i/p & o/p data
input data to produce output. (training examples), we construct the rules.
Computation is centralized, synchronous, and Computation is collective, asynchronous, and
serial. parallel.
Not fault tolerant. One transistor goes and it no Fault tolerant & sharing of responsibilities.
longer works.
Dynamic connectivity.
Static connectivity. Applicable if rules are unknown or complicated, or
if data are noisy or partial.
Applicable if well defined rules with precise
input data.
Feb 4, 2013
47
Components of ANN
A technical neural network consists of simple processing
units, the neurons, and directed, weighted connections
between those neurons. Here, the strength of a connection (or
the connecting weight) between two neurons i and j is referred to
as wi,j
Feb 4, 2013
48
Neurons
A NN consists of a large number of simple
processing elements called neurons.
Feb 4, 2013
49
Fan- in Property
The number of incoming edges into a node is not restricted by some upper bound.
This is called the unlimited fan-in property of the computing units.
Feb 4, 2013
50
Activation Functions at the
Computing Units
Normally very simple activation functions of one argument are used at the nodes.
This means that the incoming n arguments have to be reduced to a single numerical
value.
Therefore computing units are split into two functional parts:
an integration function g that reduces the n arguments to a single value and
the output or activation function f that produces the output of this node taking that
single value as its argument.
Usually the integration function g is the addition function.
1. Architecture
2. Training/Learning algorithm
3. Activation function
Feb 4, 2013
52
Typically, neurons in the same layer behave in the same manner.
To be more specific, in many neural networks, the neurons within a
layer are either fully interconnected or not interconnected at all.
Neural nets are often classified as single layer or multilayer.
The i/p units are not counted as a layer because they do not perform
any computation.
So, the no. of layers in the NN is the no. of layers of weighted inter-
conneted links between slabs of neurons.
Feb 4, 2013
53
Architecture Terms
Feed forward
When all of the arrows connecting unit to unit in a network move only
from input to output
Recurrent or feedback networks
Arrows feed back into prior layers
Hidden layer
Middle layer of units
Not input layer and not output layer
Hidden units
Nodes that are situated between the input nodes and the output
nodes.
Perceptron
A network with a single layer of weights
54
Feb 4, 2013
Single layer Net
A single-layer net has one layer of connection weights.
The units can be distinguished as input units, which receive signals
from the outside world, and output units, from which the response of
the net can be read.
Although the presented network
is fully connected, the true
biological neural network may
not have all possible connections
- the weight value of zero can be
represented as ``no connection".
Feb 4, 2013
55
Multi - layer Net
More complicated mapping problems may require a multilayer network.
A multilayer net is a net with one or more layers (or levels) of nodes (the so
called hidden units) between the input units and the output units.
Feb 4, 2013
56
Recurrent Net
Local groups of neurons can be connected in either,
a feedforward architecture, in which the network has no loops, or
a feedback (recurrent) architecture, in which loops occur in the network
because of feedback connections.
Feb 4, 2013
57
Feedforward and Feedback
Feb 4, 2013
58
Learning algorithms for NN
A learning algorithm is an adaptive method by which a network of
computing units self-organizes to implement the desired behavior.
This is done by presenting some examples of the desired input output
mapping to the network.
o A correction step is executed iteratively until the network learns to
produce the desired response.
The learning algorithm is a closed loop of presentation of examples
and of corrections to the network parameters
Feb 4, 2013
59
Classes of learning algorithms
1. Supervised
Supervised learning denotes a method in which some input vectors are collected
and presented to the network. The output computed by the network is observed
and the deviation from the expected answer is measured.
The weights are corrected according to the magnitude of the error in the way
defined by the learning algorithm.
This kind of learning is also called learning with a teacher, since a control process
knows the correct answer for the set of selected input vectors.
Feb 4, 2013
60
Classes of learning algorithms
2. Unsupervised
Unsupervised learning is used when, for a given input, the exact numerical output a
network should produce is unknown.
In this case we do not know a priori which unit is going to specialize on which
cluster. Generally we do not even know how many well-defined clusters are
present. Since no teacher is available, the network must organize itself in
order to be able to associate clusters with units.
Feb 4, 2013
61
Types of Supervised learning algorithms
1. Reinforcement learning
Used when after each presentation of an input-output example we only know
whether the network produces the desired result or not. The weights are
updated based on this information (that is, the Boolean values true or false) so
that only the input vector can be used for weight correction.
2. Learning with error correction
The magnitude of the error, together with the input vector, determines the
magnitude of the corrections to the weights, and in many cases we try to
eliminate the error in a single correction step.
Feb 4, 2013
62
Classes of learning algorithms
Feb 4, 2013
63
One of the most important aspects of Neural Network is the learning process.
Learning can be done in supervised or unsupervised training.
In supervised training, both the inputs and the outputs are provided.
o The network then processes the inputs and compares its resulting outputs against
the desired outputs.
o Errors are then calculated, causing the system to adjust the weights which control
the network.
o This process occurs over and over as the weights are continually tweaked.
In unsupervised training, the network is provided with inputs but not with desired
outputs.
o The system itself must then decide what features it will use to group the input
data.
Feb 4, 2013
64
|| Shri Hari ||
66
April 10, 2014
What is an ES?
Prof. Edward Feigenbaum of Stanford University, leading
researchers in ES has produced the following definition:
Easily deals with quantitative data Easily deals with qualitative data
72
April 10, 2014
5. Comprehensibility.
The system should be able to explain the steps of its reasoning while executing so that it is
understandable.
The systems should have an explanation capability in the same way that human experts are
suppose to be able to explain their reasoning.
6. Flexibility.
Because of the large amount of knowledge that an expert system may have, it is important to
have an efficient mechanism for modifying the knowledge base.
7. Symbolic Reasoning.
Expert systems represent knowledge symbolically as sets of symbols that stand for problems
concepts.
These symbols can be combined to express relationship between them. When these
relationship are represented in a program they are called symbol structures.
For example,
Assert: Damodar has a fever
Rule: IF person has fever THEN take Crocin
Conclusion: Damodar takes Crocin
LITHIAN
PUFF
Gives advice to archaeologists
Medical system
examining stone tools
for diagnosis of
respiratory conditions
DENDRAL Used to
identify the structure
of chemical
DESIGN ADVISOR compounds. First
Gives advice to used in 1965
designers of processor
chips
Rules are encoded in the genes, which are connected together into
long strings called chromosomes.
Each gene represents a specific trait of the organism and has several
different settings.
Crossover
This operator randomly chooses a locus and exchanges the
subsequences before and after that locus between two chromosomes
to create two offspring. For example, the strings 10000100 and
11111111 could be crossed over after the third locus in each to
produce the two offspring 10011111 and 11100100.
1 169 14.4
01101
2 11000 576 49.2
3 01000 64 5.5
X6 i 1 0 00 1 0 1 00 00 X2 i
X1 i 0
1 11 00 00 0 11 11 11 X5i
Uniform crossover
X2'i 0 1 0 1
0
X1'i 0
1 1 1 1 1 1 X1"i
The number of bits
X5'i 0 1 0
1 0
1 to be inverted
depends on the
X2i 0 1 0 0 1 0 X2"i Mutation
Probability.
X5i 0 1 1 1
X2i 0 1 0 0 1 0 X2"i
X5i 0 1 1 1
94
April 2007
TYPES AND MODELING OF UNCERTAINTY
95
April 2007
FUZZY vs PROBABILITY
Fuzzy Probability
96
April 2007
FUZZY vs PROBABILITY
97
April 2007
NEED OF FUZZY LOGIC
Based on intuition and judgment.
98
April 2007
CLASSICAL SETS (CRISP SETS)
{True, False}
{1, 0}
99
April 2007
CRISP SETS
100
April 2007
OPERATIONS ON CRISP SETS
UNION:
INTERSECTION:
COMPLEMENT:
DIFFERENCE:
101
April 2007
PROPERTIES OF CRISP SETS
The various properties of crisp sets are as follows:
102
April 2007
PROPERTIES OF CRISP SETS
103
April 2007
FUZZY SETS
104
April 2007
FUZZY SETS
105
April 2007
FUZZY SETS
106
April 2007
OPERATIONS ON FUZZY SETS
107
April 2007
PROPERTIES OF FUZZY SETS
108
April 2007
PROPERTIES OF FUZZY SETS
109
April 2007
PROPERTIES OF FUZZY SETS
110
April 2007
Thank You
Jan 5, 2013
111