Effacer les filtres
Effacer les filtres

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

4 vues (au cours des 30 derniers jours)
Avery
Avery le 31 Oct 2012
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 commentaires
Avery
Avery le 2 Nov 2012
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 le 3 Nov 2012
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.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by