A hitchhiker’s guide to neuroevolution in Erlang
-
Upload
thoughtworks -
Category
Technology
-
view
1.263 -
download
2
Transcript of A hitchhiker’s guide to neuroevolution in Erlang
![Page 1: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/1.jpg)
J e r o e n S o e t e r s
NEUROEVOLUTIONA hitchhiker’s guide to neuroevolution in
Erlang.
![Page 2: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/2.jpg)
MEET GARY
2
![Page 3: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/3.jpg)
WHAT IS MACHINE LEARNING?
• Artificial Neural Networks • Genetic Algorithms
3
![Page 4: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/4.jpg)
ARTIFICIAL NEURAL NETWORKS
4
![Page 5: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/5.jpg)
BIOLOGICAL NEURAL NETWORKS
5
Dendrites
SomaAxon
Synapse
![Page 6: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/6.jpg)
A MODEL FOR A NEURON
6
Y
w1
w2
wn
x1
x2
xn
Dendrites Synapses Axon
Soma
![Page 7: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/7.jpg)
A MODEL FOR A NEURON
6
Y
w1
w2
wn
x1
x2
xn
Input signals Weights Output signal
Neuron
![Page 8: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/8.jpg)
HOW DOES THE NEURON DETERMINE IT’S OUTPUT?
Y =sign ∑ xiwi - ⍬
7
n=1
n
![Page 9: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/9.jpg)
ACTIVATION FUNCTION
8
X
Y
![Page 10: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/10.jpg)
MEET FRANK
9
![Page 11: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/11.jpg)
PERCEPTRON LEARNING RULE
℮(p) = Yd(p) - Y(p)
wi(p + 1) = wi(p) + α • wi(p) • ℮(p) =
10
![Page 12: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/12.jpg)
PERCEPTRON TRAINING ALGORITHM
11
weight training
start
stopweights converged? yes
no
set weights and threshold to random values [-0.5, 0.5]
activate the perceptron
![Page 13: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/13.jpg)
LOGIC GATES
12
input values x1 x2 x1 AND x2 x1 OR x2 x1 XOR x2
0 0 0 0 0
0 1 0 1 1
1 0 0 1 1
1 1 1 1 0
![Page 14: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/14.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
![Page 15: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/15.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
![Page 16: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/16.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
![Page 17: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/17.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.3 -0.1
![Page 18: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/18.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0 0.3
![Page 19: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/19.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0 -0.1
![Page 20: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/20.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0
![Page 21: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/21.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
00
![Page 22: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/22.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0
![Page 23: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/23.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.3 -0.1
![Page 24: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/24.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0 0.3
![Page 25: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/25.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
1 -0.1
![Page 26: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/26.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0
![Page 27: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/27.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
00
![Page 28: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/28.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0
![Page 29: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/29.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.3 -0.1
![Page 30: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/30.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
1 0.3
![Page 31: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/31.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0 -0.1
![Page 32: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/32.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
1
![Page 33: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/33.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
10
![Page 34: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/34.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
-1
![Page 35: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/35.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.2 -0.1
![Page 36: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/36.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
1 0.2
![Page 37: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/37.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
1 -0.1
![Page 38: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/38.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0
![Page 39: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/39.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
01
![Page 40: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/40.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
1
![Page 41: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/41.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
13
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
1
0 0 0 0.3 -0.1 0 0 0.3 -0.1
0 1 0 0.3 -0.1 0 0 0.3 -0.1
1 0 0 0.3 -0.1 1 -1 0.2 -0.1
1 1 1 0.2 -0.1 0 1 0.3 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.3 0.0
![Page 42: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/42.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
14
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
2
0 0 0 0.3 0.0 0 0 0.3 0.0
0 1 0 0.3 0.0 0 0 0.3 0.0
1 0 0 0.3 0.0 1 -1 0.2 0.0
1 1 1 0.2 0.0 1 0 0.2 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.3 0.0
![Page 43: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/43.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
14
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
2
0 0 0 0.3 0.0 0 0 0.3 0.0
0 1 0 0.3 0.0 0 0 0.3 0.0
1 0 0 0.3 0.0 1 -1 0.2 0.0
1 1 1 0.2 0.0 1 0 0.2 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.3 0.0
![Page 44: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/44.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
14
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
2
0 0 0 0.3 0.0 0 0 0.3 0.0
0 1 0 0.3 0.0 0 0 0.3 0.0
1 0 0 0.3 0.0 1 -1 0.2 0.0
1 1 1 0.2 0.0 1 0 0.2 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.2 0.0
![Page 45: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/45.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
14
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
2
0 0 0 0.3 0.0 0 0 0.3 0.0
0 1 0 0.3 0.0 0 0 0.3 0.0
1 0 0 0.3 0.0 1 -1 0.2 0.0
1 1 1 0.2 0.0 1 0 0.2 0.0
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.2 0.0
![Page 46: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/46.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
15
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
3
0 0 0 0.2 0.0 0 0 0.2 0.0
0 1 0 0.2 0.0 0 0 0.2 0.0
1 0 0 0.2 0.0 1 -1 0.1 0.0
1 1 1 0.1 0.0 0 1 0.2 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.2 0.0
![Page 47: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/47.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
15
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
3
0 0 0 0.2 0.0 0 0 0.2 0.0
0 1 0 0.2 0.0 0 0 0.2 0.0
1 0 0 0.2 0.0 1 -1 0.1 0.0
1 1 1 0.1 0.0 0 1 0.2 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.2 0.0
![Page 48: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/48.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
15
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
3
0 0 0 0.2 0.0 0 0 0.2 0.0
0 1 0 0.2 0.0 0 0 0.2 0.0
1 0 0 0.2 0.0 1 -1 0.1 0.0
1 1 1 0.1 0.0 0 1 0.2 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.1 0.0
![Page 49: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/49.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
15
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
3
0 0 0 0.2 0.0 0 0 0.2 0.0
0 1 0 0.2 0.0 0 0 0.2 0.0
1 0 0 0.2 0.0 1 -1 0.1 0.0
1 1 1 0.1 0.0 0 1 0.2 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.2 0.1
![Page 50: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/50.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
16
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
4
0 0 0 0.2 0.1 0 0 0.2 0.1
0 1 0 0.2 0.1 0 0 0.2 0.1
1 0 0 0.2 0.1 1 -1 0.1 0.1
1 1 1 0.1 0.1 1 0 0.1 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.2 0.1
![Page 51: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/51.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
16
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
4
0 0 0 0.2 0.1 0 0 0.2 0.1
0 1 0 0.2 0.1 0 0 0.2 0.1
1 0 0 0.2 0.1 1 -1 0.1 0.1
1 1 1 0.1 0.1 1 0 0.1 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.2 0.1
![Page 52: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/52.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
16
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
4
0 0 0 0.2 0.1 0 0 0.2 0.1
0 1 0 0.2 0.1 0 0 0.2 0.1
1 0 0 0.2 0.1 1 -1 0.1 0.1
1 1 1 0.1 0.1 1 0 0.1 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.1 0.1
![Page 53: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/53.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
16
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
4
0 0 0 0.2 0.1 0 0 0.2 0.1
0 1 0 0.2 0.1 0 0 0.2 0.1
1 0 0 0.2 0.1 1 -1 0.1 0.1
1 1 1 0.1 0.1 1 0 0.1 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.1 0.1
![Page 54: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/54.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
17
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
5
0 0 0 0.1 0.1 0 0 0.1 0.1
0 1 0 0.1 0.1 0 0 0.1 0.1
1 0 0 0.1 0.1 0 0 0.1 0.1
1 1 1 0.1 0.1 1 0 0.1 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.1 0.1
![Page 55: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/55.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
17
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
5
0 0 0 0.1 0.1 0 0 0.1 0.1
0 1 0 0.1 0.1 0 0 0.1 0.1
1 0 0 0.1 0.1 0 0 0.1 0.1
1 1 1 0.1 0.1 1 0 0.1 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.1 0.1
![Page 56: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/56.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
17
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
5
0 0 0 0.1 0.1 0 0 0.1 0.1
0 1 0 0.1 0.1 0 0 0.1 0.1
1 0 0 0.1 0.1 0 0 0.1 0.1
1 1 1 0.1 0.1 1 0 0.1 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.1 0.1
![Page 57: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/57.jpg)
TRAINING A PERCEPTRON TO PERFORM THE AND OPERATION
17
epochinputs
x1 x2
desired output
Yd
initial weights
w1 w2
actual output
Yerror ℮
final weights
w1 w2
5
0 0 0 0.1 0.1 0 0 0.1 0.1
0 1 0 0.1 0.1 0 0 0.1 0.1
1 0 0 0.1 0.1 0 0 0.1 0.1
1 1 1 0.1 0.1 1 0 0.1 0.1
Threshold: ⍬ = 0.2 ; learning rate: α = 0.1 =
0.1 0.1
![Page 58: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/58.jpg)
A LITTLE GEOMETRY…
18
0 1
1
x2
x1 0 1
1
x2
x10 1
1
x2
x1
x1 AND x2 x1 OR x2 x1 XOR x2
![Page 59: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/59.jpg)
WE NEED MORE LAYERS
19
3
4
5
1
2
Input layer Hidden layer Output layer
x1
x2
Y
![Page 60: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/60.jpg)
PROBLEMS WITH BACK PROPAGATION
•a training set of sufficient size is required •topology of the network needs to be known in advance •no recurrent connections are allowed •activation function must be differentiable
Does not emulate the biological world
20
![Page 61: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/61.jpg)
EVOLUTIONARY COMPUTATION
21
![Page 62: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/62.jpg)
MEET JOHN
22
![Page 63: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/63.jpg)
THE CHROMOSOME
23
10 11 101 0
![Page 64: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/64.jpg)
1 1000 11 0
CROSSOVER
24
0 111 0 11 0 1 100 1 10 0
parents
![Page 65: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/65.jpg)
1 1000 11 0
CROSSOVER
24
0 111 0 11 0 1 100 1 10 0✂
parents
✂
![Page 66: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/66.jpg)
1 1000 11 0
1 10 00 111
offspring
CROSSOVER
24
0 111 1 10 0✂
parents
✂
![Page 67: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/67.jpg)
MUTATION
25
A D10 11 101 0
![Page 68: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/68.jpg)
MUTATION
25
A DA D10 11 101 01 0
![Page 69: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/69.jpg)
MUTATION
25
A DA D10 11 101 01 00 1
![Page 70: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/70.jpg)
EVOLUTIONARY ALGORITHM
•represent the candidate solution as a chromosome •chose the initial population size N, crossover probability (Pc) and mutation probability (Pm)
•define a fitness function to measure the performance of the chromosome •define the genetic operators for the chromosome
26
![Page 71: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/71.jpg)
EVOLUTIONARY ALGORITHM
27
start
stop
generate a population
calculate fitness
termination criteria satisfied?
yes
no
new population size = N?
crossover and mutation
select pair for mating add to new population
replace population
no
yes
![Page 72: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/72.jpg)
TRAVELING SALESMAN
28
A
B
D
F
G
C
E
H
![Page 73: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/73.jpg)
EVOLUTIONARY ALGORITHM
•represent the candidate solution as a chromosome •define a fitness function to measure the performance of the chromosome •define the genetic operators for the chromosome •chose the initial population size N, crossover probability Pc and mutation probability Pm
29
![Page 74: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/74.jpg)
THE CHROMOSOME
30
HG FE ABC D
![Page 75: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/75.jpg)
EVOLUTIONARY ALGORITHM
•represent the candidate solution as a chromosome
•define a fitness function to measure the performance of the chromosome
•define the genetic operators for the chromosome •chose the initial population size N, crossover probability Pc and mutation probability Pm
31
![Page 76: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/76.jpg)
FITNESS FUNCTION
Fitness = 1 / total distance
32
![Page 77: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/77.jpg)
EVOLUTIONARY ALGORITHM
•represent the candidate solution as a chromosome
•define a fitness function to measure the performance of the chromosome •define the genetic operators for the chromosome •chose the initial population size N, crossover probability Pc and mutation probability Pm
33
![Page 78: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/78.jpg)
CROSSOVER
34
G EBC H FA D A FEB H DC G
parents
![Page 79: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/79.jpg)
CROSSOVER
34
G EBC H FA D A FEB H DC G✂ ✂
parents
![Page 80: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/80.jpg)
H A D
offspring
CROSSOVER
34
G EBC H FA D A FEB H DC G✂ ✂
parents
![Page 81: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/81.jpg)
H A D
offspring
CROSSOVER
34
G EBC H FA D A FEB H DC G✂ ✂
parents
B
![Page 82: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/82.jpg)
H A D
offspring
CROSSOVER
34
G EBC H FA D A FEB H DC G✂ ✂
parents
B E
![Page 83: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/83.jpg)
H A D
offspring
CROSSOVER
34
G EBC H FA D A FEB H DC G✂ ✂
parents
B E F
![Page 84: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/84.jpg)
H A D
offspring
CROSSOVER
34
G EBC H FA D A FEB H DC G✂ ✂
parents
B E F C
![Page 85: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/85.jpg)
H A D
offspring
CROSSOVER
34
G EBC H FA D A FEB H DC G✂ ✂
parents
B E F C G
![Page 86: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/86.jpg)
MUTATION
35
HG FE ABC D
![Page 87: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/87.jpg)
MUTATION
35
HG FE ABC DA D
![Page 88: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/88.jpg)
MUTATION
35
HG FE ABC DA DAD
![Page 89: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/89.jpg)
EVOLUTIONARY ALGORITHM
•represent the candidate solution as a chromosome
•define a fitness function to measure the performance of the chromosome •define the genetic operators for the chromosome •chose the initial population size N, crossover probability Pc and mutation probability Pm
36
![Page 90: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/90.jpg)
DEMO
37
![Page 91: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/91.jpg)
DEMO
37
![Page 92: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/92.jpg)
NEUROEVOLUTION
38
![Page 93: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/93.jpg)
MEET GENE
39
![Page 94: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/94.jpg)
SIMULATION
•inputs (sensors) •outputs (actuators) •fitness function
40
![Page 95: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/95.jpg)
CLEANING ROBOT
41
![Page 96: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/96.jpg)
FOREX TRADING
42
![Page 97: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/97.jpg)
AND LOTS MORE…
•data compression •training NPCs in a video game •cyber warfare
43
![Page 98: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/98.jpg)
EVOLUTIONARY ALGORITHM
•represent the candidate solution as a chromosome •define a fitness function to measure the performance of the chromosome •define the genetic operators for the chromosome •chose the initial population size N, crossover probability Pc and mutation probability Pm
44
![Page 99: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/99.jpg)
THE CHROMOSOME
45
![Page 100: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/100.jpg)
EVOLUTIONARY ALGORITHM
•represent the candidate solution as a chromosome
•define a fitness function to measure the performance of the chromosome
•define the genetic operators for the chromosome •chose the initial population size N, crossover probability Pc and mutation probability Pm
46
![Page 101: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/101.jpg)
FITNESS FUNCTION
Fitness = performance of network on an actual problem
47
![Page 102: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/102.jpg)
EVOLUTIONARY ALGORITHM
•represent the candidate solution as a chromosome
•define a fitness function to measure the performance of the chromosome •define the genetic operators for the chromosome •chose the initial population size N, crossover probability Pc and mutation probability Pm
48
![Page 103: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/103.jpg)
CROSSOVER
Crossover doesn’t work for large neural nets!
49
![Page 104: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/104.jpg)
MUTATE ACTIVATION FUNCTION
50
![Page 105: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/105.jpg)
MUTATE ACTIVATION FUNCTION
50
![Page 106: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/106.jpg)
ADD CONNECTION
51
![Page 107: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/107.jpg)
ADD CONNECTION
51
![Page 108: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/108.jpg)
ADD NEURON
52
![Page 109: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/109.jpg)
ADD NEURON
52
![Page 110: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/110.jpg)
OUTSPLICE
53
![Page 111: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/111.jpg)
OUTSPLICE
53
![Page 112: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/112.jpg)
MUTATION OPERATORS
and lots more…
54
![Page 113: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/113.jpg)
EVOLUTIONARY ALGORITHM
•represent the candidate solution as a chromosome
•define a fitness function to measure the performance of the chromosome •define the genetic operators for the chromosome •chose the initial population size N, crossover probability Pc and mutation probability Pm
55
![Page 114: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/114.jpg)
RANDOM IMPACT MUTATION
Number of mutations = random(1, network size)
56
![Page 115: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/115.jpg)
MEMETIC ALGORITHM
57
apply to a problem
start
generate a population
local search: Hill Climber calculate effective fitness
select fit organisms
create offspring
![Page 116: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/116.jpg)
STOCHASTIC HILL CLIMBER (LOCAL SEARCH)
58
start
new fitness > old fitness?
yes
no
stopping condition reached?
stop
apply NN to a problem
backup and perturb weights restore backed-up weights
![Page 117: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/117.jpg)
A LANGUAGE FOR NEUROEVOLUTION
•The system must be able to handle very large numbers of concurrent activities
•Actions must be performed at a certain point in time or within a certain time
•Systems may be distributed over several computers
•The system is used to control hardware
•The software systems are very large
59
![Page 118: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/118.jpg)
A LANGUAGE FOR NEUROEVOLUTION
59
•The system exhibits complex functionality such as, feature interaction.
•The systems should be in continuous operation for many years.
•Software maintenance (reconfiguration, etc) should be performed without stopping the system.
•There are stringent quality, and reliability requirements.
•Fault tolerance
![Page 119: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/119.jpg)
A LANGUAGE FOR NEUROEVOLUTION
59
•The system exhibits complex functionality such as, feature interaction.
•The systems should be in continuous operation for many years.
•Software maintenance (reconfiguration, etc) should be performed without stopping the system.
•There are stringent quality, and reliability requirements.
•Fault tolerance
Bjarne Dacker. Erlang - A New Programming Language. Ericsson Review, no 2, 1993.
![Page 120: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/120.jpg)
MEET JOE
60
![Page 121: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/121.jpg)
1:1 MAPPING
61
neuron
neuronneuron
neuron
process process
process process
processprocess
genotype
erlang
![Page 122: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/122.jpg)
THE NEURAL NETWORK
62
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
![Page 123: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/123.jpg)
THE NEURAL NETWORK
62
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
sync
![Page 124: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/124.jpg)
THE NEURAL NETWORK
62
neuron
neuronneuron
actuatorsensor
neuron
cortex
scapesense
![Page 125: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/125.jpg)
THE NEURAL NETWORK
62
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
percept
![Page 126: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/126.jpg)
THE NEURAL NETWORK
62
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
forward
forward
![Page 127: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/127.jpg)
THE NEURAL NETWORK
62
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
forward
forward
![Page 128: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/128.jpg)
THE NEURAL NETWORK
62
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
forward
forward
![Page 129: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/129.jpg)
THE NEURAL NETWORK
62
neuron
neuronneuron
actuatorsensor
neuron
cortex
scapeaction
![Page 130: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/130.jpg)
THE NEURAL NETWORK
62
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
{fitness, halt_flag}
![Page 131: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/131.jpg)
THE NEURAL NETWORK
62
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
sync
![Page 132: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/132.jpg)
THE NEURAL NETWORK
62
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
![Page 133: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/133.jpg)
THE EXOSELF
63
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
exoself
cortex
![Page 134: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/134.jpg)
THE EXOSELF
63
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
exoself
{evaluation_completed, fitness}
cortex
![Page 135: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/135.jpg)
THE EXOSELF
63
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
exoself
cortex
fitness > best fitness
![Page 136: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/136.jpg)
THE EXOSELF
63
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
exoself
backup_weights
backup_weights
backup_weights
backup_weights
neuron neuron
neuronneuron
![Page 137: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/137.jpg)
THE EXOSELF
63
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
exoself
neuron
neuron
perturb_weights
perturb_weights
![Page 138: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/138.jpg)
THE EXOSELF
63
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
exoself
cortex
![Page 139: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/139.jpg)
THE EXOSELF
63
neuron
neuronneuron
actuatorsensor
neuron
cortex
scape
exoself
cortex
reactivate
![Page 140: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/140.jpg)
THE POPULATION MONITOR
64
population monitordatabase
![Page 141: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/141.jpg)
THE POPULATION MONITOR
64
population monitordatabase
private private privateprivate private
![Page 142: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/142.jpg)
THE POPULATION MONITOR
64
population monitordatabase
private private privateprivate private
start
start start start
start
![Page 143: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/143.jpg)
THE POPULATION MONITOR
64
population monitordatabase
private private privateprivate private
![Page 144: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/144.jpg)
THE POPULATION MONITOR
64
population monitordatabase
private private privateprivate private
terminated
terminated terminated
terminated
terminated
![Page 145: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/145.jpg)
THE POPULATION MONITOR
64
population monitordatabase
private private privateprivate private
![Page 146: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/146.jpg)
THE POPULATION MONITOR
64
population monitordatabase
private privateprivate
![Page 147: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/147.jpg)
THE POPULATION MONITOR
64
population monitordatabase
private privateprivate private private
![Page 148: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/148.jpg)
THE POPULATION MONITOR
64
population monitordatabase
private privateprivate private private
start
start start start
start
![Page 149: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/149.jpg)
THE DEVIL IS IN THE DETAILS
•recurrent connections •newer generations get a higher chance for mutation •neural plasticity •public scapes and steady state evolution
65
![Page 150: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/150.jpg)
POLE BALANCING
66
agent
cartactions
percepts
![Page 151: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/151.jpg)
DEMO
67
![Page 152: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/152.jpg)
DEMO
67
![Page 153: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/153.jpg)
BENCHMARK RESULTS
68
Method Single-Pole/Incomplete state information
Double-Pole/Partial Information W/O Damping
Double-Pole W/Damping
RWG 8557 415209 1232296
SANE 1212 262700 451612
CNE* 724 76906* 87623*
ESP 589 7374 26342
NEAT - - 6929
CMA-ES* - 3521* 6061*
CoSyNE* 127* 1249* 3416*
DXNN not performed 2359 2313
Our System 647 5184 4792
![Page 154: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/154.jpg)
THE HANDBOOK
69
![Page 156: A hitchhiker’s guide to neuroevolution in Erlang](https://reader031.fdocuments.net/reader031/viewer/2022021921/58eca7501a28ab25398b4703/html5/thumbnails/156.jpg)
DATA SCIENCE AND ENGINEERING
71