MakarovSuites
English
EnglishDeutschРусскийУкраїнськаFrançaisEspañolItalianoPolski
Contact & licences

Math

Optimisation on a landscape

Gradient descent, the heavy ball, the Nelder–Mead simplex, simulated annealing and a genetic population go down the same surface - the bowl shows the condition number, the banana shows the crawl, Himmelblau shows the basins and Rastrigin shows who gets stuck.

Optimisation on a landscape — Actual application image
Actual application image

What happens

A lit surface whose height is the function to be minimised, and five ways down it. Gradient descent steps against the slope and, in a narrow valley, zigzags from wall to wall - too big a step and it flies out. Momentum smooths the zigzag and overshoots the bottom. Newton's method jumps to the minimum of the local parabola, brilliant near a bottom and lost far from one. Rosenbrock's banana valley punishes descent, Himmelblau has four bottoms and the start decides which, Rastrigin has a hollow at every integer and the deepest is hard to find. Pick a surface and a start, drop the balls, and count their steps.

Equations used in the module
Equations
descent: x' = x − η ∇f;  heavy ball: v' = βv − η ∇f, x' = x + v
bowl f = ½(x² + κy²): descent converges only for η < 2/κ
Rosenbrock (1 − x)² + 100(y − x²)²;  Himmelblau, four bottoms;  Rastrigin, hollows everywhere
Newton: x' = x − H^(−1) ∇f, quadratic near a bottom

Related experiments

Back to catalogue
Fourier series — Actual application image

Math

Fourier series

Epicycles assembling a drawing, sines assembling a wave, and the overshoot at a jump that never goes away.

Vector fields — Actual application image

Math

Vector fields

Thousands of tracers reveal a three-dimensional field with luminous fading paths. Orbit the cloud, change its field and emitter, then measure divergence, curl, flux and circulation.

Logistic map and bifurcation — Actual application image

Math

Logistic map and bifurcation

The period-doubling cascade as a glowing curtain coloured by the Lyapunov exponent, with a live cobweb orbit at the marker - doublings at 3 and 1 + √6 exactly, chaos at the end.