What if you can’t compute a derivative — the function is a black box? Nelder-Mead crawls downhill with a shape: a triangle of test points that REFLECTS its worst corner across the others, stretching when it finds better ground and shrinking when it overshoots. It creeps, flips, and contracts like an amoeba until it wraps the minimum. It’s the go-to when all you can do is EVALUATE. Slide to watch the simplex ooze toward the low point.
Nelder–Mead is a derivative-free optimizer that maintains a SIMPLEX of n+1 points (a triangle in 2-D). Each step orders them by value and transforms the WORST vertex through the centroid of the rest: REFLECT it; if that’s excellent, EXPAND further; if poor, CONTRACT inward; if all else fails, SHRINK the whole simplex toward the best. The simplex thus rolls, stretches, and collapses downhill using only function EVALUATIONS — ideal for noisy, black-box, or non-differentiable objectives (unlike [[the-gradient-descent|gradient descent]]). A fail-loud self-check throws unless it reaches the known minimum of (x−3)²+(y−2)² to 0.05. ◆ real optimization, node-verified.
Derivative-free but only a heuristic: no convergence guarantee, it can stall on ridges or collapse prematurely, and it scales poorly past ~10 dimensions. The reflect/expand/contract/shrink moves are exact.