GA (genetic algorithm) moves away from better values
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I am running a ga-optimization and I often get results like this one:
Best Mean Stall
Generation f-count f(x) f(x) Generations
1 932 -9.372e+005 1.231e+010 0
2 1398 -1.514e+005 7.911e+009 1
3 1864 7.705e+004 -3.975e+017 2
4 2330 -2.988e+004 -1.812e+015 0
5 2796 -2.988e+004 -1.135e+007 1
6 3262 -2.988e+004 -9.866e+007 2
7 3728 -563.1 -3.495e+007 3
8 4194 -563.1 -8.067e+006 4
9 4660 -563.1 -2.998e+007 5
10 5126 -563.1 -7.216e+006 6
11 5592 -563.1 -7.953e+006 7
12 6058 -288.2 -3.525e+006 8
13 6524 51.32 -3.823e+005 9
14 6990 -40.55 -1.176e+005 0
15 7456 19.38 2.5e+004 1
16 7922 14.31 9165 0
17 8388 14.31 8330 1
18 8854 6.788 6995 0
19 9320 6.788 8568 1
20 9786 5.907 8970 0
21 10252 1.453 1.218e+004 0
i wonder how (with an elite count set to 40 out of a population of 466) the algorithm moves to worse values first. How can this be improved? Thanks a lot for your answers!
4 Commenti
Risposte (1)
Richard Crozier
il 14 Giu 2012
But only the mean gets worse, the best improves with every generation, and this is all that matters surely?
Random combinations with nonlinear responses can easily throw up huge values which distort the mean, while not affecting the overall progress of the search.
For example, imagine the following with a population of 7:
Gen 1 scores: 100, 100, 150, 140, 111, 100, 119
best score: 100
mean score: 117.14
Gen2 scores: 87, 66, 167, 1000000000000, 55, 98, 206
best score: 55
mean score: 1.4286 x 10^11
The really bad individual would have a very low chance of passing its genes to the next generation so it's ok.
6 Commenti
Richard Crozier
il 15 Giu 2012
It still looks like it's moving towards zero? Another way to test your theory would be to modiy your function to return a poor score for complex results (e.g. 10000 * real(ll) if ll is complex or something like this) instead of the actual value of the function.
What GA are you using, is it the Matlab GA toolbox (which I haven't used) or some other one? You could try the problem out in the GA Toolbox from the University of Sheffield available here: http://www.shef.ac.uk/acse/research/ecrg/gat to see if you get the same behaviour.
Vedere anche
Categorie
Scopri di più su Genetic Algorithm in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!