← Notes

31 August 2010

Optimization: Himmelblau’s Function

I just came across Himmelblau’s function for testing optimization routines. It has four local minima and one maxima so it provides a good test:

I’m pleased to say my implementation of the Nelder-Meade Simplex Algorithm (on my C++ page here) was able to optimize it for each minima (depending on the starting locations of course). I did have a weird problem though – starting a solution at (0,0) failed, even though the minima are not equidistant from the origin. Go figure!

1 comment

Reader comments from the time. Commenting is closed.

  • Eugene OBrien8 Feb 2011

    Try the Cross Entropy method of optimisation. It is very simple to implement, very robust and would have no problem with a function like that with multiple local minima. It’s free to download – check out http://iew3.technion.ac.il/CE/index.php

← All notes