Optimization Tools and code MATLAB

1 view (last 30 days)
Sarsarah
Sarsarah on 26 Jun 2020
Commented: John D'Errico on 26 Jun 2020
Please, can anyone explain to me what the difference if doing genetic algorithm optimization using optimtools and manual algorithm code? about everything.
Thank you.
  3 Comments
Sarsarah
Sarsarah on 26 Jun 2020
yes.
okay. but, how about the accuracy of the result when using global optim toolbox ?
John D'Errico
John D'Errico on 26 Jun 2020
Accuracy? No optimization tool, including anything you will write will ever be 100% accurate. Fact.
At least not if it can be applied to any possible function you will ever give it as a total black box, since you can easily provide functions with singularities, unbounded derivatives etc. That is, if you allow me to create any function I want, then I can cause ANY optimizer to fail. Anything you write too. In fact, this is pretty easy to show. For example, create a function that is identically zero at every point the solver passes to it. Now, reset the random seed to the same value it had before the first try. Create a NEW function that is identically zero at every one of the same points, except that it has a negative delta function spike (so infinitely narrow) at one local point away from all other function calls. Since the random seed is identical to the first time, the point set produced by the optimizer will be identical to the first, and since the function is still zero at every point seen, it will terminate after the same time.
Tools like GA are an attempt to produce a result that is robust to failure. That is the best you can ever do. Give it more time, more iterations, more CPU cycles, and you will POSSIBLY get a better result. That is at best a probabilistic claim, since again, you cannot insure a 100% perfect result.
Could you write better code than GA? Anything is possible. How are your coding skills and knowledge of optimization theory? Do I think they wrote GA with the idea like "Lets not bother making it work too well." Be serious.

Sign in to comment.

Answers (0)

Categories

Find more on Problem-Based Optimization Setup in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!