Agentic Algorithm Engineering

This repository contains the program definition for Agentic Algorithm Engineering (AAE), a methodology that turns autonomous agents into performance engineers following the Algorithm Engineering cycle: design, analysis, implementation, and experimental evaluation, driven by falsifiable hypotheses.
See AAE.md for the full program definition. Besides the optimized code, every AAE session produces two artifacts: one numbered patch per accepted change in patches/, and a PDF report in report/ with the trajectory of the metric and one page per tested hypothesis (intuition, prediction, code change, measurements, verdict).
The methodology is described in the paper Agentic Algorithm Engineering: Improving Shared-Memory Exact Minimum Cuts (13th DIMACS Implementation Challenge, to appear), which applies AAE to the shared-memory exact minimum cut solver VieCut. See Citation below if you use AAE in your work.
Example Results
AAE sessions on established open-source codes. Every kept change was checked against the original output.
| Code | Problem | Result | Correctness | Details |
|---|
| VieCut | exact minimum cut | 8.9x faster on 1 thread, 8.8x on 32 threads; no longer runs out of memory on large-cut graphs | every cut unchanged | v2.0, paper |
KaHIP kaffpa | graph partitioning | 3.9x faster in total time (2.8x geometric mean over 537 runs) | partition quality unchanged | v3.26, report |
KaHIP ultra | graph partitioning quality | 2.2% smaller cuts than strong (about 7% on social graphs), in less time than strong of v3.25 | same balance rule as strong | v3.28, ultra.pdf |
| Hochbaum's pseudoflow | maximum flow | 3.0x faster in total (3.18x geometric mean over 164 DIMACS instances) | flow value verified on every instance | KB 039 |
| FREIGHT | streaming hypergraph partitioning | 1.82x faster | bit-identical output | KB 035 |
| ParHIP | distributed graph partitioning (MPI) | 1.61x faster partitioning, 1.77x faster I/O (session ongoing) | byte-identical partitions | KB 040 |
| ScalableCorrelationClustering | correlation clustering | 1.24x faster | identical solution quality | v1.2, KB 034 |
Each session also produced a PDF report with one page per tested hypothesis, and its lessons went into the knowledge base.
Example Report
The full report of the KaHIP kaffpa session: 122 experiments, 69 hypotheses (41 kept, 28 discarded), 41 patches, 3.9x faster in total with every partition checked (PDF, 90 pages).
Trajectory of the running time over all experiments, and one of the pages per hypothesis (hypothesis, prediction, measurements, verdict, code change)
Quick Start
In Claude Code:
/plugin install aae --marketplace CHSZLab/AgenticAlgorithmEngineering
/aae:aae make the solver in src/ faster on the graphs in data/
The agent first agrees with you on the benchmark, the metric, the correctness checks and the budget, then runs the loop on its own and leaves the accepted patches and a report. For Codex and other agents, see Installation.
Algorithm Engineering