views:

365

answers:

5

Some Genetic Algorithm frameworks, such as http://www.aforgenet.com/ requires many parameters, such as mutation rate, population size, etc

There is universal best numbers for such parameters? I believe that it depends on the problem (fitness function delay, mutation delay, recombination delay, evolution rate, etc). My first thought was to use a GA to configure another GA.

Any better ideas?

+1  A: 

The one time I programmed a genetic algorithm I included those values in the values to mutate, basically like you said using a GA to configure itself. It worked surprisingly well, especially since I've found it to be beneficial for those values to change over the course of it's computation.

Graphics Noob
Great! Self mutation should work better than my idea!
Jader Dias
+3  A: 

There really isn't an automatic way to do it for a given dataset. If there were, they wouldn't expose those parameters. Using a second GA to tune the parameters of the first GA is perilous -- do you use a third GA to tune the parameters of the second? Even if you did that, it's a recipe for overfitting anyway.

My advice would be to play with the parameters, and see how they affect your population distrubution at each generation, how many generations it takes to get to an acceptable answer, etc. If you have too much mutation your population will never stabilize. Too little and you'll end up with homogeneity.

It's a dirty secret of GAs that tuning them is an art, not a science.

Matt Bridges
+6  A: 
pufferfish
I do a lot of work with genetic algorithms. This is an excellent description and visualization. Good job.
The Matt
+5  A: 

It ain't easy.

Why? Because of the No Free Lunch theorem. This basically states that there is no general search algorithm that works well for all problems.

The best you can do is tailor the search for a specific problem space. You'll have to manually tweak your parameters to fit your solution. Sorry.

Using a GA to find GA parameters gets complicated. How do you find the optimal parameters for your GAGA search? Another GA...?

Ray
A: 

Hey.

As everyone else said, there is no one answer. Although there is some tendency to use crossover rate on level 0.7-0.9 and mutation on 0.1-0.3 it really depends. Depends on problem, may depend on fitness function, and definitely depends on Genetic Algorithm itself. There are many GA variations, optimal parameters for the same problem may vary.

As for using GA to tune parameters of target GA there are approaches like that, but, as it was pointed out, how to tune parameters of first GA? Keep in mind, that maybe mutation rate should be higher at the beginning, and than it should decreasing while cross over rate should be increasing. It is issue of exploration versus exploitation. There are approaches to let GA be more adaptive and let it change its parameters as it looks for solution. Fuzzy controllers are sometimes used to manipulate parameters of GA. There are also other approaches.

If you want to know about it more, buy some books, or look through academic research papers.
If you need to setup your own GA without extensive research, try some values from others work, and experiment with them.

yoosiba