Learning to use artificial neural networks
Imagine a way to make an enemy or game system emulate the way the brain works. That's how neural networks operate. They are based on a neuron, we call it Perceptron
, and the sum of several neurons; its inputs and outputs are what makes a neural network.
In this recipe, we will learn how to build a neural system, starting from Perceptron
, all the way to joining them in order to create a network.
Getting ready…
We will need a data type for handling raw input; this is called InputPerceptron
:
public class InputPerceptron { public float input; public float weight; }
How to do it…
We will implement two big classes. The first one is the implementation for the Perceptron
data type, and the second one is the data type handling the neural network:
Implement a
Perceptron
class derived from theInputPerceptron
class that was previously defined:public class Perceptron : InputPerceptron { public InputPerceptron[] inputList; public delegate float Threshold...