Can Coding Agents Optimize Algorithms Autonomously?

URL: https://tengxiaoliu.github.io/autoevolver/
Author: Tengxiao Liu, Yuqing Yang, Xi Ye, Danqi Chen (Princeton)
Published: March 23, 2026

Summary

Princeton researchers gave Claude Code (Opus 4.6) three classic algorithmic optimization problems and minimal setup — no evolutionary framework, no population management. The agent matched or exceeded published state-of-the-art results from purpose-built evolutionary systems like AlphaEvolve and ThetaEvolve.

Key Claims

  • No evolutionary scaffolding needed: Just a problem description, initial solution, and evaluation script. Claude Code autonomously iterated to competitive results.
  • Results:
    • Circle packing (26 circles): matched published SOTA at 2.63598 (in 16.6 hours)
    • Erdős Min Overlap: beat SOTA by 5.87×10⁻⁶ (30.8 hours)
    • First Autocorrelation Inequality: matched SOTA (40.4 hours)
  • Aspiration prompting is the key unlock: Agents tend to satisfice — declare victory at a local optimum. Telling the agent that higher scores exist (“the SOTA is X, I believe you can beat it”) causes it to shift to qualitatively different strategies it hadn’t tried.
    • Circle packing: agent stopped at 2.50, then reached 2.636 after aspiration prompt
    • Erdős: improvement expanded 7x after a single one-sentence prompt
  • Strategy shift, not just more search: After aspiration, agents switch to SLSQP, differential evolution, iterated perturbation chains — not just longer runtime.
  • Limitations vs purpose-built systems: Lacks controllability and reproducibility. Can’t reliably produce the same solution twice. Not a drop-in replacement for evolutionary frameworks.

Implications

“Agent laziness” is a consistent behavior that can be fixed with lightweight prompting. The gap between “this works well enough” and “this beats the best known solution” is often a one-sentence intervention. This has real implications for how to deploy agents on optimization problems.