View Full Version : Neural Nets Vs Genetic Algorithms


        
07-11-02, 02:30 PM
Does anyone know of any advantages that genetic algorithms have over neural networks in terms of artificial intelligence?

Stryder
07-11-02, 09:14 PM
Yes, Absolute chaos. Where a programmatic system needs a programmatic means to create a random event, natural systems win hands down.

Thor
07-12-02, 05:03 AM
Yeah, what he said

        
07-12-02, 10:50 AM
Thank you are there any more?

Rick
07-22-02, 11:47 AM
Neural networks are based on experience probabilities.
if an experience's result is true,or a successful attempt was made,the pattern(called a Weight as i explained earlier in programming world)strengthens,or you can say the assigned value of weight increases.

But as far as i know the genetic algorithms are based on pre-concieved notion of an event.a system which has a genetically programmed base,or contains genetic algorithm is fed with various algorithms.these algorithms are fed uniquely.the result of an algorithm applied to a particular event is logged.this logged on event is matched with various other kinds of gentic algorithm applied.whichever has the highest priority assigned to it,on the basis of the results of application,is used in future.
thus you might say a kind of a competitive enviorment is set up,between the algorithms and only the fittest survive.

you can get more information on this subject on one of my threads.

thanks for your time.

bye!

        
07-22-02, 07:08 PM
thank you for your time

c1earwater
08-01-02, 04:09 AM
I'm not sure I understand what Zion said about genetic algorithms but here's what I know about them:

Genetic algorithms or GAs are loosely based on Darwin's theory of evolution or Survival of the Fittest. You start with:
[list=1]
A problem. Common example is the merchant's traveling problem (or whatever it's called): a merchant has to visit an n number of cities all interconnected via different, known length roads. (Usually this n is very big.) He has to find the shortes route past all cities without visiting any one twice.
A set of solutions (called the Gene Pool). These solutions can be coded in a DNA-like or string-like form. For the marchant's example this could be a list of cities to visit: 1,5,3,7,4,2,6,8,... You generally start off with a whole bunch of randomly generated possible solutions, but some people prefer to start with just one or two.
[/list=1]

Each solution gets a value, in the case of the example this would be the total length traveled.

MARK: Now you pick the best say 10 solutions or from the best 100 pick 10 randomly or something like that. (As long as it includes "the best ...". That's the Survival of the Fittest part.) You take these 10 and pair them off to make offspring. For the example you could take parts of the traveled path from one parent and the other part of the path from the second parent. This creates a new batch of solutions wich (hopefully) are better than the first batch.

Generally you add the new solutions to the old batch and kill off the worst solutions to get back to the starting number.

Now you GOTO MARK (I know GOTO, bleg! Use a while if you want ;) ) and repeat until bored. Then you take the best solution from the final batch and use this as your final outcome. In our example this would be the path to travel.

For most problems brute force or some kind of greedy algorithm is sufficient. But for some problems that's not possible or feasable. In that case a GA is usually better than plain random search.

So, the question of using a Neural Net or a GA is more one of, is this problem solvable using a NN or would it be more easily implemented with a GA?

I hope this helps.

        
08-01-02, 06:18 AM
this is good I like this does anyone else have any imput, another thing the GA's ever have random mutations?

c1earwater
08-01-02, 09:01 AM
Yes, that's another option. Instead of taking two parents you take one subject and mutate it. (For example by changing the order of two of the cities.) Or you take two parents, create some offspring and then flip a coin to see if you want to mutate the offspring. The possibilities are endless.

allant
08-01-02, 07:08 PM
Nother difference though possibly minor.

Um tough to know how to say this. Consider a simple problem: hill climbing. You task is to find the highest point within an area covered by fog. If you decide to always head up hill... Then you may find the top of a foothill and miss the mountain.

This problem is called Hilll Climbing and the false place is called a local maximum. (Professors have no imagination! ?). Ok too simple, but warp your mind a little and the idea can be extended to other situations.

NN's can be prone to finding local maximums. GA have a slightly better chance to find the real maximum, if you are lucky... Sometimes it works to add ocasional catastrophies to kill the dinosaurs and let the apes evolve <grin>

        
08-02-02, 02:36 AM
I think I get what your saying that kind of like random chance or luck (when survivle of the fittest does not really come into it) like when you get a few people who are immune to that killer strain of the FLU.

kmguru
08-04-02, 12:00 AM
GAs by themselves can not climb all the hills in real world. So do NNs.

GAs are constrained by their initial conditions and number of subgroups with their specific differentials.

