Skip to content
CMA-ES Explainer
1/9
Interactive Explorable • Derivations • Live Simulations

CMA-ES:
My favorite black-box optimizer

When gradients are cheap and smooth, Adam and SGD excel. But when gradients do not exist, suffer from severe noise, or cost hours per evaluation, such as in aircraft CFD, suspension bridge FEA, or discrete neural architecture search, CMA-ES is the standard workhorse.

Instead of stepping a single point downhill, CMA-ES maintains a Gaussian search distribution, shifting its mean toward better samples and bending its covariance matrix toward a multiple of the objective's inverse Hessian, discovering landscape curvature without calculating derivatives.

Invented by Nikolaus Hansen and Andreas Ostermeier, and refined over three decades by Hansen and collaborators
Rank Invariant
Invariant to strictly monotone transformations g(f(x)).
Affine Invariant
Identical trajectories under affine maps Ax + b once the initial distribution is transformed to match.
Learns H⁻¹
Covariance C approaches a multiple of the inverse Hessian without derivatives.
WASM + Rust
Sub-millisecond SIMD parallel engine running live in browser.
GEN 0
|σ = 0.650|κ(C) = 1.0
Scripted 3D concept animation • Drag to rotate camera • Scrub timeline
See the Math

What CMA-ES is and why anyone should care

When gradients disappear

A concrete CMA-ES walk-through: designing an airplane wing

Two high-performance CMA-ES engines in Rust

Live CMA-ES landscape explorer (TypeScript + WASM)

Inside the optimizer: covariance geometry in 3D

Real-World Robotics: Whole-Body Humanoid & Articulated Arm

5,040 Dimensions · Zero Gradients480 Hz Physics

Unitree G1 Whole-Body Walking Simulation

Watch a 29-DoF Unitree G1 humanoid optimize a 5,040-parameter locomotion policy live in your browser. Features whole-house 3D waypoint navigation across 7 rooms, zero-penetration collision detection, and ragdoll dragging.

  • Whole-house multi-room waypoint navigation routes
  • Touch & ragdoll dragging with continuous collision detection
  • 480 Hz articulated dynamics & terrain push balance recovery
Full Interactive SimulatorLaunch Humanoid Simulator →
128 Dimensions · Black-Box90 Hz Contact

KUKA LBR iiwa 7 R800 Pick-and-Place

A source-bound 7-DoF KUKA LBR iiwa 7 R800 is optimized to reach, grasp, transport, and release objects in three reduced household scenes. Placement is accepted only when the collision receipt is clear.

  • 3D Coulomb friction cones & contact force verification
  • KMR iiwa 4-mecanum mobile base navigation & 2D LiDAR raycasting
  • Interactive 360° camera orbit & grasp microscope inspection
Full Interactive SimulatorLaunch Robot Arm Simulator →

Outer CMA-ES over 8 training hyperparameters (this site runs it client-side)

Honesty ledger: every physics claim traced to its source, test, citation, and bead

What the simulation kernel actually does (and doesn’t)

Technical addendum: what is really going on