Agents: read llms.txt

Simon Spoorendonk

24 November 2026

Towards a solver per problem

In the spring I had agents implement a branch-and-cut paper by Mads Jepsen, Bjørn Petersen, David Pisinger and me (2014), for the capacitated profitable tour problem (CPTP), on top of HiGHS, the open source MIP (mixed-integer programming) solver. I wanted to test out how easy it had become to implement a fairly sophisticated algorithm using agents. The code is cptp and my paper on it is arXiv:2607.04497.

Branch-and-cut needs a few things HiGHS doesn’t let you do from the outside:

  • Cuts. Add constraints on the fly when the LP solution (the problem with the integer requirements dropped) violates them. In cptp the constraints that keep the tour connected are part of the model, not just a tightening, but there are exponentially many, so they are added lazily, only once violated.
  • Feasibility checks. Because those constraints aren’t all in yet, an integer solution can look feasible to HiGHS and still break one. Check it, and reject it instead of keeping it as the best so far.
  • Propagation. Fix variables at each node of the search, using what I know about the routing structure.

SCIP has all three as plugins with a documented interface. I patched HiGHS anyway: it was faster in my first tests, it’s ahead of SCIP on Mittelmann’s MIP benchmark today, and I was familiar with HiGHS from my previous work at Flowty.

The patch

cptp’s build fetches HiGHS at a pinned release, and before compiling it a CMake script finds specific strings in the HiGHS source, the anchors, and splices new code in around them. I’ll call that a fork, though it isn’t one in the git sense: nobody merges upstream changes into it, the build takes stock HiGHS and edits it in place every time.

It has since become a habit. In mcfcg, Bjørn and I needed to add columns and rows to the LP between iterations, and NVIDIA’s GPU solver cuOpt had no API for it, so I forked cuOpt and added one. mip-heuristics patches HiGHS the same way as cptp to put four primal heuristics inside it.

Those patches sit at different heights. Stock HiGHS is the pinned release, untouched. Modded HiGHS adds general changes not upstream yet. mip-heuristics sits there, and two Feasibility Jump bugs agents found in it are fixed in HiGHS now. Per-problem HiGHS adds code for one problem class: cptp’s cuts and propagation know about tours and work on any CPTP instance. Per-instance HiGHS uses one instance’s data to cut corners that won’t hold on the next. Nothing I’ve built goes that far yet.

Four stacked versions of HiGHS. At the bottom, stock HiGHS: the general solver, at a pinned release. Above it, modded HiGHS: plus general changes that have not gone upstream yet. Then per-problem HiGHS, highlighted: plus code for one problem class, like CPTP. At the top, per-instance HiGHS: plus shortcuts taken from one instance's data. Beside each layer of patches, a check stops the build if the patch did not apply.
Four layers of a forked solver. cptp and mcfcg are in the red one. The layers are how far the changes reach, not a stack: cptp patches stock HiGHS directly. Every patch gets checked at build time.

Where I think this is going

As of autumn 2026, I think the solver becomes a base you fork per problem, and sometimes per instance. That isn’t specific to MIP solvers. It goes for any solver framework, and for the heuristics inside one: a general algorithm at the bottom, one written for a single instance at the top. What changed is the cost of a patch. Finding where it goes in a large code base you didn’t write was always the expensive part, and agents now do that fast.

What you evaluate the changes on decides how specific the result gets. Evaluate on a broad benchmark set and you get a general solver, on one problem class a solver per problem, on one instance a solver per instance.

AILS-AHD is the per-problem kind. An LLM evolves one operator of a leading routing heuristic, and it found new best known solutions on large instances it never saw.

This autumn LLM4MIP, Anthropic and Gurobi all reported new best solutions on open instances in MIPLIB. As far as I can tell none of them patch the solver. The instance-specific part is built around it: an agent detects each model’s structure and exploits it. In Gurobi’s runs that meant neighbourhood search and custom heuristics shaped by the structure. Anthropic hasn’t said how, but I’d guess much the same. LLM4MIP distilled what worked into two skills, general in nature but with knowledge of the instances: one for finding better solutions and one for proving stronger bounds. On the benchmark set as a whole, Gurobi’s version was slower than its defaults, though faster on a few models. These are closer to a solver per instance.

What it changes

Both pay off: per problem when new data of the same kind comes in every day, per instance when the one answer is the point, like a record or a proof.

The base has to be good, and its source has to be open to change. Callbacks and plugin interfaces cover a lot, but sooner or later a solver per problem needs a change no interface reaches, and then you need code you’re allowed to edit and rebuild. So I’d expect the split the Feasibility Jump fixes took: what helps every model goes upstream, and what only helps one stays in the fork. I’d like to see more solver licences allow this.

It also changes what modelling is for. Problem-specific branch-and-cut isn’t new, but it took a research project or a solver developer. The usual arrangement is still that you write the model, hand it to a general solver and leave the algorithm to someone else. When changing the solver is cheap, the MIP model becomes one part of the solver rather than the whole interface to it, and I think less of the work will go into fitting a problem to what a general solver is good at.

What it costs

A fork has to follow the base to new releases, or it stops getting the fixes. The changes that hurt don’t come through the public API. They come in the internals you patched, and no release note covers them, because nobody outside was meant to depend on them. When HiGHS restructured its MIP solver for parallelism, a call my patch anchored on picked up new arguments. The anchor stopped matching and the build passed anyway, with the propagator switched off and no subtour cuts at the root of the search. Now the build counts every anchor and stops if one misses, which is the check in the figure.

Bugs get harder too, because they can be yours, theirs, or in how the two meet. One instance came back optimal at a value worse than the published optimum, with no error. The cause was in the patch: when the feasibility check rejected an integer solution, HiGHS still pruned the node as if it had been accepted. It wasn’t a missed anchor. The only sign was a number that disagreed with a known answer, so you need answers you know before you start. I wrote about how I keep those.

The other way out is to own the base. I’ve started mipx, a MIP solver from scratch, for exploration: to see how far agents get. It’s very early. Agents make it tempting for everyone to build their own solver, but an open solver has extensive tuning behind it, and for most people that isn’t where the effort should go. Forking is the better deal.

Summary

Every problem is different, and a general solver has to do well on all of them at once. Agents made patching a solver much cheaper, so you don’t always have to settle for that. I think the solver becomes a base you fork: per problem when the same kind of data keeps coming, per instance when one answer is the point.

I’ve only built the per-problem layer, so the top of the figure is a guess. That’s where I think it’s going.