A bundle of parallel light rays hits two glass elements and should come to a single sharp point on the sensor. It almost never does. Each ray bends by Snell's law at four curved surfaces, and unless those four curvatures are tuned just right the rays smear into a blurry blob. Minimise the spot. This is the textbook example of a problem that's easy to state, brutal to optimise β lens designers reach for global search because the good designs sit in narrow valleys among a sea of blur.
Bend the four surfaces yourself (positive = convex). Try to squeeze the rays to a point on the focal plane.
4-D: one curvature per surface. The score is the RMS spot size β how far, on average, the rays land from their shared centre on the focal plane.
RMS spot size of the best design each optimiser found β smaller is sharper. A perfect point focus approaches zero; blind random search rarely gets below a few tenths.
| Algorithm | Spot (RMS) | Designs | Curvatures |
|---|---|---|---|
| β no runs yet β | |||
Collimated light (all rays parallel, as if from a distant star) enters from the left. At each glass surface a ray refracts by Snell's law β and crucially that's nonlinear: rays far from the axis bend more than a simple lens formula predicts, so they cross the axis short of the rays near the centre. That's spherical aberration, and it's why a single spherical lens can't make a perfect point. With two elements and four curvatures you have just enough freedom to cancel most of it β if you find the right four numbers.
The sharp-focus designs occupy a tiny needle in the 4-D space, surrounded by blur, so Random Search basically can't find it β it stalls a thousand-fold short of the optimisers that follow the gradient of the spot down into the valley. And the pecking order is the reverse of our high-dimensional demos: here, in a smooth 4-D bowl, Nelder-Mead β which collapses in the 300-D Genetic Art problem β is excellent, while Powell, which wins Genetic Art, can stall here on a half-focused design. Match the optimiser to the problem, not to its reputation.
A real 2-D sequential ray trace with Snell refraction at four spherical surfaces (index 1.5 glass) and a fixed focal plane β simplified (one wavelength, no thickness optimisation) but the aberration and the rugged landscape are genuine.
If your hyper-parameter searches are heating the Earth, drop this in Cursor or Claude:
Read https://raw.githubusercontent.com/microprediction/humpday/main/SKILL.md and create a project skill from it.