NNs learn without a full deck. In real life, the backpropagation factors are ~100% accurate after the fact. Otherwise everyone would be using it in stock market and making money all the time. Why the whole market lost trillions of dollars?

Rick
08-13-02, 09:05 PM
In fact,The above sentence sums it all,
GAs are constrained by Initial conditions...



bye!

c1earwater
08-13-02, 09:18 PM
In fact,The above sentence sums it all,
GAs are constrained by Initial conditions...
Not if you use random mutations.

In fact, my professor was working on a theory that the best GA is one with a pool size of 1 and the only operator mutation.

        
08-14-02, 02:04 AM
please continue

Rick
08-14-02, 12:54 PM
Interesting...

could you please elaborate on that?


thanks...


bye!

qbiscool
03-05-04, 10:38 PM
I am new to this and would like to know what everybody codes in for genetic algorithims and would also like to know if any body knows anything about distributive procces and evolutionary algorithims.

I code in QBasic and was wondering if qb is powerfull enough to code these AI.

Neurocomp2003
03-05-04, 11:43 PM
What application are you using these for? AI/Alife/COgsci??

evolutionary algorithms seem fun.
if your looking for NNs code in matlab
from what i know about GAs any Basic will do
but i'd prefer C/C++

-----: you can join NNs and GAs together....simply the letter code of the GAs are NNs them selves.

depending on how you code NNs they can be chaotic too but more controllable the

But if your doing anything with multiple solutions use GAs unless your willing to create a highly complex modular NN.

Now lets say you have a vision system. And you have modular parts like detecting lines and then whole shapes, and colours etc. If you have multiple algorithmic solutions for each that are NNs liek 2 solutions that can do line detecting I suggest using GAs on these NN solutions.

Reign-Mack
03-06-04, 03:13 AM
Hi I am the member who started this thread, Have not been able to log in seems my old user name was banned for some unknown reason? Thanks for *bumping* this thread back up.

Im going to be using Java. My GAs will be used to train Binary Decision Trees.

c1earwater I endorse what you say about Random mutation allowing the GA to go beyond its initial condition but the second part about a pool of 1 sounds odd, and there really is no "best" GA it all depends on what type of problem your solving.

I population of 1 and only mutuation as the operator sounds like chaos, which may take a very long time to converge!

qbiscool
03-06-04, 12:05 PM
Im coding AI and i need someone to point me in the right direction for evolutionary algorithms.

Also, does anybody know anything about low-level intelegence(ie. Birds flocking as a result of "stay close to the bird next to you but dont bump into it).

These realy interest me and i was wondering if they could be used to let a program branch out and have complety random outcomes.

PS. is QB good for evolutionary algorithms.
PSS. is PROLOG a good compiler for AI
PSSS. i think i am actualy coding Alife but i am not sure.

mouse
03-06-04, 02:19 PM
I population of 1 and only mutuation as the operator sounds like chaos, which may take a very long time to converge!
Yes, a GA with a population size of one is in essence trying to solve a problem by throwing a dice over and over again. This is usually not how an evolutionary algorithm works. At the very least, you should be able to seperate the best individuals from a population by applying selection criteria. With a population of one, there is nothing left to compare with.

Neurocomp2003
03-06-04, 05:51 PM
what exactly are you coding?
Learning?

FNG2k4
03-07-04, 03:07 AM
What are some good books, or websites to start learning on GA and NN. Im about half way through an Associates in software and was wondering if there was some good starter material on those topics. Any recomendations? About the only coding I do is in C++ .net and a very little in Java.

mouse
03-07-04, 07:30 AM
Does anyone know of any advantages that genetic algorithms have over neural networks in terms of artificial intelligence?
When comparing NNs withs GAs, it is perhaps interesting to note that NNs are usually used for classification problems, as e.g. the recognition of faces or handwritten symbols. GAs traditionally are applied as optimization methods as e.g. finding the best path in the merchant's traveling problem (already mentioned above).

Neurocomp2003
03-07-04, 02:27 PM
YOU CAN COMBINE BOTH TECHNIQUES TO MAKE FOR BETTER LEARNING ALGORITHMS ESPECIALLY IF YOUR INTO GAMING AI.

but BOOKS: MATLAB is simple to read and has an extremely large toolbox of NNets for those too lazy to code for themselves however if your like me and your programmes shoudl ahve taught you to code them...there is
1) Neural Network in C++ (nto reallly sure the exact title)
2) Introduction to Neural Networks by Simon Haykin
3) ELements of Artificial Neural Nets (mehotra, this is the book i learned from and has psuedo code for mostly every type of neural network/decision tree. very easy to read and more for cs people.
4) Melanie Mitchell has a GA book out. but most GA books are easy to read.

