NeuralNetworks 1
NeuralNetworks 1
Introduction to AI
Andrew Parkes
Neural Networks 1
Neural Networks
• AIMA
– Section 20.5 of 2003 edition
• Fundamentals of Neural Networks :
Architectures, Algorithms and
Applications. L, Fausett, 1994
• An Introduction to Neural Networks
(2nd Ed). Morton, IM, 1995
Brief History
• Try to create artificial intelligence
based on the natural intelligence
we know:
• The brain
– massively interconnected neurons
G51IAI Neural Networks
Neural Networks
Natural Neural Networks
• Signals “move” via electrochemical
signals
• The synapses release a chemical
transmitter – the sum of which can
cause a threshold to be reached –
causing the neuron to “fire”
• Synapses can be inhibitory or
excitatory
Natural Neural Networks
• We are born with about 100 billion
neurons
Modelling a Neuron
Activation Functions
2
X2 Y
-1
X3
2
X2 Y
-1
X3
2
X2 Y
-1
X3
2
X2 Y
-1
For the network shown here the activation
X3
function for unit Y is
2
X2 Y
-1
X3
Originally, all excitatory connections into a
particular neuron have the same weight,
although different weighted connections can
be input to different neurons
2
X2 Y
-1
X3
Each neuron has a fixed threshold. If the net
input into the neuron is greater than or equal
to the threshold, the neuron fires
G51IAI Neural Networks
2
X2 Y
-1
X3
The threshold is set such that any non-zero
inhibitory input will prevent the neuron from
firing
Building Logic Gates
• Computers are built out of “logic gates”
1
AND
X1
X1 X2 Y
Y
1 1 1
X2 1
1 0 0
AND Function
0 1 0
0 0 0
Threshold(Y) = 2
G51IAI Neural Networks
Threshold(Y) = 2
G51IAI Neural Networks
Threshold(Y) = 2
G51IAI Neural Networks
Simple Networks
AND OR NOT
Input 1 0 0 1 1 0 0 1 1 0 1
Input 2 0 1 0 1 0 1 0 1
Output 0 0 0 1 0 1 1 1 1 0
G51IAI Neural Networks
Simple Networks
-1
W = 1.5
x t = 0.0
W=1
y
G51IAI Neural Networks
Perceptron
• Synonym for Single-
Layer, Feed-
Forward Network
• First Studied in the
50’s
• Other networks were
known about but the
perceptron was the
only one capable of
learning and thus all
research was
concentrated in this
area
G51IAI Neural Networks
Perceptron
• A single weight only
affects one output so
we can restrict our
investigations to a
model as shown on
the right
• Notation can be
simpler, i.e.
O Step 0 j WjIj
G51IAI Neural Networks
AND XOR
Input 1 0 0 1 1 0 0 1 1
Input 2 0 1 0 1 0 1 0 1
Output 0 0 0 1 0 1 1 0
G51IAI Neural Networks
0,0 1,0
1,0
0,0
AND XOR
X1 Z1
2
XOR
-1
Y X1 X2 Y
-1
1 1 0
Z2
X2
2
1 0 1
2
0 1 1
XOR Function
0 0 0