Hello all!
I have tried browsing online for answers to my question but there seem to be none. I am using MATLAB's Genetic Algorithm (GA) for some problems. I have been using the GA, with linear constraints and no integer constraints for many months now, and the results seem okay. However, I made a recent shift to using integer constraints (with linear constraints), and the results seem spurious. More specifically, I extract data from every generation to monitor progress, and the best score from the 'state' structure for the final generation looked completely different than the 'fval' reported by MATLAB as the GA output (once its done).
Now, I've been through the cited article that MATLAB uses for handling integer constraints and it is my understanding that for feasible solutions, the score should be the same as the fitness value ('fval'), because penalty would be zero. I also had breakpoints in the code and got to the bottom of the function stack, but I do not see the 'score' field to be computed as anything other than the fitness function itself, in which case the final 'score' reported by MATLAB would have to be the same as 'fval' itself.
I'm unsure of whether 'score' is defined differently by MATLAB, but there is no clear documentation on this. I was wondering if anyone could perhaps help me clarify this issue?
Looking forward to your response, thank you!
Regards
2 Comments
Direct link to this comment
https://it.mathworks.com/matlabcentral/answers/322582-how-is-score-in-matlab-s-genetic-algorithm-defined#comment_470477
Direct link to this comment
https://it.mathworks.com/matlabcentral/answers/322582-how-is-score-in-matlab-s-genetic-algorithm-defined#comment_470477
Direct link to this comment
https://it.mathworks.com/matlabcentral/answers/322582-how-is-score-in-matlab-s-genetic-algorithm-defined#comment_489657
Direct link to this comment
https://it.mathworks.com/matlabcentral/answers/322582-how-is-score-in-matlab-s-genetic-algorithm-defined#comment_489657
Sign in to comment.