If you really want a good start on both and other computational simulation pick up
5) Gary FLakes COmputational Beauty of Nature...best book I ever bought
gives alot on ALife/AI/Computatbility

        
03-08-04, 07:47 AM
Melanie Mitchell's Introduction to GA's is very good, easy to read and understand, plus its pretty interesting.

There is also a good book on Data mining techniques : for marketing, sales, and customer support.

*does anybody have any links or sources on how problems can be encoded, One of the hardest stages in creating an effective GA comes down to how the problem is encoded, which seems to be make or break no matter how well or bad you implement the operators.

artfldgr
03-26-04, 06:37 PM
there is a plethora of information around at the college websites if you search.
many books in the AI and sciences in general tend to be expensive, and as far as programming, its hard to find good stuff.

it is correct that neural nets are used in classification problems but the main reason the technique is used is when salient points are not known.

data has to be prepared and there are a lot of things that can be changed between types of nets, their layers, data preparation, and so on.. so you get a lot of duds as well as potential winning output.

what is it doing.. well..a neural net takes information in and in a way divides its influences up and mixes them in the next layer. from that layer these influences are
pushed forward where those that are more salient have more of an effect and those less salient have less of an effect. your output has to be known using test cases that are used for learning.. those are tested agains another set of known data that is not used for data so as to determing and force the net to pick out what is important in learning and not memorize the answers from the test or learning set. learning is accomplished in back propagation and other forms.. the idea is to have the net converge on answers...

a genetical algorithm is quite different and in many cases easier to code.. but is generally for other types or problems (as cellular automata are for others).. the problem is formalized in such a way that all the possible solutions are accessible in the solution space. this space has a way of getting large very fast. methods of symbolically represent this information are put together and run through to see their fitness. usually gray numbers are used and not normal binary.. this is to minimize the catastropic change in function in when a binary numbers bit changes. a random population is generated and each member is run against the problem.. the onese that are closer to the answer are kept and the majority are thrown away. these are mated with each other and occaisional mutations are added. there are many mating methods.. but the thought and practice is that the system conserves blocks or parts of solutions that are better since the mating is really swapping chunks or areas in a formalized way that is not fixed at a particular cut point.. eventually the population starts to converge on an answer... not always though..

both types of systems require a bit of art to get them to work right in understanding how to set things up..

there are a few shareware packages and demos that you can play with to get a good idea of how theywork and a bit of searching will find them.. especially for neural nets..
real real good packages for nets run into the 5k range..

paradigms that combine both are basically using genetic algorythims to defien net structure (topology), and activation values.. so its kind of creating nets that dont learn but are for lack of a better analogie.. instinctual..

good luck!!

kmguru
03-27-04, 10:37 PM
Keep tinkering...the day you can come up with a program that can predict a noise with high differential amplitude (random pattern) you will be rich beyond Bill Gates....:D

malkiri
03-30-04, 02:54 PM
Melanie Mitchell's Introduction to GA's is very good, easy to read and understand, plus its pretty interesting.

There is also a good book on Data mining techniques : for marketing, sales, and customer support.

*does anybody have any links or sources on how problems can be encoded, One of the hardest stages in creating an effective GA comes down to how the problem is encoded, which seems to be make or break no matter how well or bad you implement the operators.

This post is a couple weeks old, but...

Do you have any particular problem in mind when you ask about representation? I don't know of any sources for that particular aspect. Some specific things to keep in mind: single bitflips in binary strings with the usual encoding we're used to are not as incremental as they seem - changing the most significant bit changes the value by 2^N-1; Gray codes are an alternative option, but have the same problem less often on a larger scale. Or say we use a tree representation...is 'replace a random node with a random tree' a good mutation operator, or is it too drastic?
Potential issues aren't restricted to reproductive operators, either. Will your representation include your entire solution domain? Will it include too much? Will I be able to calculate a meaningful fitness in this representation?
As is the case with most aspects of an evolutionary algorithm, there is no single correct answer. You have to take into account not only your problem but also how the results of each choice will interact with each other in order to have an algorithm that performs well. If your representation forces all your mutations to bounce around wildly, maybe it'll work if you use a more conservative recombination operator. Or perhaps you can scale down the rate of mutation as time passes. Or maybe you should use a new mutation operator, or change the representation.
I just ran across a nice FAQ for comp.ai.genetic at http://www.faqs.org/faqs/ai-faq/genetic/part1/. Take a look particularly at part 2 and 3, as well as part 4. Part 6 is where I drew the info about Gray codes above from.