CMA-ES 2D: Covariance Adaptation on a Loss Contour Map
The same seeded run on a top-down contour map with a Blender hill-shaded relief of the landscape: population, selected parents, mean, one- and two-sigma ellipses with their axes, the trail of the mean and the best-so-far pin. Pan and zoom the map, switch covariance and step-size adaptation on and off, and read the best f, sigma and ellipse axes against generation below. Same model and numerical checks as the 3D version.
CMA-ES minimises a function it can only evaluate, never differentiate. Pick Sphere, Rosenbrock or Rastrigin, the population size, the first step size and whether the covariance and the step size adapt, and watch the full algorithm run on a solid 3D landscape: each generation draws lambda points from a Gaussian, ranks them, moves the mean to the weighted average of the best half, learns the shape of the valley with rank-one and rank-mu covariance updates and sets the step size from the cumulative evolution path. Pearl markers are the population, green ones the selected parents, the gold ball the mean, and the pale ellipse the one-sigma contour of the search distribution. The Blender-built terrain uses the real heights 0.34 ln(1 + f). Numerical checks cover the recombination weights, the expected norm of a Gaussian vector, the eigen-decomposition, the sampling covariance by Monte Carlo and convergence on Sphere and Rosenbrock.
The same seeded run on a top-down contour map with a Blender hill-shaded relief of the landscape: population, selected parents, mean, one- and two-sigma ellipses with their axes, the trail of the mean and the best-so-far pin. Pan and zoom the map, switch covariance and step-size adaptation on and off, and read the best f, sigma and ellipse axes against generation below. Same model and numerical checks as the 3D version.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install