16

I have a good basis on Evolutionary Algorithms, so now i started to read about Artificial Neural Networks. I come across this tutorial on http://www.ai-junkie.com/ann/evolved/nnt2.html, showing how to use a ANN to evolve Tanks that collect mines. It uses a GA to evolve the input weights on each Neuron.

I know i could use GA (without the ANN) to solve the same problem. I already created a Tetris Bot using only GA to optimize the weights in the grid evaluation function (check my blog http://www.bitsrandomicos.blogspot.com.br/).

My question is: what's the conceptual/practical difference between using a ANN + GA in a situation where i could use GA alone? I mean, is my Tetris Bot a ANN?(I don't think so).

There are several related questions about this, but i couldn't find a answer:

Are evolutionary algorithms and neural networks used in the same domains?

When to use Genetic Algorithms vs. when to use Neural Networks?

Thanks!

Community
  • 1
  • 1
Fernando
  • 7,785
  • 6
  • 49
  • 81

4 Answers4

23

A genetic algorithm is an optimization algorithm.

An artificial neural network is a function approximator. In order to approximate a function you need an optimization algorithm to adjust the weights. An ANN can be used for supervised learning (classification, regression) or reinforcement learning and some can even be used for unsupervised learning.

In supervised learning a derivative-free optimization algorithm like a genetic algorithm is slower than most of the optimization algorithms that use gradient information. Thus, it only makes sense to evolve neural networks with genetic algorithms in reinforcement learning. This is known as "neuroevolution". The advantage of neural networks like multilayer perceptrons in this setup is that they can approximate any function with arbitrary precision when they have a suffficient number of hidden nodes.

When you create a tetris bot you do not necessarily have to use an ANN as a function approximator. But you need some kind of function approximator to represent your bot's policy. I guess it was just simpler than an ANN. But when you want to create a complex nonlinear policy you could do that e. g. with an ANN.

alfa
  • 3,058
  • 3
  • 25
  • 36
  • 1
    So, in my Tetris Bot i have a heuristic where a GA tunes the weight of each board parameter (like grid height, number of holes, etc). In the Tanks-Mines example, can i consider each Neuron as a 'anonymous parameter' (i.e., some feature that will influence the Tank behaviour but that hasn't been named?) - Just an analogy, thanks! – Fernando Mar 25 '12 at 18:10
  • 1
    Yes, you can do that. Neural networks are considered as blackbox function approximators. That means you usually cannot understand what the ANN does from looking at its weight values. It is hard to extract any simple 'rules'. :) – alfa Mar 25 '12 at 18:41
7

alfa's answer is perfect. Here is just an image to illustrate what he said:

enter image description here Meta-Optimizer = None (but could be)
Optimizer = Genetic Algorithm
Problem = Tetris Bot (e.g. ANN)

Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501
5

You use evolutionary algorithm if you yet don't know the answer but you are able to somehow rate candidates and provide meaningful mutations.

Neural network is great if you already have answers (and inputs) and you want to "train the computer" so it can "guess" the answers for unknown inputs. Also, you don't have to think a lot about the problem, the network will figure it out by itself.

Check this "game AI" example: https://synaptic.juancazala.com/#/
(note how simple it is, all you have to do is to give them enough training, you don't have to know a thing about game AI - and once it is good enough all you have to do is to "download" memory and run it when needed)

Kamil Tomšík
  • 2,415
  • 2
  • 28
  • 32
-1

I'm not an expert, but based on what I know from the field..

An artificial neural network has a basis on neuroscience ultimately. It attempts to simulate/model its behavior through building a neuron-like structures in the algorithm. There is a strong emphasis on the academic nature of the problem than the result. From what I understand, its for this reason that ANN's are not very popular from an engineering standpoint. Statistical basis of machine learning (HMM's and Bayesian networks) produce better results.

In short, so as long as it has a nod towards some underlying neurosciency subject, it can be a ANN, even if it uses some form of GA.

If you use a GA, it is not necessarily an ANN.

badunk
  • 4,310
  • 5
  • 27
  • 47
  • 3
    There are some parallels between neural networks and neuroscience, but neural networks do not try to model natural neurons, in general. – Don Reba Mar 25 '12 at 07:13