Alloy

A machine-designed blend of five classical methods, validated on held-out problems

Alloy was not written by a person. A language model was prompted to blend Nelder-Mead, Differential Evolution, CMA-ES, pattern search and simulated annealing in equal proportions, one mechanism per functional part, and Alloy is the generated program that survived validation: on 29 problems never used in any selection step it had the best mean rank at every budget from 60 to 480 evaluations, beating each of six competitors (including CMA-ES) on 64–77% of 580 instances. The full story, including what failed, is in the Inspiration Simplex working paper.

Alloy at a glance

  • Initialization (from DE): a population of random points; the best members seed a Nelder-Mead simplex.
  • Move generation (four-way, 25% each): NM reflect/expand/contract, DE mutation + crossover, a Gaussian step with success-adapted diagonal covariance, or a Hooke-Jeeves coordinate probe.
  • Acceptance (from SA): every candidate passes an annealing gate exp(-Δf/T) with geometric cooling.
  • Restart (from SA): stagnation triggers a reheat that rebuilds the simplex around the incumbent.
  • Niche: small budgets (roughly 60–480 evaluations) on noisy or irregular objectives.

Interactive 3D Visualization

See Alloy in action on 3D optimization surfaces:

Loading 3D visualization...

Requires WebGL support

Instructions: Choose a test function and algorithm, then click Start to watch the step-by-step optimization process.

Implementation Details

Component Details Links
Algorithm Machine-designed blend (2026)
Generated by a language model from an equal-weights recipe over five classical methods; selected on disguised objectives and validated out of sample.
Reference: Cotton (2026), "Alloy: a machine-designed derivative-free optimizer"
Paper All Papers
Generated artifact The verbatim program the model wrote
The package class is a line-faithful port of this file, verified to produce byte-identical trajectories.
File: papers/dfo_recommender/runs/simplex_warm_code/centroid.py
Artifact
HumpDay Python HumpDay Alloy
Pure Python; no required dependencies. Provenance and caveats in the module docstring.
File: humpday/optimizers/alloy.py
Source
HumpDay JavaScript Browser Alloy
Mirrors the Python port; used in the contest and the visualizer above. Also on npm: npm install humpday.
Class: Alloy
JS Port

Performance characteristics

  • Best for: small evaluation budgets (60–480) on noisy, irregular, real-world objectives; the regime the recommendation grid covers.
  • Worst for: long budgets on smooth well-conditioned problems, where a tuned CMA-ES or trust-region method should win; nothing is claimed at 50,000 evaluations.
  • Evidence: best mean rank at every budget on 29 held-out problems (580 instances), pairwise wins of 64–77% against NM, DE, CMA-ES, Nevergrad CMA, a tuned template, and free-form generations (sign-test p < 1e-10).
  • Caveat: Alloy is the validated draw from a noisy generation process; regenerations at the same recipe vary widely. See the paper for the full account.

Related reading