|
Introduction to Neural NetworksThe AI technique of neural networks developed from theories of how the human brain works. Many modern scientists believe the human brain is a large collection interconnected neurons. These neurons are connected to both sensory and motor nerves. Scientists believe, that neurons in the brain fire by emitting an electrical impulse accros the synapse to other neurons, which then fire or don't depending on certain conditions. This idea has been applied to computing in the modern theory of neural networks. Modern neural network architecture heavily uses the object-oriented programming (OOP) paradigm. Using the OOP paradigm each neuron is encapsulated in a single class. Each neuron is then connected to another neuron through a weight, which can be part of the neuron class or in a weight class. This type of architecture allows for reusable code for the netowrks, which can be used for a variety of networks. A variety of neural network architectures are used to accomplish different tasks. Perhaps, the most common basic type of architecture is the feed-forward neural network. A feed-forward neural network consists of an input layer, any number of hidden layers, and an output layer. The input begins the computation by obtaining an input set (fuzzy or crisp) from the user or other data source. The individuals neurons then fire or remain inactive depending on the threshold function. Once the input neurons have fired they transmit their value across weights to the neurons in either the hidden layer or the output layer depending on whether their is a hidden layer. Each layer of neurons, then fires in succesion until the output layer fires. Below is an illustration of a simple feed-forward neural networks.
Here is example of one computation using the network above. This network is a simple neural network, which functions as an XOR. This neural network has two input neurons, two hidden neurons, and one output neuron. The table below indicates the desired input and ouput of the XOR network. If we use A and B as input sets for the above network, we will acheive the desired output. Take, for example, the input set {1,0} the 1 causes neuron A to fire while neuron B does not because its input value does not meet the threshold value of one. Thus neuron A fires giving neurons C and D values of {1,-1} since only C meets the threshold value of one only it fires. Since C fires it outputs a value of 1 to E, which meets the threshold value and causes the output neuron to fire. You can try for yourself the calculations for all other possible input sets to see if you get the right answer.
Sources |