Remix.run Logo
▲ Show HN: An agent skill that optimizes code with falsifiable hypotheses(chszlab.github.io)
36 points by 0x23 2 days ago | 7 comments

Hi all, I am a professor in algorithm engineering. In our field we use a method of falsifiable hypothesis testing to improve algorithms. More precisely, this is a cycle consisting of designing an algorithm, analyzing the algorithm, then implementing it and lastly testing it using experiments on real-world instances which leads to designing new algorithms based on the current observations.

We put this methodology into an AI skill which runs in an infinite loop. This skill first creates a performance profile, then produces a hypothesis which is implemented and tested automatically using an AI agent. If the change improved the performance and tests negotiated with the user verify it, the change is kept, if not it is discarded. Everything is tracked via version control.

Part of the output is a pdf report which documents all the code changes and progress over time as well as individual patches to only merge specific patches if one chooses to do so. Moreover, this comes with a knowledge-base in which we collect global optimization knowledge, thereby improving the skill over time.

We ran this on a wide range of public code bases, e.g. our KaHIP graph partitioning toolkit, which improved running time by 3.9x, or our VieCut minimum cut solver, where the skill improved the running time of the system by 8.9x; I do believe the skill is very easy to use and hence am sharing this here. Let me know what you think!

▲tomcatfish 31 minutes ago | parent | next [-]

The example report is a good demo:

https://github.com/CHSZLab/AgenticAlgorithmEngineering/blob/...

▲0x23 4 minutes ago | parent [-]

Thanks!

▲perching_aix a few seconds ago | parent | prev | next [-]

[delayed]

▲tikimcfee an hour ago | parent | prev | next [-]

Looking forward to passing this to my little fleet of specialists. Anything that helps to articulate the process of optimization through rigor is alright with me.

▲emilss 44 minutes ago | parent | prev | next [-]

cool stuff, can try it with GPU porting to tinygrad

▲0x23 4 minutes ago | parent [-]

If you could contribute that to the knowledge-base, would be greatly appreciated!

▲prince_alex 27 minutes ago | parent | prev [-]

the author is optimizing himself away a great man