The genetic algorithm is not returning the minimum of my function?

1 次查看(过去 30 天)
I am attempting to optimize the locations of transducers in a set-up by maximizing the sensitivity within the imaging volume. The function I am feeding to the GA takes the x and y coordinates of the transducer and returns 1/(sensitivity+1) to maximize the sensitivity and avoid dividing by zero. The sensitivity is always a positive number and I have restricted the variables to integers.
In an imaging volume of 5x5x5, optimizing the 5th (top) z plane, we would assume that the best place to put the transducer is the middle [3,3,0] (I have restricted the z position of the transducer to 0 for now), however, the GA returns [0,3,0]. I have run this several times with different population sizes and initial populations and it consistently returns [0,3,0]. When I manually calculate the result of the function that the GA is working with, I get a higher value for [0,3,0] than [3,3,0]. My understanding is that the GA should be finding the minimum of my function and there are many more positions that return a lower value than [0,3,0] because they are closer to the centre of the imaging space (such as [1,3,0] [2,3,0]).
Is there any reason that the GA would be unable to return the minimum of my function?
  9 个评论
Avery
Avery 2012-11-2
I'm comparing cost, I manually calculated with Matlab using [0,3,0] and [3,3,0] as inputs through my function to get those values.
Should I try setting the Elite Count to another value?
Jonathan Epperl
Jonathan Epperl 2012-11-3
Yeah, try and set the EliteCount manually. I don't expect it to change anything, but might as well try. Apart from that I don't think we have enough info to find what's wrong. All I know is this: Elitism means that the best individuals in Population i are going to be in Population i+1, too, so that if the minimizer is in your initial population already, there should be no way that you get any other result.
So the error must happen somewhere else, the objective as the GA evaluates it must be different from the objective if you manually call it from Matlab.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by