artificial-intelligenceneural-networkgenetic-algorithmartificial-life

Should I add a bias to an artificial neural network that is being trained by a genetic algorithm


I have an ANN that controls an artificial herbivore. The inputs are the closest plant's magnitude and direction, the closest mate's magnitude and direction, and the herbivore's health. The outputs are a movement vector (direction and magnitude). Is it necessary to use a bias if it is being trained by a genetic algorithm?


Solution

  • The bias is used to shift the desicion boundary of the neural network away from the origin. For a simple perceptron doing simple linear classification this is equal to moving the line separating the two classes. (think of c in simple linear regression.

    Genetic algorithms is just one of many ways to search for the optimal weights. It doesn't care if you have a bias or not since the bias is only another weight to it!

    Therefore use a bias, it can speed up training and allows the network to learn patterns it may not be able to learn otherwise!

    Edit to answer your specific question: no it isn't necessary to use a bias per se, the network can work without it, but since it's so easy to implement and improves your network- use it!