Simplex Method Nelder Mead Minimization Algorithm For Local Minimum

204 Views Asked by At

I'm trying to code Nelder-Mead algorithm with basic method (without expandsalpha is 2). I'm doing it with Python and also I have an example in book. I'm trying to implement it. Here is the example:
Image 1:

enter image description here

Image 2:

enter image description here

Image 3:

enter image description here
Here is the function:
enter image description here

In this minimization algoritm we are reflect the biggest point symmetrically to the other side. The step will be fail when the reflected worst point is the same with used previous point. (e.g In 5-6-7 simpleks the biggest value is 7 (you can look in image 2) when we reflect it to other side from midpoint of other 2 points it will be going to 4. Please look to image 2 point 4 used before create 5,6,7 simpleks. So this step is fail. Then we reflect the next worst point it's the 5. Then we get point 8. Our new simpleks is now 6,7,8.)

I almost implement it. But I have a problem with the step 12-13-14 simpleks.
Point 14 is (1.08, 0.625) and function value is 2.15.
So ordered points from max to min in 12-13-14 simpleks: 14,13,12.
When we reflect 14 that has maximum value, it's going to back point 6 so this is fail. Then we reflect next max point, it is 13. But when we reflect 13 it's going to point 7. It's fail also. Then we reflect 12 and it's going to back point 5. What will I do now? How I control that? I don't know what should I do? Can anybody help me please?