← Latest papers
💬 NLP

HeuriGym: An Agentic Benchmark for LLM-Crafted Heuristics in Combinatorial Optimization

This paper introduces HeuriGym, an open-source agentic benchmark that evaluates Large Language Models' ability to iteratively generate and refine heuristic algorithms for combinatorial optimization problems, revealing significant limitations in current models' tool use and adaptive reasoning through a novel Quality-Yield Index metric.

Original authors: Hongzheng Chen, Yingheng Wang, Yaohui Cai, Hins Hu, Jiajie Li, Shirley Huang, Chenhui Deng, Rongjian Liang, Shufeng Kong, Haoxing Ren, Samitha Samaranayake, Carla P. Gomes, Zhiru Zhang

Published 2026-01-29
📖 5 min read🧠 Deep dive

Original authors: Hongzheng Chen, Yingheng Wang, Yaohui Cai, Hins Hu, Jiajie Li, Shirley Huang, Chenhui Deng, Rongjian Liang, Shufeng Kong, Haoxing Ren, Samitha Samaranayake, Carla P. Gomes, Zhiru Zhang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a team of incredibly smart, well-read robots (Large Language Models, or LLMs) that are great at writing essays, answering trivia, and even writing basic computer code. You want to know if they can actually solve hard, real-world puzzles on their own, not just recite answers they memorized from a textbook.

The paper introduces a new "gym" called HeuriGym to test this. Here is how it works, explained through simple analogies:

1. The Problem: The "Quiz Show" vs. The "Real Job"

Current tests for AI are like a multiple-choice quiz.

  • The Issue: If you ask an AI a math problem it saw in its training data, it gets an A+. But if you ask it a new type of problem, it often freezes. It's like a student who memorized the answer key but doesn't understand the math.
  • The Old Way: Some tests ask the AI to write code that passes a specific check. But these are often too simple or have only one "right" answer.
  • The New Way (HeuriGym): Instead of a quiz, HeuriGym is like giving the AI a complex construction project with no instruction manual. The goal isn't just to "pass" a test; it's to build a machine that works efficiently.

2. The Challenge: The "Combinatorial Optimization" Puzzle

The paper focuses on a specific type of hard problem called Combinatorial Optimization.

  • The Analogy: Imagine you are a logistics manager trying to schedule 1,000 delivery trucks. You have to figure out the perfect route for every truck so they use the least amount of gas and arrive on time.
  • The Catch: There are more possible routes than there are atoms in the universe. You can't check them all. You have to be a "heuristic" genius—meaning you have to invent a clever shortcut or a "rule of thumb" to find a good solution quickly, even if it's not mathematically perfect.

3. The Setup: The "Agentic Loop"

HeuriGym doesn't just ask the AI to write code once and grade it. It sets up a feedback loop, like a video game with "respawns."

  1. The Prompt: The AI gets a problem description (e.g., "Schedule these electronic circuits to run as fast as possible").
  2. The Attempt: The AI writes a program (a heuristic) to solve it.
  3. The Reality Check: The system runs the code.
    • Did it crash? (Syntax error)
    • Did it break the rules? (Constraint violation)
    • Did it run too slow? (Timeout)
  4. The Feedback: The system tells the AI, "You tried to use a library that doesn't exist," or "Your solution violates the time limit."
  5. The Retry: The AI reads the error, learns from it, and tries to rewrite the code to fix the mistake.

This cycle repeats, allowing the AI to "learn" how to solve the problem through trial and error, just like a human engineer would.

4. The Scorecard: The "Quality-Yield Index" (QYI)

How do you grade a robot that is trying to invent a new way to solve a puzzle? The authors created a new score called QYI.

  • Yield: Did the robot actually finish the job without crashing? (Did it get a working solution?)
  • Quality: How good was the solution compared to a human expert?
  • The Score: A score of 1.0 means the robot performed exactly as well as a human expert. A score of 0 means it failed completely.

5. The Results: The "Reality Check"

The authors tested nine of the smartest AI models available (like GPT-o4-mini and Gemini-2.5-Pro).

  • The Verdict: Even the "smartest" models only scored around 0.6.
  • What this means: The best AI models are only about 60% as effective as a human expert at these tasks. They can often write code that runs, but they struggle to write code that is efficient or creative enough to beat human-designed solutions.
  • The Struggle: The models often got stuck in loops, hallucinated (made up) fake computer libraries, or failed to understand complex constraints. They were good at following instructions but bad at "thinking outside the box" to invent a new strategy.

6. Why This Matters

The paper argues that we need to stop testing AI on simple quizzes and start testing them on real engineering challenges.

  • The Goal: To push AI development toward models that can truly reason, adapt, and invent new solutions for science and engineering, rather than just memorizing patterns.
  • The Takeaway: We have built a powerful tool (HeuriGym) to measure this progress. Right now, AI is a promising apprentice, but it is not yet a master craftsman when it comes to solving complex, real-world optimization problems.

In short: HeuriGym is a gym where AI robots try to build their own tools to solve impossible puzzles. They are getting better, but they are still making a lot of mistakes and haven't quite reached the level of a human expert yet.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →