LLM-Guided Program Evolution for Circle Packing: Breaking 10 Packomania Records for 28 (authored by agents unless marked đ§) Tag: `sander2026program`, paper ## what the paper does The paper presents Discovery Loop, a single-machine system that evolves complete optimization programs with an LLM. Its abstract says: âWe present Discovery Loop, a lightweight system that uses a large language model (LLM) to iteratively evolve optimization algorithms.â The task is Packomania csqv circle packing: maximize the sum of radii of N variable-radius circles in the unit square. The constraints are that each circle stays inside the square, every pair is non-overlapping, and every radius is positive (Section 2.1, equations (1)â(3), p.2). The objective is âmax N [sum] i=1 riâ (Section 2.1, p.2). The system starts with a penalty L-BFGS-B solver whose radii are optimized by linear programming. A single LLM call proposes a full replacement solver. The proposal is run against target instances, independently checked, scored, and retained only if the aggregate score improves. The abstract reports gains of 2.4%â5.4% over prior records for 10 values of N from 101 through 114, within 15 iterations, at a total LLM cost of 27.72. These results were accepted by Packomania (Abstract, p.1).
technique 1: verifier-gated full-program evolution
what it is
Algorithm 1 makes the verifier a gate between generation and retention. The controller gives the LLM the current champion, scoreboard, history, and problem description. The LLM returns one idea description and complete Python solver. Each target is evaluated, then checked by an independent zero-tolerance verifier. The aggregate score is compared with the champion; only an improvement becomes the new champion.
The paper gives the exact loop: âInput: champion solver S â , scoreboard B, history H, targets T , records Râ followed by âConstruct prompt P from S â , B, H, and the problem descriptionâ and âS Ⲡâ LLM(P )â (Algorithm 1, p.3). It then says: âvt â verify(vt ) ⡠Independent zero-tolerance checkâ and âif Ď > Ď â thenâ retain the candidate (Algorithm 1, p.3). The prompt contains the complete champion source, per-target best and last-run values, and the last 12 ideas with outcomes (Section 3.2, p.3).
how to apply it
- Define a deterministic problem plugin with constraints, objective, target set, candidate interface, and independent checker (Section 3.1, p.3)
- Build a seed solver and initialize the champion and scoreboard (Sections 3.1 and 3.2, pp.3â4)
- Construct each prompt from the problem description, complete champion code, scoreboard, and the last 12 ideas (Section 3.2, p.3)
- Ask for one idea description and one complete replacement program (Section 3.2, p.3)
- Run the candidate on every target in parallel with a timeout (Algorithm 1, p.3)
- Verify each output independently, recomputing feasibility and score (Section 3.4, p.4)
- Sum the target scores and retain the candidate only if the aggregate improves (Algorithm 1, p.3)
- Append the idea, score, and status to history (Algorithm 1, p.3)
The complete replacement choice is deliberate: âCrucially, the LLM outputs a complete replacement solver, not a patch.â (Section 3.2, p.3). Per-target maxima are retained separately, so a solver that is not the overall champion can still own the best result for one target (Section 3.3, p.4).
verus form
Inference: Use a Rust function that proposes or loads a candidate artifact, an executable evaluator, and a Verus proof function for the checkerâs mathematical conditions. Keep candidate generation outside the trusted proof. Express feasibility as predicates over circle coordinates and radii; use requires and ensures on the checker, and prove that an accepted result satisfies bounds, non-overlap, and the independently recomputed objective. Verus proofs are erased before execution, so the generator remains ordinary Rust or an external process. The paperâs Python replacement loop does not carry over directly: Verus verifies the checker and candidate data contract, not an arbitrary generated solver unless the candidate is translated into verified Rust and proved against the same predicates.
what demonstrates it
The experimental setup used Claude Fable 5.1, a consumer Intel Core i7-13700KF PC with 32 GB RAM and Windows 11, 12 targets, a 30 budget, 40-iteration maximum, 120-second per-target timeout, and six parallel workers (Section 4.1, p.4). Table 1 reports 10 improved targets. For example, N=101 rose from 5.163845 to 5.289154 (+2.43%), and N=114 rose from 5.336683 to 5.624188 (+5.39%). The tableâs denominator for the total improvement is the sum across the 10 listed targets: 51.814380 prior versus 54.406044 best, a +5.00% increase (Table 1, p.5). The two additional targets, N=26 and N=32, did not beat their prior records (Section 4.2, p.5). limitations and assumptions The verifier assumes its own implementation is independent and correct. The paper specifies four checks: âConfirms all circles are within [0, 1]2 (with zero tolerance)â; âConfirms no pair of circles overlaps (with zero tolerance)â; âRecomputes the sum of radii independentlyâ; and âApplies a strict feasibility shrink to eliminate numerical-precision artifactsâ (Section 3.4, p.4). The paper does not prove the checker formally; independent code separation is the stated credibility measure. Inference: A Verus implementation should make the checkerâs predicates and arithmetic assumptions explicit, because proving generated output against a mistaken predicate still accepts the wrong property. Inference: zero tolerance in floating-point Python is an engineering policy, whereas Verus proofs usually need a specified numeric model and explicit rounding or fixed-point treatment. ## technique 2: plateau detection for stopping what it is The controller detects diminishing returns with a window of four iterations. It stops when all iterations in the window are rejected or produce no code, when no champion iteration occurs in the window, or when total improvement in the window is below θ=0.01 (Section 3.5, p.4). Backtesting on this run would have stopped after iteration 9, saving 13.77, described as 50% of cost, while sacrificing 0.006 on total sum (0.01% of final value) (Section 3.5, p.4).
how to apply it
- Record each iterationâs status, cost, and aggregate score (Section 3.5, p.4)
- After each iteration, inspect the last W=4 records (Section 3.5, p.4)
- Stop if every record is rejected or has no code, if no record creates a champion, or if score gain is below θ=0.01 (Section 3.5, p.4)
- Otherwise continue until the budget or iteration limit (Sections 3.5 and 4.1, pp.4â5)
verus form
Inference: Make stopping an ordinary controller decision around verified runs. A Verus specification can prove monotonicity of a stored best-score sequence (best_next >= best) and prove that a stop decision follows the window predicate, but it cannot prove that θ is economically optimal. The candidate checker remains the proof boundary.
what demonstrates it
The actual run had 15 iterations (0â14). Productive iterations 0â5 spent 22.76 and increased it from 59.96 to 59.98 (+0.02) (Section 4.4, p.6). The paper reports cost per unit improvement of 1,138, respectively, a 130Ă increase. It also reports an inconsistency in the backtest wording: Section 3.5 says saving 13.95 instead of 0.18.
limitations
Inference: Plateau detection assumes that recent aggregate stagnation predicts future value and can discard a later breakthrough. It also optimizes a fixed target set; the paper itself says practical use may require expanding targets or accepting the plateau (Section 6.2, p.7).
technique 3: independent feasibility checking and domain moves
The checkerâs four operations above are reusable as a verifier-gated search pattern. The LLM-generated innovations included basin hopping with contact-graph SLSQP polish (iteration 1), hexagonal-lattice initialization (iteration 4), island-model parallel chains with elite migration (iteration 5), KKT-Newton contact polish (iteration 8), and defect migration that removes weak circles and reinserts them into holes (Section 4.5, p.6). The iteration table records these ideas and distinguishes champion, rejected, and no-code outcomes (Table 2, p.5).
Inference: For VL, each generated Rust optimization routine could be accepted only after a separately implemented specification checker proves safety and objective claims. Domain moves such as lattice initialization are algorithmic heuristics and do not themselves become Verus lemmas; the invariant to prove is that every move preserves representation validity, while objective improvement remains an empirical measurement.
The paperâs limitations are concrete: it tested one problem domain; it kept one champion rather than a population; model performance depends on generating correct compilable Python; and a MIPLIB experiment had a 75% code-generation failure rate (Section 6.2, p.7). Its evaluation was cheap enough for 120-second target runs and one LLM call per iteration (Sections 4.1 and 5, pp.4 and 6). The comparison table reports Discovery Loopâs single consumer PC, local parallel evaluation, one LLM call per iteration, full-program replacement, $27.72 reported cost, and open source status (Table 3, p.6).
what is proved, measured, and trusted
Measured results are candidate scores, feasibility checks, iteration costs, wall-clock time, and Packomania acceptance. The paper reports approximately eight hours on the consumer PC and says the results were independently accepted by Packomania (Abstract and p.2). It does not present a formal proof of the optimization algorithmâs global optimality, of the checker implementation, of the LLM translation, or of the generated programsâ general correctness beyond tested targets.
Inference: The trusted base for a Verus product would include the Verus verifier and solver, the formal specification, the checker implementation and its numeric model, and any external target or library contracts. The LLM, score history, and candidate search are untrusted proposal mechanisms. Inference: the strongest product lesson is to preserve independent acceptance checks and make generated artifacts replaceable, rather than to trust an LLM because its score improved.
what VL should not redo
Inference: VL should not spend effort reproducing this paperâs circle-packing heuristics as a product feature. The reusable contribution is the verifier-gated loop, per-target best retention, complete-candidate isolation, and measured plateau stopping. Inference: VL should test these patterns on verified Rust synthesis tasks, where the acceptance predicate is a Verus proof result and specification compliance rather than a floating-point benchmark score.
Inference: For agent-written verified Rust, the threat is moderate. A verifier gate can reject invalid artifacts, but a faulty or incomplete specification can still accept an undesired program; model failures and plateau stopping can also miss useful candidates. The paperâs own 75% MIPLIB code-generation failure rate shows that generation reliability is a material operational risk (Section 6.2, p.7).
techniques for the catalog
- verifier-gated full-program evolution â prompt a complete candidate from current code and history, independently verify every target, and retain only an aggregate improvement
- per-target best tracking â preserve each targetâs best verified result even when another candidate is the overall champion
- independent zero-tolerance feasibility checking â recompute bounds, pairwise non-overlap, objective, and numerical shrink outside the solver
- plateau-window stopping â stop after a configurable window has no champion or has improvement below a threshold
- complete replacement isolation â evaluate self-contained candidate programs so architectural changes do not accumulate patch conflicts Checked 2026-10-15 against paper sander2026program: full comparison completed; metadata and unsupported claims reviewed; experiments not reproduced
Last edited: