Show HN:一个使用可证伪假设优化代码的代理技能
Show HN: An agent skill that optimizes code with falsifiable hypotheses

原始链接: https://chszlab.github.io/AgenticAlgorithmEngineering/

Agentic Algorithm Engineering(AAE)是一种面向编程代理的自动化优化技能,遵循算法工程循环:提出可证伪假设、预测预期效果、实现最小改动、进行基准测试,并仅在更快且仍正确时保留改动。设置过程中,用户定义基准测试、指标、正确性断言和预算。输出包括更快且正确的代码、每个被接受改动的编号 Git 补丁,以及记录指标轨迹和已测试假设的 PDF 报告。AAE 可与 Claude Code 和 Codex 配合使用,包含快速开始示例,并通过知识库共享会话学习成果。示例结果包括在 KaHIP kaffpa 上进行的 122 个实验、69 个假设、41 个补丁和 3.9 倍总加速。它由海德堡大学算法工程组开发,并在 MIT 许可证下提供。

一篇 Hacker News 的 Show HN 帖子介绍了一种利用可证伪假设检验优化代码的 AI 技能。一位算法工程教授描述了设计、分析、实现并在真实实例上实验测试算法的迭代循环。该技能自动化此循环:它分析性能、生成假设、用 AI 代理实现并测试,仅在性能提升且用户协商的测试通过时保留更改;否则丢弃。所有更改都通过版本控制跟踪。它生成包含进度和补丁的 PDF 报告,以及不断增长的优化知识库。报告结果包括 KaHIP 图分区工具包运行时间快 3.9 倍,VieCut 最小割求解器快 8.9 倍。评论表达了对移植到 tinygrad 的 GPU 版本以及与专业代理配合使用的兴趣。
相关文章

原文
Agentic Algorithm Engineering: the AE cycle of design, analysis, implementation and experiment around falsifiable hypotheses

Agents that optimize your code like an algorithm engineer: a falsifiable hypothesis before every experiment, correctness checked after every change, one reviewable patch per accepted change, and a PDF report of the whole session.

A skill for Claude Code and Codex, from the Algorithm Engineering Group at Heidelberg University.

Results on established open-source codes

Every kept change was checked against the original output.

How it works: the Algorithm Engineering cycle

Algorithm Engineering is a cycle of design, analysis, implementation and experiment, driven by falsifiable hypotheses. AAE hands this cycle to an autonomous agent. During setup you agree with the agent on the benchmark, the metric, the correctness assertions and the budget; then it runs on its own.

Design

A falsifiable hypothesis: "changing X will improve the metric by roughly Z, because ..."

Analyze

Predict direction and size of the effect before measuring, from profiling and analysis.

Implement

A minimal change, committed to Git, with the correctness assertions checked.

Experiment

Run the benchmark; keep the change only if it is better and still correct, otherwise revert.

What you get

Faster, still correct codeEvery change is checked against assertions you agreed on, e.g. bit-identical output.

One patch per accepted changeNumbered Git patches in patches/, each with its hypothesis, easy to review and apply.

A PDF reportThe trajectory of the metric and one page per tested hypothesis: intuition, prediction, measurements, verdict.

From the report of the KaHIP kaffpa session: 122 experiments, 69 hypotheses, 41 patches, 3.9x faster in total.

Quick start

In Claude Code:

/plugin install aae --marketplace CHSZLab/AgenticAlgorithmEngineering
/aae:aae make the solver in src/ faster on the graphs in data/

In Codex, install the skill with scripts/install_codex_skill.py and call it with $aae; any other agent can follow AAE.md. To try it first, run the 10-minute quick-start example: a slow but correct shortest-path program with a benchmark and a correctness check.

How AAE compares

Knowledge base

Sessions share what they learned: the knowledge base collects optimization techniques and experiment results, and agents read it before they start. Contributions from your own sessions are welcome.

Citation

David A. Bader, Adil Chhabra, Ernestine Großmann, Monika Henzinger, Alexander Noe, and Christian Schulz. Agentic Algorithm Engineering: Improving Shared-Memory Exact Minimum Cuts. In 13th DIMACS Implementation Challenge Workshop: Network Flows 2.0, OASIcs, 2027. To appear. Preprint: arXiv:2609.07204.

@inproceedings{bader2027agenticalgorithmengineering,
  title         = {Agentic Algorithm Engineering: Improving Shared-Memory Exact Minimum Cuts},
  author        = {David A. Bader and Adil Chhabra and Ernestine Gro{\ss}mann and Monika Henzinger and Alexander Noe and Christian Schulz},
  booktitle     = {13th DIMACS Implementation Challenge Workshop: Network Flows 2.0},
  series        = {OASIcs},
  publisher     = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  year          = {2027},
  note          = {To appear},
  eprint        = {2609.07204},
  archivePrefix = {arXiv},
  url           = {https://arxiv.org/abs/2609.07204}
}

To cite the software itself, use its Zenodo DOI 10.5281/zenodo.24537749, which always resolves to the latest release.

联系我们 contact @ memedata.com