'Don't forget to write option base 1 into the code
' or else this net will not work
'Coded by Paras Chopra
'paras_chopra@fastmail.fm
'http://naramcheez.paraschopra.com
'Please don't forget to give comments, credits and most important your VOTE!
Option Base 1
Option Explicit
Const e = 2.7183 'Mathematical const, used in sigmod function
'Dendrite connects one neuron to another and allows signal to pass from it
Private Type Dendrite
Weight As Double 'Weight it has
End Type
Private Type Neuron 'The main thing
Dendrites() As Dendrite 'Array of Dendrites
DendriteCount As Long 'Number of dendrites
Bias As Double 'The bias
Value As Double 'The value to be passed to next layer of neurons
Delta As Double 'The delta of neuron (used while learning)
End Type
Private Type Layer 'Layer containing number of neurons
Neurons() As Neuron 'Neurons in the layer
NeuronCount As Long 'Number of neurons
End Type
Private Type NeuralNetwork
Layers() As Layer 'Layers in the network
LayerCount As Long 'Number of layers
LearningRate As Double 'The learning rate of the network
End Type
Dim Network As NeuralNetwork ' Our main network