Manuscript Offprint
arXiv:2609.40340EvoDuet: Bilevel Co-Evolution of Web Searching and Task Solving for Scientific Discovery
Abstract
Evolutionary search with large language models (LLMs) can stall when progress requires external knowledge the model lacks. Supplying relevant documents helps, but simply adding web search tool can keep returning the same pages as solutions change. We introduce EVODUET, a bi-level optimization method that co-evolves solutions and search queries with fixed model parameters. At each iteration, a retrieval gate lets the LLM assess its knowledge gap and choose to retrieve new documents, reuse stored ones, or proceed without them. An inner loop refines queries and ranks documents by the solution scores they are predicted to yield; an outer loop generates candidates in parallel from these documents and records the evaluated outcomes for later searches. Across 21 optimization tasks with one candidate per iteration, EVODUET raises OpenEvolve's normalized discovery gain from 74.1% to 78.0% with GPT-5.6-Luna and from 61.3% to 82.3% with Gemini-3.8-Flash, whereas Qwen3.5-9B does not benefit. Our best runs surpass the previously reported best scores on eight tasks, including Swap Reduction on Q20 and Rosetta, and match them on three more. EVODUET also improves with other scaffolds (e.g., Top-K, EvoX) on Sums/Diffs and Denoising, demonstrating its applicability across evolutionary search scaffolds.
1. Introduction
Evolutionary search scaffolds driven by large language models (LLMs) (Romera-Paredes et al., 2024; Novikov et al., 2025) have begun to discover new solutions to optimization tasks such as the Erdős minimum-overlap problem (Erdős, 1955), GPU kernel design (Ouyang et al., 2025), and single-cell RNA-seq denoising (Yuksekgonul et al., 2026). In these tasks, an evaluator can score any candidate solution, but the optimal solution cannot be computed directly (Kirkpatrick et al., 1983). Scaffolds therefore iterate: the LLM proposes candidates, the evaluator scores them, and high-scoring candidates seed the next iteration.
Most scaffolds (Sharma, 2025; Lange et al., 2025; Cemri et al., 2026) run only this solution loop. Others keep the solution loop from saturating by wrapping additional loops around it, a design we call Loop Packing (Figure 1). For example, EvoX (Liu et al., 2026a) adds a strategy loop that revises the search strategy when progress stagnates. However, every loop packed so far draws on the same two sources of knowledge: the run's evolutionary history and the LLM's parametric knowledge. The search is therefore closed, and it stalls when progress requires external knowledge that neither source contains (e.g., how to use a newer library version). Human scientists, by contrast, consult the literature and search again as new knowledge gaps emerge.
Our preliminary analysis (§ 2.3) shows that external knowledge helps LLM-driven search, but not automatically. Supplying task-relevant and helpful documents at every iteration (oracle documents) raises OpenEvolve's average

Figure 1: Packing loops of multiple optimization scaffolds
Normalized Discovery Gain (NDG) on
Co-second authors with equal contribution, listed alphabetically by surname.
Best-so-Far Evaluator Score

Figure 2: EVODUET co-evolves solutions and web queries. The inner loop evolves queries; the outer loop uses retrieved documents to revise and evaluate solutions. The Swap Reduction example illustrates method transfer (the most common of the six behaviors analyzed in Section 5.1): the model applies retrieved routing principles to prioritize gates closer to execution (iteration 5) and penalize reversing the last SWAP (iteration 66). At iteration 64, the gate reuses stored documents without a new web search. The best router found in this run uses 14,835 Q20 SWAPs, 2.31% fewer than the released SimpleTES program (WILL Team, 2026) (15,186) under the same evaluator.
31 tasks by 10.3% with Qwen3.5-9B and 4.0% with GPT-5.6-Luna. Two further observations show that turning such knowledge into progress takes more than a search tool: First, the LLM needs room to explore: on Sums/Diffs, oracle documents help only when the LLM generates eight candidates per iteration rather than one. Second, queries must evolve with the solution: on Denoising, an LLM that searches inside the solution loop mostly retrieves pages it has already seen (88.1% of returned URLs) and stops improving after 50 iterations. We therefore co-evolve web search queries with solutions (Figure 1), making the search open.
We introduce EVODUET, a bi-level optimization method that co-evolves solutions in an outer loop and web search queries in an inner loop, with the LLM's parameters fixed. A knowledge-gap-based retrieval gate connects the loops: at each iteration, the LLM assesses what it still needs to know to improve the current solution (its knowledge gap) and decides whether to retrieve new documents, reuse stored ones, or proceed without documents. When it retrieves, the inner loop constructs queries targeting the gap, searches the web, and ranks documents by hypothetical evidence scoring, which predicts the evaluator score of a candidate built on each document. These predictions and the updated knowledge state steer the next round of queries without evaluating any candidate. Given documents, the outer loop generates candidates in parallel and records the documents with the evaluated outcome to guide later searches. Figure 2 illustrates this interplay on Swap Reduction (quantum compilation).
We evaluate EVODUET with OpenEvolve on 21 optimization tasks. With one candidate per iteration, it raises overall NDG from 74.1% to 78.0% with GPT-5.6-Luna and from 61.3% to 82.3% with Gemini-3.8-Flash, and parallel generation improves it further. Qwen3.5-9B does not benefit, even though oracle documents help it: it often leaves retrieved methods unused or misimplemented (26% of sampled revisions), suggesting that co-evolution requires a model that can both find and apply evidence. The best runs of EVODUET surpass the previously reported best scores on eight tasks and match them on three more; on Denoising, EVODUET surpasses SimpleTES (WILL Team, 2026) at lower estimated cost. It also improves other scaffolds, Top-K and EvoX, on Sums/Diffs and Denoising, showing that the search loop can be packed alongside existing loops.
Finally, we analyze how retrieved documents shape the search. Candidates improve on their parent in 67.1% of iterations that retrieve a document predicted to beat the parent, compared with 52.1% of iterations without documents. The most common use of documents is method transfer, in which the model applies a retrieved method to its solution (55 of 82

(a) Average NDG ( )

(b) Gain vs. Headroom

(c) NDG per task ( )
Figure 3: OpenEvolve with and without oracle documents on 31 optimization tasks using Qwen3.5-9B and GPT-5.6-Luna. (a) Average NDG across tasks. (b) Per-task NDG versus baseline NDG, with bin medians pooled across models. Shading marks baseline NDG below 5% or at least 80%; hollow markers denote simple tasks. The dashed line shows the gain needed to reach 100% NDG. (c) Per-task NDG in descending order. Legends count tasks with NDG increases (improved) or decreases (degraded) of more than 1%; shading indicates changes within .
runs). Yet documents predicted to help can also yield much worse candidates (29 of 82 runs), so predicted gains must still be validated by the evaluator.
2.1. Preliminaries: Evolutionary Search Scaffold
An optimization task consists of an instruction , an initial solution , and a deterministic, verifiable evaluator . The goal of an evolutionary search scaffold is to find , where and is the set of solutions explored within a search budget of . The task determines the optimization direction (e.g., minimizing the bound in the Erdős minimum overlap problem). At each iteration, the evolutionary search scaffold (Romera-Paredes et al., 2024; Novikov et al., 2025; Sharma, 2025; Liu et al., 2026a) selects a parent solution and its evolutionary history from its solution database (a.k.a. population) under a policy , forming the context . A frozen LLM , serving as the mutation operator, generates a candidate solution , which the evaluator then scores. Based on the selection policy , the candidate solution is then either added to the population or discarded. We call a discovery if it improves upon the previous best-known solution , i.e., for maximization tasks, with the inequality reversed for minimization tasks.
2.2. Experimental Setup
Tasks. We evaluate on 31 optimization tasks spanning simple scientific optimization (10), quantum compilation (1), astrodynamics (5), scientific algorithms (1), AI foundations (4), mathematics (8), and algorithm engineering (2). Detailed task descriptions are provided in Appendix C.1.
Baselines. We use Qwen3.5-9B (Team, 2026) and GPT-5.6-Luna (OpenAI, 2026) as the LLM in OpenEvolve. For each model, we compare (1) OpenEvolve and (2) OpenEvolve with oracle documents supplied to the LLM at every iteration t. Appendix C.2 describes how we construct the oracle documents. For robustness, we run each baseline with four different random seeds.
Evaluation Metric. Since evaluator score ranges vary across tasks, we report Normalized Discovery Gain (NDG) to compare optimization progress on a common scale. NDG measures the percentage of the gap between the initial and SOTA scores closed by a run: , where is the best-scoring solution in , and is the best program reported in prior work (WILL Team, 2026). Higher NDG indicates greater progress toward SOTA performance.
2.3. Does web search help scientific discovery?
Oracle documents improve optimization on average, but their benefits vary across models and tasks. As shown in Figure 3a, oracle documents raise the average NDG of Qwen3.5-9B by 10.3% and that of GPT-5.6-Luna by 4.0%. The smaller gain for GPT-5.6-Luna likely reflects limited headroom: OpenEvolve alone already reaches at least 95%

(a) Parallel generation ( )

(b) Cumulative search queries

(c) Distinct URLs returned ( )

(d) Held-out NDG ( )
Figure 4: Effects of parallel generation and query evolution with GPT-5.6-Luna. (a) NDG of OpenEvolve on Sums/Diffss (mathematics) with and without oracle documents, using N = 1 or N = 8 candidates per iteration. (b) Cumulative number of search queries. (c) Number of distinct URLs returned. (d) Held-out NDG of the best program for each method.
NDG on 16 of the 31 tasks. On these tasks, oracle documents change NDG by only 0.1% on average (Figure 3b). Although oracle documents lead to 100% NDG primarily on simple optimization tasks, their benefits also extend to challenging tasks. For example, on Swap Reduction (quantum compilation), oracle documents increase NDG by 6.1% for Qwen3.5-9B and 41.5% for GPT-5.6-Luna (Figure 3c). However, these benefits are not universal: oracle documents lower NDG by more than 1% on 8 and 4 of the 31 tasks for Qwen3.5-9B and GPT-5.6-Luna, respectively, including decreases of 9.0% and 23.3% on Rosetta. Full results are provided in Appendix D.1.
LLMs may need more opportunities to benefit from oracle documents. The mixed effects of oracle documents raise a question: does the LLM lack the ability to use oracle documents, or does it lack sufficient opportunities to act on them? To examine this, we generate N candidates in parallel at each iteration t from the same context . On Sums/Diffs, oracle documents offer no improvement at (14.8% NDG with oracle documents versus 15.4% without), but increase NDG from 25.8% to 40.7% at (Figure 4b). This suggests that the LLM can benefit from oracle documents when given more opportunities to explore strategies grounded in them. Additional results are provided in Appendix D.2.
Without query evolution, in-loop web search repeatedly retrieves the same pages and stalls. On Denoising with GPT-5.6-Luna, we equip OpenEvolve with Tavily as an in-loop search tool (joint-level), allowing the LLM to construct its own queries during solution optimization. We compare this baseline with EVODUET, which evolves queries based on the LLM's knowledge gap through bi-level co-evolution. Over 100 iterations, joint-level search uses the tool in 99 iterations and produces 185 queries, compared with 201 for EVODUET (Figure 4b). However, it retrieves only 85 distinct URLs, compared with 248 for EVODUET (Figure 4c); 88.1% of its returned URLs have appeared before, compared with 62.4% for EVODUET. Moreover, joint-level search stops improving after iteration 50, with its best program achieving a held-out NDG of 27.7%, compared with 84.5% for EVODUET (Figure 4d). These results suggest that evolving what to ask based on the LLM's knowledge gap helps it search for external knowledge more effectively, enabling it to find better solutions.
Takeaways: Web search benefits from broader exploration and query evolution
• Oracle documents increase average NDG across the 31 tasks, with a larger gain for the smaller model (+10.3% vs. +4.0%).
• More opportunities for exploration can help LLMs use oracle documents: on Sums/Diffs, oracle documents improve NDG by 14.9% with eight parallel candidates per iteration.
• Query evolution helps sustain progress: with comparable query counts on Denoising, joint-level search repeatedly retrieves the same pages and stalls, whereas bi-level search, which evolves queries based on the LLM’s knowledge gap, retrieves about as many distinct pages and increases NDG by 56.8%.
3. EVODUET
3.1. An Overview of EVODUET
We formulate discovery as a bi-level optimization problem with an outer loop that evolves solutions and an inner loop that evolves queries for web search. As shown in Figure 5, EVODUET has three main components:

Figure 5: Overview of EVODUET. The outer loop evolves solutions, while the inner loop evolves web search queries using predicted solution scores. A knowledge-gap-based retrieval gate links the two loops by deciding whether to retrieve new documents (RETRIEVE), reuse stored documents (LOOK-UP), or proceed without documents (NO-OP).
• Solution Optimization Loop (outer, § 3.2): The outer loop follows the scaffold’s evolutionary loop (§ 2.1) to evolve solutions. At iteration t, the selection policy selects a parent solution and its evolutionary history from the population , and the LLM generates a candidate solution , where is either empty or a set of retrieved web documents.
• Knowledge Gap-based Retrieval Gating (§ 3.3): This component connects the outer and inner loops, enabling their co-evolution. Based on gaps in the LLM 's current knowledge status, it determines whether to invoke the inner loop for web search.
• Query Optimization Loop (inner, § 3.4): The inner loop evolves web search queries to retrieve documents that provide the external knowledge needed to generate an improved candidate solution .
Both loops share the task objective , with query quality defined by the performance of the candidate solution generated from the retrieved documents. Let denote the documents retained from query and the resulting candidate. The ideal bi-level optimization is formulated as
outer: solution optimization
inner: query optimization
where is the set of solutions explored within budget , and is the set of admissible queries at iteration . However, the inner objective is observable only after the corresponding candidate has been generated and evaluated. Repeating this process for every query within the inner loop would be costly. We therefore approximate the inner optimization in Eq. 1 using to predict the candidate score that the retrieved documents would yield. Denoting this score predictor by , the approximate inner optimization can then be reformulated as . The detailed algorithm is presented in Algorithm 1.
3.2. Outer Loop: Solution Optimization
The outer loop follows the scaffold’s typical evolutionary procedure (§ 2.1), but differs in the inputs provided to the LLM during candidate generation. When web documents are provided, the LLM generates a candidate solution , which is then evaluated by and retained or discarded according to . The web documents are stored in the search database together with the candidate’s actual evaluator score . This stored information is used to decide whether to reuse existing documents in through a search database lookup, retrieve additional knowledge from the web, or skip the inner loop.
Gated parallel candidate solution generation. In Section 2, we observe that parallel scaling with rich oracle documents enables the LLM to explore diverse approaches and find better solutions. Motivated by this observation, EVODUET generates candidates in parallel from the same input prompt, with for LOOK-UP or RETRIEVE and for NO-OP. Candidate generation and selection are formulated as
where is the set of valid candidates (i.e., those that encounter no errors, such as evaluator errors) among the generated solutions. Each candidate is evaluated, and only the best valid solution is passed to as .
3.3. Knowledge-Gap-Based Retrieval Gating
The gate allows to determine when to search by assessing whether it needs new external knowledge to improve the current solution , can reuse information stored in , or can evolve the solution using only its internal knowledge. At each iteration, given the context and the documents most recently stored in , outputs its current knowledge state and a retrieval decision :
The knowledge state distinguishes the model's existing knowledge, findings from previous searches and experiments, and unresolved questions about that define the current knowledge gap. The gate selects NO-OP when the model's knowledge suffices, LOOK-UP when stored documents provide the missing knowledge, and RETRIEVE when neither source is sufficient. Under LOOK-UP, the selected documents are included in the solution prompt without a new web search. This makes retrieval responsive to the current knowledge gap and enables the reuse of previously retrieved evidence. The results in Table 1b show that knowledge-gap-based gating is more effective than the heuristic gating based on stalled progress used in EvoX (Liu et al., 2026a).
3.4. Inner Loop: Query Optimization
When , the inner loop approximates the query optimization in Eq. 1 over inner rounds within the current outer iteration , without generating or evaluating candidate solution.
Population state descriptor. Following EvoX (Liu et al., 2026a), the inner loop first computes a population state descriptor, stats( ), comprising deterministic statistics of the retained population, its score distribution, recent parent-to-child outcomes, and parent-selection frequencies. summarizes these statistics into factual observations without additional interpretation. These observations complete the initial inner-loop context , which the inner rounds condition on and update.
Iterative query optimization. Let denote the documents retained after inner round , and the predicted evaluator score of a candidate obtained by improving using document alone. Starting with and , each round performs four operations:
(1) Query Construction: The LLM constructs queries targeting the remaining knowledge gaps. The query batch is , with each query sampled as . At , the document and score inputs are empty, so query construction uses only the initial context . Later rounds also use the retained documents and their predicted scores.
(2) Web Search: Each distinct query in is executed once per round. The returned documents are combined with the previously retained documents to form the pool (i.e., local search database in Figure 5) .
(3) Hypothetical Evidence Scoring: When unscored documents are available, a single call to predicts for each such . These hypothetical absolute scores are expressed on the evaluator's scale and provide a surrogate signal for the inner objective in Eq. 1 (Figure 8a shows the model's ability to predict these scores). Each document is scored only once within the inner loop, and its score is reused in later rounds.
(4) Knowledge State Update: The same call used for hypothetical evidence scoring also updates the knowledge state to using the new documents, yielding the next round's context . If no documents require

(a) Overall NDG ( )

(b) Group NDG ( )

(c) Gain vs. Headroom
Figure 6: Discovery performance of OpenEvolve with and without EVODUET. Results cover 21 paired tasks with N = 1 or 8 candidates per iteration. For each model, method, task, and N, we report the best NDG across four runs. (a) Mean best NDG across tasks and the gain from adding EVODUET ( NDG). (b) Mean NDG within each task group. (c) Task-level NDG versus OpenEvolve's NDG; black bars and labels show the median gain within each NDG range.
scoring, the call is skipped and . The loop then retains up to documents with the highest predicted scores as .
After all R rounds, the retained Top-D documents are passed to the outer loop.
4. Experimental Results
EVODUET improves discovery, but only for LLMs that can exploit retrieved evidence. At N = 1, Figure 6a shows that EVODUET improves OpenEvolve's overall NDG from 74.1% to 78.0% (+3.9%) with GPT-5.6-Luna and from 61.3% to 82.3% (+21.0%) with Gemini-3.8-Flash. Qwen3.5-9B, however, shows a 14.4% decline at N = 1 and still loses 4.7% with parallel generation at N = 8, despite gaining 10.3% when given oracle documents (Figure 3a). Unlike the oracle setting, EVODUET requires the model to decide when and what to search for based on its own knowledge gaps. This contrast suggests that these additional demands may limit the benefits of retrieval for weaker backbones such as Qwen3.5-9B. Inspection of 50 randomly sampled Qwen3.5-9B revisions with documents at N = 1 identifies unused methods in 6% and incorrect implementations in 20% (26% combined; Appendix E.3). These findings suggest that effective bi-level co-evolution depends on the model's ability to both retrieve and apply relevant evidence.
Parallel generation consistently improves discovery across models. Figure 6a shows that increasing the candidate budget from N = 1 to N = 8 improves EVODUET's overall NDG for all three models. For Qwen3.5-9B, although EVODUET remains below the corresponding OpenEvolve baseline at both budgets, its overall NDG improves from N = 1 to N = 8, indicating that parallel generation also benefits this model. We further compare for GPT-5.6-Luna and Gemini-3.8-Flash on 8 tasks in Figure 7. We observe that the average NDG increases monotonically with N for both models, rising from 89.6% to 95.7% for GPT-5.6-Luna and from 84.5% to 89.6% for Gemini-3.8-Flash. These results suggest that broader exploration guided by web documents helps LLMs discover better solutions.
EVODUET achieves its largest average gain in mathematics. As shown in Figure 6b, EVODUET improves NDG over OpenEvolve on mathematics tasks in five of

Figure 7: Scaling effect of N.
the six model/budget settings, with an average gain of 7.1% across all six. At N = 8, Qwen3.5-9B gains 5.5% despite its negative overall gain, and Gemini-3.8-Flash gains 6.7%.
EVODUET discovers novel solutions across 11 different tasks. Table 1a shows that EVODUET surpasses the previous SOTA program scores on eight tasks across five domains and matches them on three more. The mean cost across the eleven reported runs is C_5 : 0.380859 \rightarrow 0.380859$), respectively. We call this behavior public artifact reuse, one of six behaviors reported in Appendix E.1. This behavior occurs in only 6 of 82 GPT-5.6-Luna runs (7.3%), compared with method transfer (55 of 82), in which the model applies principles or methods

(a) Predicted vs. evaluated scores

(b) Iteration improvements

(c) Six patterns of document use
Figure 8: Program improvement with web documents and patterns of document use. Results cover 8,200 iterations from 82 GPT-5.6-Luna runs across 21 tasks. (a) Predicted versus evaluated candidate scores, scaled to [0, 1] using each task's 2nd and 98th percentiles. (b) Rates at which the selected candidate improves on its parent (left axis) or sets a new best score within the run (right axis), grouped by gate decision. Arrows compare NO-OP iterations with RETRIEVE iterations that retain at least one promising document. (c) Percentage of runs exhibiting each behavior. Each run is counted at most once per category and may appear in multiple categories.
retrieved by searching relevant literature (Figure 8c). Only two of these 11 SOTA results reuse public artifacts in their best programs (in Appendix K).
The largest median gain occurs on partially solved tasks. Figure 6c compares OpenEvolve and EVODUET across 126 combinations of tasks, models, and candidate counts. When OpenEvolve's NDG is 5–20%, 20–40%, 40–60%, and 60–80%, the median gains from EVODUET are -5.4%, +17.5%, +9.2%, and +2.4%, respectively. When OpenEvolve already performs well (NDG ≥80%), the median gain is 0.0% across 75 comparisons. Of the 52 comparisons with OpenEvolve NDG ≥95%, six show declines greater than 5%. When OpenEvolve makes little progress (NDG below 5%), EVODUET raises five of the ten cases above 5%, with a median gain of +71.8% among these five. In the remaining five cases, both methods stay near the initial program's performance. Overall, EVODUET tends to provide smaller gains when OpenEvolve's NDG is higher (Pearson r = -0.41).
5. Analysis and Discussions
5.1. How Does Web Search Help?
Hypothetical evidence scores track actual program performance. Across 4,324 retrievals, hypothetical evidence scores correlate strongly with the selected candidates' evaluated scores (Spearman ; Figure 8a). Correlations are positive on all 21 tasks, with a median of +0.74. This supports using these scores as a surrogate signal for inner-loop query optimization ( 3.4).
Programs improve more often with promising documents. A document is promising when its hypothetical evidence score exceeds the parent's actual evaluator score, i.e., . When RETRIEVE retains at least one such document, the selected candidate improves on its parent in 67.1% of iterations and sets a new run best in 14.1%, compared with 52.1% and 9.6% under NO-OP (Figure 8b). Under LOOK-UP, which reuses stored documents, these rates are 61.2% and 10.1%, respectively. On 17 of 21 tasks, parent improvement rates are higher with promising documents than under NO-OP (medians: 69% vs. 54%). However, 36.5% of retrievals yield no promising document; the parent improvement rate in these cases is only 38.3%. These results suggest that hypothetical evidence scoring helps identify documents useful for improving the current solution.
Web documents mainly provide methods and performance targets. Figure 8c summarizes six behavior categories across 82 GPT-5.6-Luna runs (8,200 iterations), with each run counted once in every applicable category. The most common behaviors are applying principles and methods from retrieved documents (55 runs) and using published best scores as reference targets (40 runs). These targets guide program development, while the task evaluator measures the resulting programs' performance. We also observe reuse of published solutions (6 runs) and unsuccessful revisions inspired by retrieved ideas (29 runs). Detailed explanations are presented in Appendix E.1.
Table 1: Additional analyses of EVODUET. For (b)-(e), we use GPT-5.6-Luna.
(a) Best programs of EVODUET.
| Task | Prev. SOTA | EVODUET | Cost (USD) |
|---|---|---|---|
| Swap Reduction (↓) | 15,186 | 14,835 | 50.90 |
| Rosetta (↓) | 1.552968 | 1.396424 | 44.12 |
| Voyager 2 (↓) | 3.430214 | 3.430206 | 43.02 |
| Denoising (↑) | 0.722690 | 0.722906 | 38.45 |
| Domain mix. (↑) | 0.996922 | 0.997062 | 15.84 |
| Parallel (↑) | 0.999970 | 0.999975 | 11.93 |
| Erdős (↓) | 0.380868 | 0.380859 | 29.55 |
| Hadamard (↑) | 0.935673 | 0.935673 | 27.33 |
| Sums/Diffss (↑) | 1.144887 | 1.144999 | 161.33 |
| CP (n=26) (↑) | 2.635983 | 2.635983 | 36.33 |
| CP (n=32) (↑) | 2.939573 | 2.939573 | 42.32 |
(b) Retrieval gating.
| Gating | Denoising | Erdős |
|---|---|---|
| Random | 58.5% | 93.9% |
| Heuristic | 60.6% | 99.5% |
| Knowledge Gap | 84.5% | 100.0% |
(c) Search-method comparison
| Method | Molecule (↑) | Burgers (↑) | CP (n=26) |
|---|---|---|---|
| OpenEvolve | 0.8496 | 0.6937 | 2.635983 |
| Joint-level | 0.8474 | 0.6919 | 2.635980 |
| DeepEvolve | 0.8149 | 0.6666 | 2.581971 |
| EVODUET | 0.8524 | 0.7846 | 2.635983 |
(d) Cross-scaffold NDG.
| Scaffold | Sums/Diffss | Denoising |
|---|---|---|
| OpenEvolve | +23.5% | +84.5% |
| Top-K | +46.7% | +63.6% |
| EvoX | +55.1% | +37.8% |
(e) Denoising Pareto frontier.

5.2. Additional Analysis
The knowledge-gap-based gate achieves the highest NDG. Table 1b compares random gating , a stagnation heuristic (Liu et al., 2026a), and our knowledge-gap-based gate. Our gate performs best on both Denoising and Erdős, with a particularly large gain of over the stagnation heuristic on Denoising. This highlights the importance of the model's assessment of its own knowledge state when deciding whether to search the web.
Bi-level optimization is an effective way to couple web search with solution evolution. We compare four variants: OpenEvolve without web search, OpenEvolve with an in-loop search tool (joint-level), DeepEvolve (sequential), and EVODUET (bi-level). A detailed comparison of these variants is provided in Appendix B.5. In Table 1c, EVODUET outperforms all other methods on three tasks, highlighting the importance of the bi-level design.
EVODUET integrates effectively with existing scaffolds. Table 1d compares OpenEvolve, Top-K, and EvoX with and without EVODUET. EVODUET improves NDG on Sums/Diffss and Denoising across all three scaffolds, with respective gains of 23.5 and 84.5 for OpenEvolve, 46.7 and 63.6 for Top-K, and 55.1 and 37.8 for EvoX. Although EvoX already includes a solution loop and a meta-level strategy loop, adding EVODUET's web search loop yields substantial gains, highlighting the benefits of packing the loop (Figure 1).
Cost efficiency. Table 1e compares SimpleTES (WILL Team, 2026), the best observed OpenEvolve runs, and EVODUET on Denoising. EVODUET achieves NDG at 265.39). These results suggest that bi-level co-evolution enables cost-efficient performance by retrieving relevant external knowledge when the model needs it, despite the additional cost of web search.
6. Related Work
LLM-driven evolutionary scaffolds use prior candidates and evaluation feedback to improve programs (Novikov et al., 2025; Sharma, 2025; Lange et al., 2025; Wang et al., 2025; Qu et al., 2026; Yuksekgonul et al., 2026; Lee et al., 2026f). GEPA (Agrawal et al., 2025) optimizes prompts, while other methods evolve agent or harness code (Zhang et al., 2025; 2026; Lee et al., 2026e). Most of these methods operate within a single solution loop. EvoX (Liu et al., 2026a) adds a meta-level loop that evolves search strategies alongside solutions, but both loops draw on the LLM's existing knowledge and the run's evolutionary history. DeepEvolve (Liu et al., 2025) adds a web search loop, but couples search and solution optimization sequentially rather than through a bi-level formulation.
7. Conclusion
We introduce EVODUET, a bi-level method that co-evolves solutions and web search queries, letting the LLM's knowledge state decide when to search and what to ask. Across 21 tasks, EVODUET improves OpenEvolve with GPT-5.6-Luna and Gemini-3.8-Flash (but not Qwen3.5-9B), surpasses the best previously reported scores on eight tasks, and improves Top-K and EvoX on Sums/Diffss and Denoising.
Acknowledgments
This work was partly supported by the IITP grants (RS-2022-II220077, RS-2022-II220113, RS-2022-II220959, RS-2022-II220871) funded by the Korea government (MSIT) and the BK21 FOUR program, SNU in 2025. This research was supported by the “Advanced GPU Utilization Support Program” funded by the Government of the Republic of Korea (Ministry of Science and ICT).
AI use statement
In this work, we used generative AI tools for trajectory analysis. We have not used generative AI tools for idea proposal or method development, and proof-related tasks are not applicable to this work. Additionally, we used generative AI tools for paper writing and figure preparation. We also used generative AI tools to retrieve and summarize oracle documents, as described in Appendix C.2.
We have reviewed all AI-assisted work. We checked the AI-assisted text and figures for consistency with the reported experimental results. For trajectory analysis, we checked the interpretations against recorded search queries, retrieved documents, parent and child programs, and evaluator outputs, with worked cases provided in Appendix I. We also inspected cases of public artifact reuse and documented the sources of reused solutions, as detailed in Appendices E.1 and K.
We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI.
Ethics statement
This work evaluates LLM-guided computational optimization across a set of tasks, using publicly available web sources to inform the search. To support proper attribution, we document cases of public artifact reuse, including the original sources and subsequent optimization steps, in Appendices E.1 and K. The reported gains reflect performance under the task evaluators used in this study. The resulting programs require independent validation before use in other settings. Appendix H discusses source attribution, the reliability of retrieved information, program validation, and human oversight of downstream applications.
Reproducibility statement
We describe EVODUET in Section 3 and provide pseudocode, inference settings, and retrieval budgets in Appendix B. Task definitions, evaluation procedures, and oracle-document construction are documented in Appendix C, and the prompt templates are provided in Appendix J. Detailed experimental results appear in Appendix D. Appendix I links selected search trajectories to retrieved sources, code revisions, and evaluation results. Appendix K provides complete source listings and identifies the runs underlying Table 1a. Detailed trajectories, prompt templates, and complete program listings are provided in the supplementary materials (Appendices I–K).
References
Lakshya A Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems, Rishi Khare, Krista Opsahl-Ong, Arnav Singhvi, Herumb Shandilya, Michael J Ryan, Meng Jiang, Christopher Potts, Koushik Sen, Alexandros G. Dimakis, Ion Stoica, Dan Klein, Matei Zaharia, and Omar Khattab. GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning. arXiv preprint arXiv:2507.19457, 2025. URL https://arxiv.org/abs/2507.19457.
APMonitor. Batch reactor optimization. APMonitor Documentation, 2025. URL https://www.apmonitor.com/wiki/index.php/Apps/BatchReactor. Last modified March 25, 2025. Accessed September 9, 2026.
Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi. Self-RAG: Learning to retrieve, generate, and critique through self-reflection. arXiv preprint arXiv:2310.11511, 2023.
Henrique Assumpção, Diego Ferreira, Leandro Campos, and Fabricio Murai. CodeEvolve: an open source evolutionary coding agent for algorithmic discovery and optimization. arXiv preprint arXiv:2510.14150, 2025. URL https://arxiv.org/abs/2510.14150.
Lorenz M. Baumgartner, Joseph M. Dennis, Nicholas A. White, Stephen L. Buchwald, and Klavs F. Jensen. Use of a droplet platform to optimize Pd-catalyzed C–N coupling reactions promoted by organic bases. Organic Process Research & Development, 23(8):1594–1601, 2019. doi: 10.1021/acs.oprd.9b00236. URL https://doi.org/10.1021/acs.oprd.9b00236.
Daniil A. Boiko, Robert MacKnight, Ben Kline, and Gabe Gomes. Autonomous chemical research with large language models. Nature, 624:570–578, 2023. doi: 10.1038/s41586-023-06792-0. URL https://www.nature.com/articles/s41586-023-06792-0.
Andres M. Bran, Sam Cox, Oliver Schilter, Carlo Baldassari, Andrew D. White, and Philippe Schwaller. Augmenting large language models with chemistry tools. Nature Machine Intelligence, 6:525–535, 2024. doi:10.1038/s42256-024-00832-8. URL https://www.nature.com/articles/s42256-024-00832-8.
Nathan Brown, Marco Fiscato, Marwin H. S. Segler, and Alain C. Vaucher. GuacaMol: Benchmarking models for de novo molecular design. Journal of Chemical Information and Modeling, 59(3):1096–1108, 2019. doi:10.1021/acs.jcim.8b00839. URL https://doi.org/10.1021/acs.jcim.8b00839.
Steven L. Brunton, Joshua L. Proctor, and J. Nathan Kutz. Discovering governing equations from data by sparse identification of nonlinear dynamical systems. Proceedings of the National Academy of Sciences, 113(15):3932–3937, 2016. doi: 10.1073/pnas.1517384113. URL https://doi.org/10.1073/pnas.1517384113.
Cambridge Cluster Database. Table of Lennard-Jones cluster global minima, n.d. URL https://www-wales.ch.cam.ac.uk/~jon/structures/LJ/tables.150.html. University of Cambridge. Accessed September 9, 2026.
Mert Cemri, Shubham Agrawal, Akshat Gupta, Shu Liu, Audrey Cheng, Qiuyang Mang, Ashwin Naren, Lutfi Eren Erdogan, Koushik Sen, Matei Zaharia, et al. Adaevolve: Adaptive llm driven zeroth-order optimization. arXiv preprint arXiv:2602.20133, 2026.
Chi-Min Chan, Chunpu Xu, Ruibin Yuan, Hongyin Luo, Wei Xue, Yike Guo, and Jie Fu. RQ-RAG: Learning to Refine Queries for Retrieval Augmented Generation. arXiv preprint arXiv:2404.00610, 2024. URL https://arxiv.org/abs/2404.00610.
Haodong Chen, Shuai Wang, Yu Yin, Shengyao Zhuang, Guido Zuccon, and Teerapong Leelanupab. ITER: Interaction-Aware Retrieval for Agentic Search. arXiv preprint arXiv:2608.27912, 2026. URL https://arxiv.org/abs/2608.27912.
Mingyang Chen, Linzhuang Sun, Tianpeng Li, Haoze Sun, Yijie Zhou, Chenzheng Zhu, Haofen Wang, Jeff Z. Pan, Wen Zhang, Huajun Chen, Fan Yang, Zenan Zhou, and Weipeng Chen. ReSearch: Learning to Reason with Search for LLMs via Reinforcement Learning. arXiv preprint arXiv:2503.19470, 2025. URL https://arxiv.org/abs/2503.19470.
Seokju Cho, Ryo Hachiuma, Abhishek Badki, Hang Su, Byung-Kwan Lee, Chan Hee Song, Sifei Liu, Subhashree Radhakrishnan, Seungryong Kim, Yu-Chiang Frank Wang, et al. Spatialclaw: Rethinking action interface for agentic spatial reasoning. arXiv preprint arXiv:2606.13673, 2026.
He Du, Qiming Ge, Jiakai Hu, Aijun Yang, Zheng Cai, Zixian Huang, Sheng Yuan, Qinxiu Cheng, Xinchen Xie, Yicheng Chen, et al. Kernel-Smith: A Unified Recipe for Evolutionary Kernel Optimization. arXiv preprint arXiv:2603.28342, 2026. URL https://arxiv.org/abs/2603.28342.
Paul Erdős. Some remarks on number theory. Riveon Lematematika, 9:45–48, 1955.
Kobi C. Felton, Jan G. Rittig, and Alexei A. Lapkin. Summit: Benchmarking machine learning methods for reaction optimisation. Chemistry–Methods, 1(2):116–122, 2021. doi: 10.1002/cmtd.202000051. URL https://doi.org/10.1002/cmtd.202000051.
Ali Essam Ghareeb, Benjamin Chang, Ludovico Mitchener, Angela Yiu, Caralyn J Szostkiewicz, Dmytro Shved, Gavin J Gyimesi, Jon M Laurent, Samantha M Wright, Muhammed T Razzak, et al. A multi-agent system for automating scientific discovery. Nature, 655:497–505, 2026. doi: 10.1038/s41586-026-10652-y. URL https://www.nature.com/articles/s41586-026-10652-y.
Juraj Gottweis, Wei-Hung Weng, Alexander Daryin, Tao Tu, Petar Sirkovic, Artiom Myaskovsky, Grzegorz Glowaty, Felix Weissenberger, Alessio Orlandi, Dan Popovici, et al. Accelerating scientific discovery with Co-Scientist. arXiv preprint arXiv:2502.18864, 2025.
Florian Häse, Matteo Aldeghi, Riley J. Hickman, Loïc M. Roch, and Alán Aspuru-Guzik. Gryffin: An algorithm for Bayesian optimization of categorical variables informed by expert knowledge. Applied Physics Reviews, 8:031406, 2021a. doi: 10.1063/5.0048164. URL https://doi.org/10.1063/5.0048164.
Florian Häse, Matteo Aldeghi, Riley J. Hickman, Loïc M. Roch, Melodie Christensen, Elena Liles, Jason E. Hein, and Alán Aspuru-Guzik. Olympus: A benchmarking framework for noisy optimization and experiment planning. Machine Learning: Science and Technology, 2:035021, 2021b. doi: 10.1088/2632-2153/abedc8. URL https://doi.org/10.1088/2632-2153/abedc8.
Kexin Huang, Serena Zhang, Hanchen Wang, Yuanhao Qu, Yingzhou Lu, Ryan Li, Yusuf Roohani, Lin Qiu, Shiyi Cao, Gavin Li, et al. Autonomous biomedical research with an artificial intelligence agent. Science, 393(6813):eadz4351, 2026. doi: 10.1126/science.adz4351. URL https://www.science.org/doi/10.1126/science.adz4351.
Yuki Imajuku, Kohki Horie, Yoichi Iwata, Kensho Aoki, Naohiro Takahashi, and Takuya Akiba. Ale-bench: A benchmark for long-horizon objective-driven algorithm engineering. arXiv preprint arXiv:2506.09050, 2025.
Soyeong Jeong, Jinheon Baek, Sukmin Cho, Sung Ju Hwang, and Jong C Park. Adaptive-RAG: Learning to adapt retrieval-augmented large language models through question complexity. arXiv preprint arXiv:2403.14403, 2024.
Qile Jiang and George Karniadakis. Agenticsciml: Collaborative multi-agent systems for emergent discovery in scientific machine learning. npj Artificial Intelligence, 2:57, 2026. doi: 10.1038/s44387-026-00102-5. URL https://www.nature.com/articles/s44387-026-00102-5.
Zhengbao Jiang, Frank F Xu, Luyu Gao, Zhiqing Sun, Qian Liu, Jane Dwivedi-Yu, Yiming Yang, Jamie Callan, and Graham Neubig. Active retrieval augmented generation. arXiv preprint arXiv:2305.06983, 2023.
Bowen Jin, Hansi Zeng, Zhenrui Yue, Jinsung Yoon, Sercan Arik, Dong Wang, Hamed Zamani, and Jiawei Han. Search-R1: Training LLMs to reason and leverage search engines with reinforcement learning. arXiv preprint arXiv:2503.09516, 2025.
Minki Kang, Shizhe Diao, Ryo Hachiuma, Sung Ju Hwang, Pavlo Molchanov, Yu-Chiang Frank Wang, and Byung-Kwan Lee. Agent explorative policy optimization for multimodal agentic reasoning. arXiv preprint arXiv:2605.28774, 2026.
Jiwan Kim, Kibum Kim, Wonjoong Kim, Byung-Kwan Lee, and Chanyoung Park. Why and when visual token pruning fails? a study on relevant visual information shift in mllms decoding. arXiv preprint arXiv:2604.12358, 2026.
Scott Kirkpatrick, C Daniel Gelatt Jr, and Mario P Vecchi. Optimization by simulated annealing. science, 220(4598): 671–680, 1983.
Robert Tjarko Lange, Yuki Imajuku, and Edoardo Cetin. Shinkaevolve: Towards open-ended and sample-efficient program evolution. arXiv preprint arXiv:2509.19349, 2025.
Byung-Kwan Lee, Sangyun Chung, Chae Won Kim, Beomchan Park, and Yong Man Ro. Phantom of latent for large language and vision models. arXiv preprint arXiv:2409.14713, 2024a.
Byung-Kwan Lee, Sangyun Chung, Chae Won Kim, Beomchan Park, and Yong Man Ro. Trol: Traversal of layers for large language and vision models. arXiv preprint arXiv:2406.12246, 2024b.
Byung-Kwan Lee, Chae Won Kim, Beomchan Park, and Yong Man Ro. Meteor: Mamba-based traversal of rationale for large language and vision models. Advances in Neural Information Processing Systems, 37:40278–40315, 2024c.
Byung-Kwan Lee, Beomchan Park, Chae Won Kim, and Yong Man Ro. Collavo: Crayon large language and vision model. In Findings of the Association for Computational Linguistics: ACL 2024, pp. 1121–1138, 2024d.
Byung-Kwan Lee, Beomchan Park, Chae Won Kim, and Yong Man Ro. Moai: Mixture of all intelligence for large language and vision models. In European Conference on Computer Vision, pp. 273–302. Springer, 2024e.
Byung-Kwan Lee, Ryo Hachiuma, Yong Man Ro, Yu-Chiang Frank Wang, and Yueh-Hua Wu. Genrecal: Generation after recalibration from large to small vision-language models. arXiv preprint arXiv:2506.15681, 2025a.
Byung-Kwan Lee, Ryo Hachiuma, Yu-Chiang Frank Wang, Yong Man Ro, and Yueh-Hua Wu. Vlsi: Verbalized layers-to-interactions from large to small vision language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 29545–29557, 2025b.
Byung-Kwan Lee, Youngchae Chee, and Yong Man Ro. Recursive think-answer process for llms and vlms. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9608–9621, 2026a.
Byung-Kwan Lee, Ryo Hachiuma, Yong Man Ro, Frank Wang, and Yueh-Hua Wu. Unified reinforcement and imitation learning for vision-language models. Advances in Neural Information Processing Systems, 38:156508–156534, 2026b.
Byung-Kwan Lee, Ximing Lu, Shizhe Diao, Minki Kang, Saurav Muralidharan, Karan Sapra, Andrew Tao, Pavlo Molchanov, Yejin Choi, Yu-Chiang Frank Wang, et al. Zone of proximal policy optimization: Teacher in prompts, not gradients. arXiv preprint arXiv:2606.18216, 2026c.
Byung-Kwan Lee, Yu-Chiang Frank Wang, and Ryo Hachiuma. Masking teacher and reinforcing student for distilling vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10126–10141, 2026d.
Yoonho Lee, Roshen Nair, Qizheng Zhang, Kangwook Lee, Omar Khattab, and Chelsea Finn. Meta-Harness: End-to-End Optimization of Model Harnesses. arXiv preprint arXiv:2603.28052, 2026e. URL https://arxiv.org/abs/2603.28052.
Young-Jun Lee, Byungsoo Ko, Han-Gyu Kim, Jonghwan Hyeon, and Ho-Jin Choi. Dialogcc: An automated pipeline for creating high-quality multi-modal dialogue dataset. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 1938–1963, 2024f.
Young-Jun Lee, Dokyong Lee, Joo-won Sung, Jonghwan Hyeon, and Ho-Jin Choi. Large language models can share images, too! In Findings of the Association for Computational Linguistics: ACL 2024, pp. 692–713, 2024g.
Young-Jun Lee, Dokyong Lee, Junyoung Youn, Kyeong-Jin Oh, Byungsoo Ko, Jonghwan Hyeon, and Ho-Jin Choi. Stark: Social long-term multi-modal conversation with persona commonsense knowledge. In Findings of the Association for Computational Linguistics: EMNLP 2024, pp. 12137–12162, 2024h.
Young-Jun Lee, Dokyong Lee, Junyoung Youn, Kyeongjin Oh, and Ho-Jin Choi. Thanos: Enhancing conversational agents with skill-of-mind-infused large language model. arXiv preprint arXiv:2411.04496, 2024i.
Young-Jun Lee, Seungone Kim, Byung-Kwan Lee, Minkyeong Moon, Yechan Hwang, Jong Myoung Kim, Graham Neubig, Sean Welleck, and Ho-Jin Choi. Refinebench: Evaluating refinement capability of language models via checklists. arXiv preprint arXiv:2511.22173, 2025c.
Young-Jun Lee, Byung-Kwan Lee, Jianshu Zhang, Yechan Hwang, Byungsoo Ko, Han-Gyu Kim, Dongyu Yao, Xuankun Rong, Eojin Joo, Seung-Ho Han, et al. Multiverse: A multi-turn conversation benchmark for evaluating large vision and language models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 708–719, 2025d.
Young-Jun Lee, Seungone Kim, Minki Kang, Alistair Cheong Liang Chuen, Zerui Chen, Seungho Han, Taehee Jung, and Dongyeop Kang. Evolution fine-tuning: Learning to discover across 371 optimization tasks. arXiv preprint arXiv:2606.29082, 2026f.
Gang Liao, Hongsen Qin, Ying Wang, Alicia Golden, Michael Kuchnik, Yavuz Yetim, Jia Jiunn Ang, Chunli Fu, Yihan He, Samuel Hsia, et al. KernelEvolve: Scaling Agentic Kernel Coding for Heterogeneous AI Accelerators at Meta. arXiv preprint arXiv:2512.23236, 2025. URL https://arxiv.org/abs/2512.23236.
Fei Liu, Xialiang Tong, Mingxuan Yuan, Xi Lin, Fu Luo, Zhenkun Wang, Zhichao Lu, and Qingfu Zhang. Evolution of Heuristics: Towards Efficient Automatic Algorithm Design Using Large Language Model. arXiv preprint arXiv:2401.02051, 2024. URL https://arxiv.org/abs/2401.02051.
Gang Liu, Yihan Zhu, Jie Chen, and Meng Jiang. Scientific algorithm discovery by augmenting AlphaEvolve with deep research. arXiv preprint arXiv:2510.06056, 2025.
Shu Liu, Shubham Agarwal, Monishwaran Maheswaran, Mert Cemri, Zhifei Li, Qiuyang Mang, Ashwin Naren, Ethan Boneh, Audrey Cheng, Melissa Z Pan, et al. Evox: Meta-evolution for automated discovery. arXiv preprint arXiv:2602.23413, 2026a.
Shu Liu, Mert Cemri, Shubham Agarwal, Alexander Krentsel, Ashwin Naren, Qiuyang Mang, Zhifei Li, Akshat Gupta, Monishwaran Maheswaran, Audrey Cheng, et al. SkyDiscover: A Flexible, Adaptive Framework for AI-Driven Scientific and Algorithmic Discovery, 2026b. URL https://skydiscover-ai.github.io/blog.html. Official project documentation.
Chris Lu, Cong Lu, Robert Tjarko Lange, Yutaro Yamada, Shengran Hu, Jakob Foerster, David Ha, and Jeff Clune. Towards end-to-end automation of AI research. Nature, 651:914–919, 2026. doi: 10.1038/s41586-026-10265-5. URL https://www.nature.com/articles/s41586-026-10265-5.
Chang Ma, Linh Trinh, Matt Bucci, Aviv Regev, and Hanchen Wang. Orion: Towards lab automation with computer-using agents. bioRxiv, pp. 2026–06, 2026.
Xinbei Ma, Yeyun Gong, Pengcheng He, Hai Zhao, and Nan Duan. Query rewriting for retrieval-augmented large language models. arXiv preprint arXiv:2305.14283, 2023.
Yoshitomo Matsubara, Naoya Chiba, Ryo Igarashi, and Yoshitaka Ushiku. Rethinking symbolic regression datasets and benchmarks for scientific discovery. Journal of Data-centric Machine Learning Research, 1(3):1–38, 2024. URL https://data.mlr.press/assets/pdf/v01-3.pdf.
National Institute of Standards and Technology. StRD dataset Chwirut2. Statistical Reference Datasets, n.d. URL https://www.itl.nist.gov/div898/strd/nls/data/chwirut2.shtml. Accessed September 9, 2026.
Alexander Novikov, Ngân Vũ, Marvin Eisenberger, Emilien Dupont, Po-Sen Huang, Adam Zsolt Wagner, Sergey Shirobokov, Borislav Kozlovskii, Francisco JR Ruiz, Abbas Mehrabian, et al. Alphaevolve: A coding agent for scientific and algorithmic discovery. arXiv preprint arXiv:2506.13131, 2025.
OpenAI. GPT-5.6: Frontier intelligence that scales with your ambition, July 2026. URL https://openai.com/index/gpt-5-6/. Accessed: 2026-09-24.
Anne Ouyang, Simon Guo, Simran Arora, Alex L Zhang, William Hu, Christopher Ré, and Azalia Mirhoseini. Kernelbench: Can llms write efficient gpu kernels? arXiv preprint arXiv:2502.10517, 2025.
Tom Packebusch and Stephan Mertens. Low autocorrelation binary sequences. Journal of Physics A: Mathematical and Theoretical, 49(16):165001, 2016. doi: 10.1088/1751-8113/49/16/165001. URL https://arxiv.org/abs/1512.02475.
Reid Pryzant, Dan Iter, Jerry Li, Yin Tat Lee, Chenguang Zhu, and Michael Zeng. Automatic Prompt Optimization with "Gradient Descent" and Beam Search. arXiv preprint arXiv:2305.03495, 2023. URL https://arxiv.org/abs/2305.03495.
Ao Qu, Han Zheng, Zijian Zhou, Yihao Yan, Yihong Tang, Shao Yong Ong, Fenglu Hong, Kaichen Zhou, Chonghe Jiang, Minwei Kong, et al. CORAL: Towards Autonomous Multi-Agent Evolution for Open-Ended Discovery. arXiv preprint arXiv:2604.01658, 2026. URL https://arxiv.org/abs/2604.01658.
Bernardino Romera-Paredes, Mohammadamin Barekatain, Alexander Novikov, Matej Balog, M Pawan Kumar, Emilien Dupont, Francisco JR Ruiz, Jordan S Ellenberg, Pengming Wang, Omar Fawzi, et al. Mathematical discoveries from program search with large language models. Nature, 625(7995):468–475, 2024.
Samuel Schmidgall and Michael Moor. AgentRxiv: Towards Collaborative Autonomous Research. arXiv preprint arXiv:2503.18102, 2025. URL https://arxiv.org/html/2503.18102.
Samuel Schmidgall, Yusheng Su, Ze Wang, Ximeng Sun, Jialian Wu, Xiaodong Yu, Jiang Liu, Michael Moor, Zicheng Liu, and Emad Barsoum. Agent Laboratory: Using LLM Agents as Research Assistants. In Findings of the Association for Computational Linguistics: EMNLP 2025, pp. 5977–6043, 2025. doi: 10.18653/v1/2025.findings-emnlp.320.URL https://aclanthology.org/2025.findings-emnlp.320/.
Zhihong Shao, Yeyun Gong, Yelong Shen, Minlie Huang, Nan Duan, and Weizhu Chen. Enhancing Retrieval-Augmented Large Language Models with Iterative Retrieval-Generation Synergy. arXiv preprint arXiv:2305.15294, 2023. URL https://arxiv.org/abs/2305.15294.
Asankhaya Sharma. OpenEvolve: An open-source evolutionary coding agent. https://github.com/algorithmsuperintelligence/openevolve, 2025. GitHub repository.
Weijia Shi, Sewon Min, Michihiro Yasunaga, Minjoon Seo, Richard James, Mike Lewis, Luke Zettlemoyer, and Wen-tau Yih. REPLUG: Retrieval-Augmented Black-Box Language Models. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 8371–8384, 2024. doi: 10.18653/v1/2024.naacl-long.463. URL https://aclanthology.org/2024.naacl-long.463/.
Huatong Song, Jinhao Jiang, Yingqian Min, Jie Chen, Zhipeng Chen, Wayne Xin Zhao, Lei Fang, and Ji-Rong Wen. R1-Searcher: Incentivizing the Search Capability in LLMs via Reinforcement Learning. arXiv preprint arXiv:2503.05592, 2025. URL https://arxiv.org/abs/2503.05592.
Qiushi Sun, Zhoumianze Liu, Chang Ma, Zichen Ding, Fangzhi Xu, Zhangyue Yin, Haiteng Zhao, Zhenyu Wu, Kanzhi Cheng, Zhaoyang Liu, et al. Scienceboard: Evaluating multimodal autonomous agents in realistic scientific workflows. arXiv preprint arXiv:2505.19897, 2025.
Jiabin Tang, Lianghao Xia, Zhonghang Li, and Chao Huang. AI-Researcher: Autonomous Scientific Innovation. In Advances in Neural Information Processing Systems, volume 38, 2025. doi: 10.52202/085713-0320. URL https://proceedings.neurips.cc/paper_files/paper/2025/hash/0d904d300a105809a2114d727851e759-Abstract-Conference.html.
Qwen Team. Qwen3.5: Accelerating productivity with native multimodal agents, February 2026. URL https://qwen.ai/blog?id=qwen3.5.
Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, and Ashish Sabharwal. Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 10014–10037, 2023. doi: 10.18653/v1/2023.acl-long.557. URL https://aclanthology.org/2023.acl-long.557/.
Yiping Wang, Shao-Rong Su, Zhiyuan Zeng, Eva Xu, Liliang Ren, Xinyu Yang, Zeyi Huang, Xuehai He, Luyao Ma, Baolin Peng, et al. Thetaevolve: Test-time learning on open problems. arXiv preprint arXiv:2511.23473, 2025.
WILL Team. Evaluation-driven scaling for scientific discovery. arXiv preprint arXiv:2604.19341, 2026. URL https://arxiv.org/abs/2604.19341.
Minghao Yan, Bo Peng, Benjamin Coleman, Ziqi Chen, Zhouhang Xie, Shuo Chen, Zhankui He, Noveen Sachdeva, Isabella Ye, Weili Wang, et al. PACEvolve: Enabling Long-Horizon Progress-Aware Consistent Evolution. arXiv preprint arXiv:2601.10657, 2026. URL https://arxiv.org/abs/2601.10657.
Shi-Qi Yan, Jia-Chen Gu, Yun Zhu, and Zhen-Hua Ling. Corrective Retrieval Augmented Generation. arXiv preprint arXiv:2401.15884, 2024. URL https://arxiv.org/abs/2401.15884.
Chengrun Yang, Xuezhi Wang, Yifeng Lu, Hanxiao Liu, Quoc V. Le, Denny Zhou, and Xinyun Chen. Large Language Models as Optimizers. arXiv preprint arXiv:2309.03409, 2023. URL https://arxiv.org/abs/2309.03409.
Xin-She Yang, Christian Huyck, Mehmet Karamanoglu, and Nawaz Khan. True global optimality of the pressure vessel design problem: A benchmark for bio-inspired optimisation algorithms. International Journal of Bio-Inspired Computation, 5(6):329–335, 2013. doi: 10.1504/IJBIC.2013.058910. URL https://arxiv.org/abs/1403.7793.
Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. ReAct: Synergizing Reasoning and Acting in Language Models. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=WE_vluYUL-X.
Seonghoon Yu, Dongjun Nam, Byung-Kwan Lee, and Jeany Son. Hide to see: Reasoning-prefix masking for visual-anchored thinking in vlm distillation. arXiv preprint arXiv:2605.11651, 2026.
Tian Yu, Shaolei Zhang, and Yang Feng. Auto-RAG: Autonomous Retrieval-Augmented Generation for Large Language Models. arXiv preprint arXiv:2411.19443, 2024. URL https://arxiv.org/abs/2411.19443.
Mert Yuksekgonul, Federico Bianchi, Joseph Boen, Sheng Liu, Zhi Huang, Carlos Guestrin, and James Zou. TextGrad: Automatic "Differentiation" via Text. arXiv preprint arXiv:2406.07496, 2024. URL https://arxiv.org/abs/2406.07496.
Mert Yuksekgonul, Daniel Koceja, Xinhao Li, Federico Bianchi, Jed McCaleb, Xiaolong Wang, Jan Kautz, Yejin Choi, James Zou, Carlos Guestrin, et al. Learning to discover at test time. arXiv preprint arXiv:2601.16175, 2026.
Jenny Zhang, Shengran Hu, Cong Lu, Robert Lange, and Jeff Clune. Darwin Godel Machine: Open-Ended Evolution of Self-Improving Agents. arXiv preprint arXiv:2505.22954, 2025. URL https://arxiv.org/abs/2505.22954.
Jenny Zhang, Bingchen Zhao, Wannan Yang, Jakob Foerster, Jeff Clune, Minqi Jiang, Sam Devlin, and Tatiana Shavrina. Hyperagents. arXiv preprint arXiv:2603.19461, 2026. URL https://arxiv.org/abs/2603.19461.
Appendix Contents
A Extended Related Work 18
B Method Details 18
B.1 Outer Loop: Solution Optimization 18
B.2 Knowledge-Gap-Based Retrieval Gating 19
B.3 Inner Loop: Query Optimization 19
B.4 Inference Settings and Call Budget 20
B.5 Coupling Web Search with Solution Evolution 21
C Experimental Setup Details 22
C.1 Task Descriptions 22
C.2 Oracle Document Construction 27
D Additional Experimental Results 27
D.1 OpenEvolve with and without Oracle Documents 27
D.2 OpenEvolve with and without Parallel Generation 27
D.3 Inner-loop Budget Ablations 30
D.4 Full OpenEvolve Results 30
E Behavior and Search Analysis 33
E.1 Behavior Flags and Additional Examples 33
E.2 Language, Resources, and Reuse in Web Search 35
E.3 Failure Analysis of Retrieved Evidence Use 41
F Limitations 42
G Discussions 42
H Broader Impact 42
I Trajectories of the Bi-Level Loop 42
I.1 Swap Reduction: depth weighting persists despite repeated search misses 43
I.2 Erdős minimum overlap: a radar codeword seeds later improvements 49
I.3 Voyager 2: documentation lookup repeats defaults already in the prompt 55
I.4 Circle packing (n=26): a generated solver exceeds the queried target 58
I.5 Erdős minimum overlap, second run: runtime witness reuse improves the best 61
I.6 Galileo: a promising retrieval produces a worse child 65
I.7 Rosetta: published seeds and implementation details support a better tour 67
J Prompt Templates 72
K Best Programs of EVODUET 77
K.1 Swap Reduction: short lookahead reduces routing cost on Q20 78
K.2 Rosetta: refining a published tour lowers maneuver cost 89
K.3 Voyager 2: constrained refinement improves the existing tour 103
K.4 Denoising: mixing diffusion operators improves average accuracy 110
K.5 Domain Mixture: separate domain fits improve held-out prediction 114
K.6 Parallel Scaling: a fixed basis supports accurate extrapolation 116
K.7 Erdős: public witnesses support a small numerical refinement 116
K.8 Hadamard: structured constructions recover the reference determinant 123
K.9 Sums/Diffs: construction sweeps and local search improve the reference 129
K.10 Circle Packing (n = 26): joint refinement matches the reference 136
K.11 Circle Packing (n = 32): multiple layouts recover the reference score 141
K.12 Discovered Objects 148
A. Extended Related Work
Evolving solutions and search strategies. LLM-driven discovery methods differ in whether they optimize candidate programs, search procedures, prompts, or model parameters. FunSearch (Romera-Paredes et al., 2024), AlphaEvolve (Novikov et al., 2025), OpenEvolve (Sharma, 2025), and CodeEvolve (Assumpção et al., 2025) use execution feedback to evolve programs. EoH (Liu et al., 2024) jointly evolves heuristic descriptions and code. At the search level, ShinkaEvolve (Lange et al., 2025), PACEvolve (Yan et al., 2026), and AdaEvolve (Cemri et al., 2026) adapt selection, context management, and exploration, respectively, while EvoX (Liu et al., 2026a) jointly evolves solutions and search strategies. The Darwin Gödel Machine (Zhang et al., 2025), Hyperagents (Zhang et al., 2026), and Meta-Harness (Lee et al., 2026e) optimize agent or harness code. CORAL (Qu et al., 2026) coordinates collaborative evolution through shared memory, and SkyDiscover (Liu et al., 2026b) provides modular discovery infrastructure. OPRO (Yang et al., 2023), APO (Pryzant et al., 2023), TextGrad (Yuksekgonul et al., 2024), and GEPA (Agrawal et al., 2025) optimize prompts or textual variables using performance feedback or textual critiques. ThetaEvolve (Wang et al., 2025) and TTT-Discover (Yuksekgonul et al., 2026) update model parameters through reinforcement learning during search, while Kernel-Smith (Du et al., 2026) and Evolution Fine-Tuning (Lee et al., 2026f) train on evolutionary trajectories.
Web-augmented scientific discovery. DeepEvolve (Liu et al., 2025) sequentially couples deep research with program revision and evaluation, using prior evaluation outcomes to guide subsequent research. KernelEvolve (Liao et al., 2025) uses runtime diagnostics to guide retrieval for kernel optimization. AI co-scientist (Gottweis et al., 2025) integrates literature search into hypothesis generation and scientific review. Robin (Ghareeb et al., 2026) uses literature search to propose and assess candidate hypotheses, then incorporates experimental feedback into subsequent refinement. The AI Scientist (Lu et al., 2026), AI-Researcher (Tang et al., 2025), and Agent Laboratory (Schmidgall et al., 2025) connect literature search, computational experiments, and reporting. AgentRxiv (Schmidgall & Moor, 2025) and AgenticSciML (Jiang & Karniadakis, 2026) reuse accumulated research reports or method memories. Coscientist (Boiko et al., 2023), ChemCrow (Bran et al., 2024), and Biomni (Huang et al., 2026) combine external information with scientific tools.
Retrieval control and query refinement. Retrieval methods address when to search and how to refine queries. ReAct (Yao et al., 2023), IRCoT (Trivedi et al., 2023), Iter-RetGen (Shao et al., 2023), and Auto-RAG (Yu et al., 2024) guide successive retrieval steps using intermediate reasoning, answers, or observations. Self-RAG (Asai et al., 2023), FLARE (Jiang et al., 2023), Adaptive-RAG (Jeong et al., 2024), and CRAG (Yan et al., 2024) base retrieval decisions on reflection, uncertainty, question complexity, and evidence quality, respectively. Rewrite-Retrieve-Read (Ma et al., 2023) learns query reformulation, while RQ-RAG (Chan et al., 2024) learns rewriting, decomposition, and disambiguation. Search-R1 (Jin et al., 2025), R1-Searcher (Song et al., 2025), and ReSearch (Chen et al., 2025) learn search policies from outcome rewards. REPLUG (Shi et al., 2024) uses feedback from a frozen LM to train a retriever, while ITER (Chen et al., 2026) trains a retriever conditioned on reasoning and search histories. EVODUET couples solution and query evolution through a shared task objective. Its knowledge-state gate chooses whether to retrieve new documents, reuse stored documents, or skip retrieval. The inner loop selects evidence using predicted candidate scores and refines queries without generating or evaluating programs. The outer loop records measured outcomes to inform subsequent retrieval decisions. Model parameters and prompt templates remain fixed throughout.
B. Method Details
Algorithm 1 presents the overall EVODUET procedure, and Algorithm 2 details its query optimization loop. The inner loop refines queries using predicted candidate scores; the outer loop evaluates solutions and records their actual scores. All model calls use the same frozen .
B.1. Outer Loop: Solution Optimization
Candidate generation and selection. The gate sets for and for or , including retrievals that return no usable documents. Candidates are sampled independently in parallel from the same prompt and evaluated after successful generation and parsing. Only the best valid candidate under the task's optimization direction is passed to ; ties favor the earlier candidate. If all candidates fail, the scaffold applies its existing retry policy.
Algorithm 1 EVODUET: overall procedure.
Input: Task , selection policy , outer iterations
Input: Candidate count , retrieval settings
1:
2: for do
3:
4:
5:
6: if then
7: stored documents identified by the gate
8: else if then
9:
10: end if
11: if , otherwise 1
12: Generate , in parallel
13: Evaluate candidates with and collect valid candidates in
14: if then
15:
16:
17: Update with evidence and the measured outcome if
18: else
19: Apply the scaffold's retry policy
20: end if
21: end for
22: return best evaluated solution
Search database update. The search database associates the selected candidate's outcome with the documents it received. A record contains the executed queries, retained documents and their predicted scores, document identifiers, actual parent and candidate scores and , and evaluator feedback. Each prediction assumes one document alone, whereas the candidate uses the retained set jointly; the measured outcome therefore belongs to that complete attempt. Intermediate rounds receive no separate measured outcome. Failed evaluations leave the outcome unknown. Candidate code, responses, evaluations, and intermediate retrieval results are retained in the iteration trace.
B.2. Knowledge-Gap-Based Retrieval Gating
Gate inputs and outputs. A single call reads the parent solution, the scaffold's evolutionary history, and recent search records. It returns the knowledge state , a decision , and document identifiers when . The knowledge state distinguishes prior model knowledge, findings from searches and evaluations, and unresolved questions about the current solution. The gate runs before population analysis, so and require no additional analysis call.
Stored search context. The gate, query construction, and evidence scoring share a snapshot of the ten most recent records in , fixed throughout the outer iteration. Each record shows its queries, retained predictions, document identifiers, and measured outcomes, with up to three document bodies. Bodies are truncated to 10,000 characters, preferring full text over a snippet when available. This context lets the model relate previously retrieved evidence to actual optimization outcomes.
No-op and look-up. Under , the solution prompt receives . Under , the gate selects stored document identifiers, and their bodies are added to the solution prompt. Both decisions bypass the inner loop and make no web-search call.
B.3. Inner Loop: Query Optimization
Algorithm 2 is invoked only under and returns the documents used for solution generation.
Population state descriptor. After a decision, deterministic statistics summarize the retained population in : its score distribution, recent parent-to-child outcomes, and parent-selection frequencies. Following EvoX,
Algorithm 2 Inner loop: query optimization.
Input: rounds, queries per round, documents per query, local pool capacity
1: function OPTIMIZEQUERIES(, , , )
2: retained solutions in ;
3: ; ; initialize an empty score cache
4:
5: for do
6: , in parallel
7:
8:
9:
10:
11:
12: if then
13:
14: Cache validated predictions; preserve previously cached scores
15: end if
16:
17:
18: end for
19: return
20: end function
converts these statistics into factual observations without additional interpretation. The call is skipped if the population is empty. The parent, its score, the evolutionary history, and remain fixed across all inner rounds.
Query construction. Each round generates independent responses to the same query prompt in parallel. A response contains one query, its keywords, target source type, intended discovery direction, and rationale; the query text is limited to 500 characters. Round 1 uses . Later rounds additionally receive the retained documents and their predicted scores, and use the updated knowledge state to target the remaining gaps.
Web search and document pooling. Queries that differ only in whitespace are executed once per round. Each distinct valid query is sent to Tavily with advanced search depth and returns up to documents. The results are merged with and deduplicated using the URL or provider identifier, title, and raw body. The pool therefore contains at most documents in the first round and thereafter. A discarded document re-enters the pool only if a later search returns it again.
Hypothetical evidence scoring and knowledge update. When unscored documents are present, one model call predicts their absolute candidate scores on the evaluator's scale and updates the knowledge state. Each prediction estimates the score obtained by improving the fixed parent using document alone. Validated predictions are cached for the current inner loop and reused if the document appears again. Up to documents with the best predicted scores are retained, with ties resolved in pool order. If no document needs scoring, the call is skipped and . After round , the final local pool of up to documents is passed to the outer loop. Their bodies, titles, and URLs enter the solution prompt without a separate summarization call.
Validation and failures. Only finite predictions for valid, previously unscored document identifiers enter the ranking; existing predictions cannot be overwritten. A complete valid response updates the knowledge state. Partial responses retain valid predictions while preserving the previous knowledge state, and a failed scoring call preserves both the previous retained set and state. Failed searches consume their attempts, and malformed query samples are not replaced. All rounds run without early stopping. If no usable evidence is retained, the outer loop receives .
B.4. Inference Settings and Call Budget
Settings. The default retrieval budget is rounds, query per round, documents per query, and documents retained in the local pool. The entire final local pool enters the solution prompt. We evaluate and for candidate generation. All model calls use temperature 0.7, top- 0.95, medium reasoning effort, and up to 32,768 output tokens. Gate, query, and evidence-scoring calls use user-only prompts with tools disabled. Population analysis uses EvoX's system prompt and supplies the deterministic statistics in the user message.
Per-iteration budget. The following counts exclude retries. Under RETRIEVE, the model-call budget includes one gate, at most one population analysis, RJ query constructions, and up to evidence-scoring calls. With the default settings, the limits are eight retrieval-related model calls and three web searches. Candidate generation and evaluation follow separately.
| Decision | Retrieval LLM calls | Web searches | Generations |
|---|---|---|---|
| NO-OP | 1 | 0 | 1 |
| LOOK-UP | 1 | 0 | N |
| RETRIEVE | N |
B.5. Coupling Web Search with Solution Evolution
Figure 9 compares three ways to integrate web search into OpenEvolve: joint-level retrieval (Table 2), sequential retrieval as in DeepEvolve (Liu et al., 2025), and bi-level retrieval in EVODUET. They differ in when they search, what guides their queries, and how they reuse search results.
How search meets the solution loop
Search
Solution loop
Gate
Packed loops
Joint-level
OpenEvolve + search tool
Solution Loop
Search tool
Search inside the solution step
Sequential
DeepEvolve (Liu et al., 2025)
proposal
Deep Research
Solution Loop
current program
Search before every iteration
Bi-level
EvoDuet (this work)
knowledge-gap gate
Search Loop
Solution Loop
Search co-evolves with solutions
When to search
every iteration
every iteration
✓ gate: retrieve/look-up/no-op
What guides search
LLM's ad-hoc queries
planned research questions
✓ knowledge gap → predicted gain
Search memory
—
—
✓ search DB (look-up)
Figure 9: Three ways to couple web search with solution evolution. Top: search runs within generation (joint-level), precedes generation (sequential), or co-evolves with solutions (bi-level). Blue denotes search, violet solution evolution, and amber the knowledge-gap gate; the dashed overlap marks the coupling between the two loops. Bottom: search timing, query guidance, and memory for reuse across iterations. Checkmarks highlight EVODUET's design choices.
Search placement changes how evidence enters the solution loop. Joint-level retrieval runs during program generation: the LLM writes queries alongside program edits and must call Tavily at least once per iteration, with up to three tool rounds. Sequential retrieval, as in DeepEvolve, runs a deep-research agent before generation at every iteration. Given the current program and programs selected as inspiration, the agent plans research questions, searches the web, and writes a proposal. Reflection can revisit planning or search when it judges the report incomplete; a coding agent then implements the proposal, followed by debugging and evaluation. Both joint-level and sequential retrieval are single-level: neither scores queries or documents against the task objective.
EVODUET couples query and solution evolution through a knowledge-gap gate ( 3). The gate reads the current knowledge state and selects RETRIEVE, LOOK-UP, or NO-OP. Under RETRIEVE, the inner loop refines queries over R rounds and selects documents using predicted program scores. The outer loop generates and evaluates programs, then stores the documents and measured outcomes in the search database to guide later gate decisions and queries.
Table 2: Joint-level versus bi-level retrieval (NDG, %).
| Method | Denoising | Sums/Diffs |
|---|---|---|
| No search | 0.0% | 14.8% |
| Joint-level | 43.2% | 42.9% |
| Bi-level | 84.5% | 76.0% |
Joint-level search repeatedly returns the same pages on Denoising. In the GPT-5.6-Luna trajectory analyzed in Section 2.3, joint-level retrieval returns 85 distinct URLs versus 248 for EVODUET; 88.1% of its returned URLs are repeats. Across eligible four runs, mean NDG at iteration 100 is 43.2% on Denoising and 42.9% on Sums/Diffs, compared with 84.5% and 76.0% for EVODUET (Table 2).
The DeepEvolve comparison uses published results. On Molecule and Burgers, DeepEvolve's released scores are 0.8149 and 0.6666, respectively, below our OpenEvolve baseline (0.8496 and 0.6937); EVODUET reaches 0.8524 and 0.7846 (Table 1c). The local scores are the best across available four runs with GPT-5.6-Luna at iteration 100; DeepEvolve was not rerun with the same model or search budget.
C. Experimental Setup Details
We evaluate on 31 tasks in two collections (Table 3). The descriptions below specify each task's optimization variables, constraints, and evaluation procedure. Arrows indicate whether lower (↓) or higher (↑) values are better. Unless stated otherwise, we report the evaluator's native objective.
Table 3: Task coverage.
| Domain | Tasks | # |
|---|---|---|
| Simple Scientific Optimization | Pressure Vessel, SINDy, Batch Reactor, LABS-27, LJ-13, 10 Chwirut2, Perovskites, SRSD, GuacaMol, Summit | 10 |
| Quantum compilation | Swap Reduction | 1 |
| Astrodynamics | Cassini, Galileo, Mariner 10, Rosetta, Voyager 2 | 5 |
| Scientific algorithms | Denoising | 1 |
| AI foundations | Domain Mixture, U Shape, LR & BSZ, Parallel | 4 |
| Algorithm engineering | AHC039, AHC058 | 2 |
| Mathematics | Erdős, AC1–AC3, CP (, 32), Hadamard, Sums/Diffs | 8 |
| Total | 31 |
C.1. Task Descriptions
C.1.1. Simple Scientific Optimization
This collection consists of ten tasks constructed from public sources. For each task, an oracle document was retrieved when the task was created (Appendix C.2). We describe the optimization problem and report the scores of both the initial program and the solution stated in the oracle document.
Pressure Vessel Design (Yang et al., 2013) (↓ cost)
The program specifies a vessel by its shell thickness , head thickness , inner radius , and length . The two thicknesses must be multiples of 0.0625 in, and the length is restricted to in. The objective is to minimize the fabrication cost
subject to the evaluator's thickness, volume, and dimension constraints. The initial program has a cost of 10,905.34. The oracle solution, taken from a SlideShare derivation of the optimum, has a cost of 6,059.71.
SINDy Cubic 2D (Brunton et al., 2016) (↓ NRMSE)
The input consists of 2,500 samples from a two-dimensional trajectory. The program returns the coefficients of a polynomial vector field of degree at most three. The evaluator measures how accurately the recovered field describes the dynamics and how accurately its integrated trajectory reproduces the reference trajectory. The objective is to minimize the mean of the vector-field and trajectory normalized root mean squared errors (NRMSEs).
The initial program’s field and trajectory NRMSEs are 0.670 and 1.197, respectively. The cubic-oscillator equation in the PySINDy oracle document gives corresponding errors of approximately zero and .
Batch Reactor Control (APMonitor, 2025) (↑ B(1))
The program controls the temperature of a batch reactor with consecutive reactions . It returns a schedule of 501 temperature values over , each constrained to [298, 398] K. The evaluator integrates the reaction kinetics under this schedule, and the objective is to maximize the terminal concentration of the intermediate product. The initial constant-temperature policy, , achieves 0.57706. The APMonitor GEKKO solution supplied by the oracle achieves 0.61076.
LABS-27 (Packebusch & Mertens, 2016) (↓ energy)
The low-autocorrelation binary sequence problem asks for a sequence with small correlations at nonzero shifts. Its aperiodic autocorrelation at lag k and its energy are
The program returns the sequence, and the objective is to minimize . The initial sequence has energy 177. The run-length-encoded optimum reported by Packebusch and Mertens in the oracle document has energy 37.
Lennard–Jones-13 (Cambridge Cluster Database, n.d.) (↓ energy)
The program returns the positions of 13 atoms in three-dimensional space. Writing , the objective is to minimize the reduced Lennard–Jones energy
Coincident atoms are invalid. The initial straight-chain configuration has energy -12.374, while the configuration supplied by the Cambridge Cluster Database oracle has energy -44.327.
NIST Chwirut2 (National Institute of Standards and Technology, n.d.) (↓ RSS)
Given NIST's 54 observations , the program estimates the three parameters of the nonlinear regression model . The objective is to minimize the residual sum of squares
The initial program uses NIST Start 1 and has an RSS of 14,794.79. The NIST-certified parameters in the oracle document give an RSS of 513.048.
OLYMPUS Perovskites (Häse et al., 2021a;b) (↓ bandgap)
The search space contains 192 compositions, each specified by an organic component, a cation, and a halide. The program selects one composition, and the evaluator returns its published HSE06 bandgap from the dataset. The objective is to minimize this bandgap. The initial composition has a bandgap of 5.3704 eV. The hydrazinium–Sn–I composition identified in the Gryffin tutorial oracle has a bandgap of 1.5249 eV.
SRSD Feynman I.27.6 (Matsubara et al., 2024) (↓ error)
The program returns a symbolic expression that predicts the focal distance from the three inputs . We use the official split of 8,000 training, 1,000 validation, and 1,000 test examples. The optimization objective is the mean squared relative error on the validation set. The initial expression has an error of 0.905. Equation 27.6 of the Feynman Lectures, supplied by the oracle, gives zero error.
GuacaMol (Brown et al., 2019) (↑ score)
The program proposes molecular structures as SMILES strings, with as the target molecular formula. The evaluator canonicalizes and deduplicates the proposals, then averages their formula-agreement scores over the top 159 structures. Missing structures contribute zero, so the objective rewards a collection of distinct matching structures. The initial program supplies 5 of the 159 structures and scores 0.0315. The PubChem isomer list supplied by the oracle gives a score of 1.0.
Summit Baumgartner (Felton et al., 2021; Baumgartner et al., 2019) (↑ yield)
The program specifies reaction conditions for an aniline C–N coupling: catalyst, base, base loading, temperature, and residence time. Five released emulators predict the yield under these conditions. Each prediction is clipped to , and the objective is to maximize their mean. The initial conditions score 0.655. The conditions in a row of the released dataset, identified by the oracle, score 1.0.
C.1.2. SIMPLETES
We use 21 tasks from SIMPLETES (WILL Team, 2026), together with their released initial programs and evaluators. For each task, the released best program or construction is re-evaluated with the same evaluator and serves as the SOTA anchor for NDG. The tasks cover the six domains below.
Quantum compilation. Swap Reduction searches over initial qubit mappings and routing decisions.
Swap Reduction ( SWAPs)
Given a logical circuit and a device connectivity graph, a Rust routing policy chooses the initial assignment of logical qubits to physical qubits and inserts SWAP operations as the circuit is processed. The resulting mapping must allow each two-qubit gate to execute on a hardware edge. The optimization target is to reduce the number of inserted SWAPs.
The evaluation scaffold contains 72 circuit–device cases across three topologies. Its native score measures the CNOT overhead saved relative to reference routings. In the paper, we report the number of added SWAPs on the 24 circuits assigned to the 20-qubit device.
Astrodynamics. Each program returns a spacecraft trajectory as a sequence of launch, flyby, deep-space maneuver, and arrival events, with an epoch and a state for each event. The evaluator checks the trajectory using DE430 ephemerides and two-body propagation, enforces the task's time windows and minimum flyby altitudes, and charges any speed mismatch at a flyby. The common objective is to minimize the total velocity-change budget, in km/s,
The five tasks differ in their destinations, permitted flyby bodies, and arrival conditions.
Cassini ()
The trajectory begins at Earth and ends with capture into a 115-day orbit around Saturn. Flybys may use Venus, Earth, Mars, or Jupiter. A feasible trajectory may contain at most six flybys and six deep-space maneuvers.
Galileo ()
The trajectory begins at Earth and ends with capture into a 210-day orbit around Jupiter. Venus and Earth are the permitted flyby bodies, and the trajectory is limited to five flybys and five deep-space maneuvers.
Mariner 10 (↓ Δv)
The trajectory travels from Earth to Mercury, with Venus as the only permitted flyby body. The arrival contribution to is zero when the arrival speed relative to Mercury is below .
Rosetta (↓ )
The trajectory travels from Earth to a rendezvous with comet 67P at a fixed arrival epoch. Flybys may use Earth or Mars, and each flyby must maintain an altitude of at least .
Voyager 2 (↓ )
The trajectory travels from Earth to a Neptune flyby, with intermediate flybys permitted at Jupiter, Saturn, and Uranus. The arrival contribution to is zero when the arrival speed relative to Neptune is below .
Scientific algorithms. These tasks evaluate algorithms for statistical estimation. Single-Cell RNA-seq Denoising maximizes reconstruction quality.
Single-Cell RNA-seq Denoising (↑ score)
The input is a matrix of noisy unique molecular identifier (UMI) counts. The program returns a denoised matrix of the same shape. For each dataset, the evaluator averages a normalized mean-squared-error score and a normalized Poisson score, with the additional requirement that the Poisson score be at least 0.97. The objective is to maximize this combined score. Program search uses the Pancreas dataset, while the reported result is the mean score on the held-out PBMC and Tabula datasets.
AI foundations. Each task asks the program to define a parametric predictive law and a routine for fitting it. The law is fitted separately for each evaluation group, subject to a task-specific parameter budget. Search is guided by training , whereas the paper reports held-out , clipped to . The tasks differ in their input variables, prediction targets, and held-out regimes.
Domain Mixture ()
The law predicts losses on five domains from the proportions of those domains in a training mixture. Evaluation covers four model sizes, with at most 35 fitted parameters per size. The test set contains 24 unseen mixtures, measuring how well the fitted law predicts losses for mixtures absent from training.
U Shape ()
The law predicts Brier score as a function of log compute on nine benchmarks. Each benchmark permits at most six fitted parameters. The held-out set contains 127 observations at higher compute, so the reported score measures extrapolation beyond the training regime.
LR & BSZ ()
The law predicts language-model loss from learning rate, batch size, data size, and model parameter count, using at most 26 fitted parameters. The test set contains 117 runs at a model size and data budget absent from training, assessing transfer of the fitted relationship to that held-out setting.
Parallel ()
The law predicts loss from model parameter count and the number of parallel streams. It is fitted on two datasets, with at most four parameters per dataset. Training uses observations with , and evaluation uses , testing extrapolation to a larger number of streams.
Algorithm engineering. We use two AtCoder Heuristic Contest problems from ALE-Bench (Imajuku et al., 2025). For each task, a C++ solver is evaluated on 150 public inputs with a 2 s limit per case. A run receives the sum of the official case scores, or zero if any case fails. The reported task score is the average over four runs.
AHC039: Purse Seine Fishing (↑ score)
Given the positions of mackerels and sardines, the solver returns an axis-parallel polygon describing a fishing region. The polygon may have at most 1,000 vertices and a perimeter of at most . The objective is to maximize the official score by enclosing as many mackerels and as few sardines as possible. We use ALE-Agent's fifth-place solution as the initial program.
AHC058: Apple Incremental Game (↑ score)
The solver chooses a sequence of machine-upgrade decisions over 500 turns. On each turn, it may perform one upgrade or take no action. If is the final apple count, the objective is to maximize the official score
The initial program performs no upgrades and receives a score of zero.
Mathematics. These tasks search for finite representations of mathematical constructions: step functions, circle packings, sign matrices, and integer sets. Each evaluator checks the construction and computes the objective defined below. Circle Packing at and constitutes two separate tasks.
Erdős Minimum Overlap (↓ )
The program specifies a step function satisfying
For this function, the evaluator computes , the maximum overlap between and its shifted complement. The objective is to minimize while maintaining the range and integral constraints.
First Autocorrelation Inequality, AC1 (↓ )
The program represents a nonnegative step function on by heights . Writing for the discrete convolution of the height sequence with itself, the objective is
The heights must have a positive sum so that the normalized objective is defined.
Second Autocorrelation Inequality, AC2 (↑ )
The program specifies a nonzero, nonnegative step function supported on . Let denote its self-convolution. The objective is to maximize
Third Autocorrelation Inequality, AC3 (↓ )
The program represents a step function on using signed heights . The objective is to minimize
The second expression is the evaluator's form for the step-height representation. Heights may be positive or negative, but their sum must be nonzero for the objective to be defined.
Circle Packing, and
For each of the two values of , the program returns centers and nonnegative radii for circles. Each circle must lie inside the unit square, and no two circles may overlap:
The objective is to maximize . The evaluator checks the geometric constraints with tolerance .
Hadamard, Order 29 ( ratio)
The program returns a matrix . The objective is to maximize . The evaluator computes the determinant exactly and reports its absolute value divided by a fixed normalization constant.
Sums and Differences ()
The program returns a set containing between 2 and 512 distinct integers in . Define its sumset and difference set as and . The objective is to maximize
The evaluator computes both sets from the submitted integers and scores their cardinalities through this ratio.
C.2. Oracle Document Construction
SIMPLETES. For each task, we give Claude Code (Claude Opus 5 with maximum reasoning effort, restricted to its WebSearch and WebFetch tools) the task instructions, the initial program, the evaluator, and the best program released by SimpleTES. It identifies the functional differences that let the best program score higher, writes a web-search query for each, and returns the documents it fetched, each with a summary limited to what the document states. The resulting oracle documents are semantic rather than verbatim. Although the prompt asks for each document's text as fetched, Claude Code's WebFetch returns the output of a smaller model that reads the page rather than the page itself, so a document carries what its source says about an improvement, such as a method, a formula, or a parameter setting, but not necessarily its wording or its full content.
Simple Scientific Optimization. The oracle documents of these ten tasks were collected with Claude Code when the tasks were created. Each states the task's solution directly, for example NIST's certified parameters for Chwirut2 or the Cambridge Cluster Database coordinates for Lennard–Jones-13, and we validate the stated solution with the task's evaluator; the boxes in Appendix C.1 give its score.
D. Additional Experimental Results
D.1. OpenEvolve with and without Oracle Documents
Table 4 reports the per-task mean and best NDG for the runs underlying Figure 3. We evaluate simple scientific optimization tasks at iteration 20 and the remaining tasks at iteration 100. Each condition reports the mean and maximum NDG over its available runs independently.
D.2. OpenEvolve with and without Parallel Generation
Parallel generation yields larger gains with oracle documents for GPT-5.6-Luna, but without them for Qwen3.5-9B (Table 5). Increasing from 1 to 8 raises average NDG by 15.0% with oracle documents and 9.8% without on the nine GPT-5.6-Luna tasks; the corresponding gains on the 12 Qwen3.5-9B tasks are 2.2% and 11.8%.
Table 4: Full results for OpenEvolve with and without oracle documents. Entries report Mean ± Std / Best NDG (%; higher is better) over four runs, where Std is the sample standard deviation and Best is the maximum run NDG. Δ reports oracle minus OpenEvolve for Mean / Best, computed before rounding. Bold marks the higher value for each statistic at the displayed precision. Row colors distinguish task groups. The overall row averages task means and task bests across all 31 tasks.
| Task | Qwen3.5-9B | GPT-5.6-Luna | ||||
|---|---|---|---|---|---|---|
| OpenEvolve | + Oracle | Δ (%) | OpenEvolve | + Oracle | Δ (%) | |
| Simple scientific optimization (10) | ||||||
| Pressure Vessel | 49.9±57.6 / 100.0 | 99.9±0.1 / 100.0 | +50.1 / 0.0 | 100.0±0.0 / 100.0 | 100.0±0.0 / 100.0 | 0.0 / 0.0 |
| SINDy (2D) | 99.8±0.2 / 100.0 | 99.8±0.1 / 100.0 | -0.1 / 0.0 | 100.0±0.0 / 100.0 | 100.0±0.0 / 100.0 | 0.0 / 0.0 |
| Batch Reactor | 38.1±46.3 / 100.0 | 87.2±20.0 / 99.4 | +49.1 / -0.6 | 99.5±0.6 / 100.1 | 100.0±0.0 / 100.1 | +0.5 / 0.0 |
| LABS (27) | 61.8±0.0 / 61.8 | 74.9±30.6 / 100.0 | +13.0 / +38.2 | 100.0±0.0 / 100.0 | 100.0±0.0 / 100.0 | 0.0 / 0.0 |
| LJ (13) | 96.0±7.9 / 100.0 | 100.0±0.1 / 100.0 | +4.0 / 0.0 | 100.0±0.0 / 100.0 | 100.0±0.0 / 100.0 | 0.0 / 0.0 |
| Chwirut2 | 100.0±0.0 / 100.0 | 100.0±0.0 / 100.0 | 0.0 / 0.0 | 100.0±0.0 / 100.0 | 100.0±0.0 / 100.0 | 0.0 / 0.0 |
| Perovskites | 68.3±22.4 / 96.7 | 81.3±19.6 / 96.7 | +12.9 / 0.0 | 97.4±0.8 / 98.1 | 97.9±0.6 / 98.1 | +0.5 / 0.0 |
| Feynman I.27.6 | 19.8±30.1 / 63.5 | 100.0±0.0 / 100.0 | +80.2 / +36.5 | 100.0±0.0 / 100.0 | 100.0±0.0 / 100.0 | 0.0 / 0.0 |
| GuacaMol | 56.7±50.4 / 100.0 | 100.0±0.0 / 100.0 | +43.3 / 0.0 | 100.0±0.0 / 100.0 | 100.0±0.0 / 100.0 | 0.0 / 0.0 |
| Baumgartner | 102.0±4.8 / 106.8 | 103.1±2.7 / 107.1 | +1.1 / +0.3 | 94.7±16.8 / 107.1 | 94.3±11.6 / 104.2 | -0.5 / -2.9 |
| Quantum compilation (1) | ||||||
| Swap Reduction | 5.8±4.9 / 10.7 | 11.9±16.8 / 23.8 | +6.1 / +13.1 | 21.9±29.3 / 63.2 | 63.4±20.1 / 77.6 | +41.5 / +14.4 |
| Astrodynamics (5) | ||||||
| Cassini | 31.4±12.9 / 43.4 | 39.8±29.4 / 60.5 | +8.4 / +17.1 | 73.8±9.3 / 81.7 | 77.4±14.3 / 96.2 | +3.5 / +14.5 |
| Galileo | 12.2±8.7 / 24.2 | 8.0±11.3 / 16.0 | -4.2 / -8.2 | 37.6±1.0 / 38.3 | 48.0±16.7 / 59.8 | +10.4 / +21.6 |
| Mariner 10 | 93.8±8.9 / 100.0 | 93.3±9.3 / 99.9 | -0.5 / -0.1 | 100.0±0.0 / 100.0 | 100.0±0.0 / 100.0 | 0.0 / 0.0 |
| Rosetta | 52.5±22.3 / 96.7 | 43.5±11.5 / 51.6 | -9.0 / -45.0 | 81.4±19.1 / 97.8 | 58.1±4.1 / 61.0 | -23.3 / -36.9 |
| Voyager 2 | 47.2±26.6 / 84.7 | 60.4±18.0 / 73.1 | +13.2 / -11.6 | 99.3±1.3 / 100.0 | 100.0±0.0 / 100.0 | +0.7 / 0.0 |
| Scientific algorithms (1) | ||||||
| Denoising | 17.9±32.1 / 79.5 | 17.5±24.7 / 35.0 | -0.4 / -44.5 | 22.1±44.2 / 88.4 | 29.9±22.2 / 45.6 | +7.8 / -42.8 |
| AI foundations (4) | ||||||
| Domain Mixture | 65.1±35.5 / 90.2 | 85.1±2.6 / 86.9 | +20.0 / -3.3 | 97.5±0.5 / 98.1 | 93.6±5.8 / 97.7 | -4.0 / -0.4 |
| U Shape | 34.3±53.2 / 109.7 | 33.3±47.2 / 66.7 | -0.9 / -43.0 | 0.0±0.0 / 0.0 | 50.0±70.7 / 100.0 | +50.0 / +100.0 |
| LR & BSZ | 52.9±33.1 / 87.0 | 31.5±44.5 / 62.9 | -21.4 / -24.0 | 23.9±30.1 / 62.4 | 38.3±54.1 / 76.5 | +14.3 / +14.1 |
| Parallel | 26.2±10.1 / 40.2 | 78.0±10.4 / 85.4 | +51.8 / +45.1 | 91.3±15.5 / 99.5 | 85.4±0.0 / 85.4 | -6.0 / -14.2 |
| Mathematics (8) | ||||||
| Erdős | 93.1±5.8 / 99.8 | 91.6±9.9 / 98.5 | -1.6 / -1.3 | 95.8±7.1 / 99.9 | 99.9±0.1 / 100.0 | +4.1 / 0.0 |
| AC1 | 27.3±15.8 / 50.8 | 20.3±17.9 / 32.9 | -7.0 / -17.9 | 42.5±7.3 / 52.8 | 51.1±15.4 / 62.3 | +8.6 / +9.5 |
| AC2 | 35.1±17.6 / 54.8 | 33.6±19.8 / 47.6 | -1.5 / -7.2 | 41.2±24.8 / 72.0 | 57.9±8.2 / 66.3 | +16.7 / -5.7 |
| AC3 | 79.8±11.1 / 91.8 | 81.5±18.6 / 94.6 | +1.7 / +2.9 | 99.7±0.1 / 99.8 | 99.6±0.1 / 99.7 | -0.1 / -0.1 |
| CP (n = 26) | 56.9±24.9 / 81.9 | 79.9±13.3 / 89.3 | +23.0 / +7.4 | 100.0±0.0 / 100.0 | 100.0±0.0 / 100.0 | 0.0 / 0.0 |
| CP (n = 32) | 75.1±4.1 / 78.7 | 85.0±2.2 / 86.6 | +9.9 / +7.8 | 100.0±0.0 / 100.0 | 99.9±0.2 / 100.0 | -0.1 / 0.0 |
| Hadamard | 44.3±3.3 / 47.9 | 46.1±1.9 / 47.5 | +1.8 / -0.4 | 73.1±17.5 / 90.8 | 75.8±25.9 / 98.2 | +2.7 / +7.4 |
| Sums/Diffs | 5.9±13.0 / 32.4 | 0.0±0.0 / 0.0 | -5.9 / -32.4 | 15.4±1.2 / 16.0 | 14.8±4.4 / 20.5 | -0.6 / +4.5 |
| Algorithm engineering (2) | ||||||
| AHC039 | 2.5±6.1 / 15.0 | 11.5±16.2 / 22.9 | +8.9 / +7.9 | 1.3±1.8 / 3.8 | 0.0±0.0 / 0.0 | -1.3 / -3.8 |
| AHC058 | 57.6±31.7 / 86.0 | 30.4±18.0 / 43.2 | -27.1 / -42.8 | 92.1±0.4 / 92.6 | 91.2±8.8 / 97.5 | -0.9 / +4.9 |
| Overall average (31 tasks) | 51.9 / 75.3 | 62.2 / 71.9 | +10.3 / -3.4 | 74.2 / 82.7 | 78.3 / 85.4 | +4.0 / +2.7 |
Table 5: Parallel generation with and without oracle documents. Entries show mean ± sample standard deviation / best NDG (%) at iteration 100. is minus within each method; bold marks the higher value.
| Task | OpenEvolve | OpenEvolve + Oracle | ||||
|---|---|---|---|---|---|---|
| (%) | (%) | |||||
| Qwen3.5-9B (12 tasks) | ||||||
| Quantum compilation | ||||||
| Swap Reduction | / 10.7 | / 13.0 | / 23.8 | / 78.2 | ||
| Astrodynamics | ||||||
| Cassini | / 43.4 | / 60.4 | / 60.5 | / 60.3 | ||
| Galileo | / 24.2 | / 35.9 | / 16.0 | / 35.5 | ||
| Mariner 10 | / 100.0 | / 100.0 | / 99.9 | / 100.0 | ||
| Rosetta | / 96.7 | / 98.6 | / 51.6 | / 77.7 | ||
| Voyager 2 | / 84.7 | / 97.4 | / 73.1 | / 92.1 | ||
| Scientific algorithms | ||||||
| Denoising | / 79.5 | / 85.7 | / 35.0 | / 67.3 | ||
| AI foundations | ||||||
| U Shape | / 109.7 | / 48.8 | / 66.7 | / 93.2 | ||
| LR & BSZ | / 87.0 | / 92.8 | / 62.9 | / 86.5 | ||
| Mathematics | ||||||
| AC2 | / 54.8 | / 44.4 | / 47.6 | / 66.0 | ||
| Sums/Diffs | / 32.4 | / 7.6 | / 0.0 | / 16.5 | ||
| Algorithm engineering | ||||||
| AHC058 | / 86.0 | / 92.2 | / 43.2 | / 43.2 | ||
| Overall average (12 tasks) | ||||||
| GPT-5.6-Luna (9 tasks) | ||||||
| Astrodynamics | ||||||
| Galileo | / 38.3 | / 60.3 | / 59.8 | / 42.0 | ||
| Rosetta | / 97.8 | / 99.8 | / 61.0 | / 99.5 | ||
| Scientific algorithms | ||||||
| Denoising | / 88.4 | / 80.3 | / 45.6 | / 86.8 | ||
| AI foundations | ||||||
| U Shape | / 0.0 | / 100.0 | / 100.0 | / 88.6 | ||
| Mathematics | ||||||
| Erdős | / 99.9 | / 100.0 | / 100.0 | / 99.9 | ||
| AC1 | / 52.8 | / 28.5 | / 62.3 | / 83.1 | ||
| AC2 | / 72.0 | / 58.2 | / 66.3 | / 58.9 | ||
| Sums/Diffs | / 16.0 | / 31.3 | / 20.5 | / 44.3 | ||
| Algorithm engineering | ||||||
| AHC058 | / 92.6 | / 94.5 | / 97.5 | / 90.9 | ||
| Overall average (9 tasks) | ||||||
D.3. Inner-loop Budget Ablations
Table 6: Inner-loop budget ablations with GPT-5.6-Luna.
| Setting | NDG (%) |
|---|---|
| 58.35% | |
| (default) | 81.77% |
| 34.28% |
| Setting | NDG (%) |
|---|---|
| (default) | 81.77% |
| () | 80.15% |
| () | 71.86% |
| () | 57.30% |
More inner-loop search is not better, in either direction. The inner loop is controlled by two budgets: the number of search rounds within one iteration, and the number of queries issued per round. Table 6a and Table 6b vary each one on Denoising with GPT-5.6-Luna. Rounds peak at the default: reaches 58.35% NDG, reaches 81.77%, and falls to 34.28%, so a single round gathers too little to act on while five spend the iteration reading instead of editing. Queries are worse than flat: gives 81.77%, gives 80.15% at and 71.86% at , and gives 57.30%.
D.4. Full OpenEvolve Results
Tables 7–10 report OpenEvolve scores with and without EVODUET, organized by task group.
Table 7: Quantum compilation and astrodynamics.
| Model / Method | Quantum compilation | Astrodynamics | ||||
|---|---|---|---|---|---|---|
| Swap ↓ | Cassini ↓ | Galileo ↓ | Mariner 10 ↓ | Rosetta ↓ | Voyager 2 ↓ | |
| Mean ± Std / Best | Mean ± Std / Best | Mean ± Std / Best | Mean ± Std / Best | Mean ± Std / Best | Mean ± Std / Best | Mean ± Std / Best |
| Qwen3.5-9B () | / | / | / | / | / | / |
| + EvoDUET | / | / | / | / | / | / |
| / | / | / | / | / | / | |
| Qwen3.5-9B () | / | / | / | / | / | / |
| + EvoDUET | / | / | / | / | / | / |
| / | / | / | / | / | / | |
| GPT-5.6-Luna () | / | / | / | / | / | / |
| + EvoDUET | / | / | / | / | / | / |
| / | / | / | / | / | / | |
| GPT-5.6-Luna () | / | / | / | / | / | / |
| + EvoDUET | / | / | / | / | / | / |
| / | / | / | / | / | / | |
| Gemini-3.8-Flash () | / | / | / | / | / | / |
| + EvoDUET | / | / | / | / | / | / |
| / | / | / | / | / | / | |
| Gemini-3.8-Flash () | / | / | / | / | / | / |
| + EvoDUET | / | / | / | / | / | / |
| / | / | / | / | / | / | |
Table 8: Scientific algorithms and AI foundations.
| Model / Method | Scientific algorithms | AI foundations | |||
|---|---|---|---|---|---|
| Denoising | Domain Mix | U Shape | LR & BSZ | Parallel | |
| Mean Std / Best | Mean Std / Best | Mean Std / Best | Mean Std / Best | Mean Std / Best | Mean Std / Best |
| Qwen3.5-9B () | / | / | / | / | / |
| + EvoDUET | / | / | / | / | / |
| / | / | / | / | / | |
| Qwen3.5-9B () | / | / | / | / | / |
| + EvoDUET | / | / | / | / | / |
| / | / | / | / | / | |
| GPT-5.6-Luna () | / | / | / | / | / |
| + EvoDUET | / | / | / | / | / |
| / | / | / | / | / | |
| GPT-5.6-Luna () | / | / | / | / | / |
| + EvoDUET | / | / | / | / | / |
| / | / | / | / | / | |
| Gemini-3.8-Flash () | / | / | / | / | / |
| + EvoDUET | / | / | / / | / | / |
| / | / | / | / | / | |
| Gemini-3.8-Flash () | / | / | / | / | / |
| + EvoDUET | / | / | / | / | / |
| / | / | / | / | / | |
Table 9: Mathematics.
| Model / Method | Mathematics | |||||||
|---|---|---|---|---|---|---|---|---|
| Erdős | AC1 | AC2 | AC3 | CP(n=26) | CP(n=32) | Hadamard | Sums/Diffs | |
| Mean Std / Best | Mean Std / Best | Mean Std / Best | Mean Std / Best | Mean Std / Best | Mean Std / Best | Mean Std / Best | Mean Std / Best | |
| Qwen3.5-9B () | / | / | / | / | / | / | / | / |
| + EVoDUET | / | / | / | / | / | / | / | / |
| / | / | / | / | / | / | / | / | |
| Qwen3.5-9B () | / | / | / | / | / | / | / | / |
| + EVoDUET | / | / | / | / | / | / | / | / |
| / | / | / | / | / | / | / | / | |
| GPT-5.6-Luna () | / | / | / | / | / | / | / | / |
| + EVoDUET | / | / | / | / | / | / | / | / |
| / | / | / | / | / | / | / | / | |
| GPT-5.6-Luna () | / | / | / | / | / | / | / | / |
| + EVoDUET | / | / | / | / | / | / | / | / |
| / | / | / | / | / | / | / | / | |
| Gemini-3.8-Flash () | / | / | / | / | / | / | / | / |
| + EVoDUET | / | / | / | / | / | / | / | / |
| / | / | / | / | / | / | / | / | |
| Gemini-3.8-Flash () | / | / | / | / | / | / | / | / |
| + EVoDUET | / | / | / | / | / | / | / | / |
| / | / | / | / | / | / | / | / | |
Table 10: Algorithm engineering.
| Model / Method | Algorithm engineering | |
|---|---|---|
| AHC039 | AHC058 | |
| Mean Std / Best | Mean Std / Best | |
| Qwen3.5-9B () | / | / |
| + EVoDUET | / | / |
| / | / | |
| Qwen3.5-9B () | / | / |
| + EVoDUET | / | / |
| / | / | |
| GPT-5.6-Luna () | / | / |
| + EVoDUET | / | / |
| / | / | |
| GPT-5.6-Luna () | / | / |
| + EVoDUET | / | / |
| / | / | |
| Gemini-3.8-Flash () | / | / |
| + EVoDUET | / | / |
| / | / | |
| Gemini-3.8-Flash () | / | / |
| + EVoDUET | / | / |
| / | / | |
E. Behavior and Search Analysis
E.1. Behavior Flags and Additional Examples
We define the six behavior flags in Figure 8, report additional retrieval patterns, and examine what the flags capture in individual runs. Appendix I provides the corresponding queries, sources, code edits, and evaluation results for seven worked cases.
E.1.1. Audit Setup and Counting Rules
Records and scope. The GPT-5.6-Luna audit covers 8,200 iterations from 82 runs on the 21 tasks in the main results. The Gemini-3.8-Flash audit covers 14 runs on seven tasks and uses iterations with recorded gate decisions. For each iteration, we inspect the gate decision, queries, retained documents, predicted child scores, and the selected child's changes relative to its parent. A document is promising when its predicted child score exceeds the parent's score. We call a retrieval predicted to help if it retains at least one such document.
Behavior definitions and flags. Each run is counted once per behavior, regardless of how often it occurs; categories can overlap. Regular expressions classify the final query as a known-result lookup, a method or implementation search, a problem-statement lookup, or other. The following rules identify candidate instances of each behavior. The case reviews below distinguish these flags from evidence that a retrieved idea was implemented and retained.
• Method transfer: A retrieved method or implementation detail becomes a program component. We flag a run when a method or implementation query retrieves a promising document and the child sets a new run best.
• Cross-domain transfer: The model adapts a method or artifact from another scientific field. The flag requires a new run best with a retained document from another field, identified by its title and host. General-purpose numerical tools, such as L-BFGS, trust-region methods, and SciPy, are excluded.
• Live documentation lookup: Retrieving documentation to check an interface. The flag requires an API, signature, version, release-note, or documentation query; a retained documentation page; and a child that beats its parent. It does not require a verified API correction.
• Target-informed reconstruction: A published value or construction guides development of a solver. We flag a run when a known-result query retrieves a promising document and the child sets a new run best, with no runtime download, copied code line, or pasted numerical solution.
• Public artifact reuse: A selected child downloads a published witness or solution at run time, or embeds numerical values from a published solution. Both forms are manually checked.
• Evidence-inspired over-reach: A retrieval predicted to help produces a child whose score falls below its parent’s by more than 10% of the run’s total gain. Runs with no positive total gain do not receive this flag.
Artifact checks. Direct code copying occurs in 19 GPT-5.6-Luna iterations (0.2%): 16 copy a single line containing an import, path, or function signature, and three copy part of a Sums/Diff's integer set. The numeric-copy check flags added code containing at least three numbers with five or more significant digits that appear together, exactly or after rounding, on a page retrieved by that iteration. Manual review identifies 59 GPT-5.6-Luna iterations (0.7%) in four runs: three reuse published Rosetta trajectories or flyby dates, and one reuses an AC2 step-function construction. Only one of these four runs retains a copied solution in its final best program. One Gemini-3.8-Flash iteration reuses an AC1 construction. We also inspect runtime network calls; an AHC039 identifier that matches the download detector is excluded as a false positive.
Additional patterns and denominators. Search miss with own progress denotes a new run best after a retrieval with no promising document (57 of 82 GPT-5.6-Luna runs). Identifier fixation denotes a PR or issue number, or an arXiv identifier, appearing in at least 30% of a run's retrieval queries; this is assessed only for runs with at least ten retrievals (6 of 75). Figure 8(b) separately measures whether the selected child beats its parent or the previous run best, including at iterations without search. Appendix E.3 compares program revision outcomes with and without documents across all three models.
E.1.2. What the Worked Cases Establish
Method transfer: Swap Reduction (Appendix I.1). At iteration 5, the gate describes the stored documents as “largely conceptual”. The retrieved dSABRE paper supplies exponential depth weighting, which becomes a term in the SWAP scorer and remains in every later best program. The final router adds 14,835 SWAPs on Q20, compared with 15,186 for the released SimpleTES program under the same evaluator. This case verifies implementation and persistence of a retrieved mechanism, beyond the method-transfer flag assigned to 55 of 82 runs.
Cross-domain transfer: Erdős minimum overlap (Appendix I.2). The model retrieves a low-sidelobe radar codeword, 04CF5A2471657C6F, and uses it to seed an optimizer for an additive number-theory problem. All four subsequent improvements to the run best retain the codeword, reducing from 0.381374 to 0.380915. The first improvement follows a look-up two iterations after retrieval. Inspection of the 13 flagged runs also finds weaker cases: the Anscombe transform is retrieved in three Denoising runs but appears in no candidate, while a quadratic-residue initialization appears in ten selected Erdős children but is absent from that run's best program. By comparison, a variable-projection formulation introduced on Parallel Scaling at iteration 30, which accounts for 56% of that run's gain, remains in its best program at iteration 84. A cross-domain source alone therefore does not establish lasting transfer.
Live documentation lookup: Voyager 2 (Appendix I.3). The rule flags 72 retrievals in 27 runs; 13 of these iterations set a new best. Of the 72, 21 ask for an astrodynamics wrapper already documented in the task prompt, and 18 target a pull-request diff. In Voyager 2, 28 of 46 retrievals name the wrapper, but the retained pages describe public Lambert solvers. At iteration 41, a new tour reduces from 3.457 to 3.447 km/s and explicitly passes lowpath=True, M=0. These are the existing defaults, so they do not change the solver branch; the final best program does not descend from this child. Across 300 wrapper-targeting retrievals, only two retain a page from the benchmark's source, and neither improves on its parent. The flag thus captures documentation-seeking behavior more broadly than verified API corrections.
Target-informed reconstruction: circle packing, n=26 (Appendix I.4). The first query names a best-known sum of radii, 2.635977. The returned pages supply no coordinates, and the model writes an LP-plus-SLSQP solver that raises the objective from 1.390 to 2.628 in one iteration. At iteration 7, it reaches 2.635983, exceeding the queried target and matching the SimpleTES reference to six decimals. Later queries seek the record holder's source file, but the best program contains a generated solver with no retrieved coordinates or runtime download. Target-informed reconstruction is flagged in 40 of 82 GPT-5.6-Luna runs and 12 of 14 Gemini-3.8-Flash runs.
Public artifact reuse: Erdős minimum overlap, second run (Appendix I.5). At iteration 17, the child downloads a published witness and retains its optimizer as a fallback, reducing the run’s best from 0.381017 to 0.380859. The best program without a runtime download reaches 0.381004. The program reported in the Erdős row of Table 1a retains this download, so its result depends on access to the published artifact (Appendix K). Two of 82 GPT-5.6-Luna runs download artifacts at run time; four others embed published numerical solutions, including three Rosetta trajectories or sets of flyby dates.
Evidence-inspired over-reach: Galileo (Appendix I.6). At iteration 33, a document’s predicted child score is 0.63701 (parent: 0.63692), but the rewrite scores 0.37713, raising from 1.926 to 3.873 km/s. The run best remains 0.63692; iteration 34 recovers this score from a different parent without retrieval. Across GPT-5.6-Luna runs, 20% of retrievals predicted to help produce a worse child, and 29 of 82 runs contain a drop exceeding 10% of their total gain. Predicted gains therefore require validation by the evaluator.
E.2. Language, Resources, and Reuse in Web Search
Multilingual queries are rare and confined to contest tasks. Figure 10 shows Japanese phrases in 134 of 32,008 parseable queries (0.42%), all on AHC039 or AHC058. These occur in 7 of 338 querying runs (2.1%), with none from Qwen3.5-9B. We inspect non-English-script matches and Latin-script language-detector candidates; the latter contain only English terms, names, and identifiers. This conservative screen covers query text only.

(a) Queries with Japanese phrases

(b) Runs with Japanese phrases
Figure 10: Japanese phrases in search queries. (a) Share of parseable queries containing Japanese phrases, including repeated outputs. (b) Share of querying runs with at least one such query. Purple and hatched blue bars denote N = 1 and N = 8. Accented names such as Erdős are excluded.
Resource preferences vary across task domains. GitHub is the most exposed host in four of the six task domains, reaching 94.9% of retrieval iterations in quantum compilation. arXiv leads AI foundations (69.6%) and algorithm engineering (48.5%; Figure 11). These rates measure source exposure only.
772 retrieval iterations

(a) Quantum compilation
2,255 retrieval iterations

(b) Astrodynamics
535 retrieval iterations

(c) Scientific algorithms
790 retrieval iterations
(d) AI foundations
Figure 11: Top-20 web sources by task domain. Hosts are ranked by the share of retrieval iterations. Each host counts once per iteration; hosts can co-occur. All panels use a common 0–100% scale and report retrieval counts.
462 retrieval iterations

(e) Algorithm engineering
5,829 retrieval iterations

(f) Mathematics
Figure 11: Top-20 web sources by task domain (continued). Exposure rates pool all available runs within each domain, using the same counting rule and scale.
Models differ in how they balance retrieval and reuse. Figure 12 aggregates runs within each task group and model. In mathematics, Qwen’s reuse share rises from 25.7% in iterations 1–10 to 55.0% in iterations 91–100, while Luna retrieves in 70.8% of the final ten slots.


(a) Quantum compilation


Luna

(b) Astrodynamics
Gemini


Luna

(c) Scientific algorithms
Gemini


Luna

(d) AI foundations
Gemini


Luna

(e) Algorithm engineering
Gemini


Luna

(f) Mathematics
Gemini

Retrieve Reuse No response
Figure 12: Aggregated search dynamics by task group and model. Curves show retrieval (blue), reuse (purple), and missing gate responses (gray) in ten-iteration bins. Each panel pools all available runs. Percentages use all scheduled slots, including no-op and malformed decisions. All panels share the same axes.
Late lookups can reuse documents retrieved at the start. In quantum compilation, 12 of GPT-5.6-Luna’s 21 resolved document requests during iterations 81–100 reuse documents first retrieved during iterations 1–10 (Figure 13).
Luna (n=98)

(a) Quantum compilation
Luna (n=2,454)

(b) Astrodynamics
Luna (n=857)

(c) Scientific algorithms
Luna (n=4,148)

(d) AI foundations
Luna (n=299)

(e) Algorithm engineering
Luna (n=3,031)

(f) Mathematics
1% of requests 10% of requests 50% of requests
Figure 13: GPT-5.6-Luna’s lookup provenance by task group. Arrows point from each lookup (purple, bottom) back to the document’s first recorded retrieval (blue, top), pooling all available runs. Both endpoints use ten-iteration bins; vertical arrows represent reuse within the same bin. Width encodes the within-panel share of resolved document ID–iteration pairs on a common square-root scale; n is their total. All 10,887 resolved pairs are shown; 63 unresolved pairs are excluded.
Stored documents remain in use across many iterations. Luna reuses documents with a median age of 17 iterations in scientific algorithms and 44 in quantum compilation (Figure 14). These distributions pool resolved requests within each task group and model.

(a) Quantum compilation

(b) Astrodynamics

(c) Scientific algorithms

(d) AI foundations

(e) Algorithm engineering

(f) Mathematics
□ 1-10 iterations old ■ 11-33 iterations old ✉ ≥34 iterations old
Figure 14: Source age at reuse by task group and model. Bars aggregate resolved document requests from available GPT-5.6-Luna and Gemini-3.8-Flash checkpoints. Age is the reuse iteration minus the first retrieval iteration; n counts document ID–iteration pairs. We exclude 63 unresolved Luna pairs. Qwen lacks saved checkpoint provenance and is omitted from this figure.
E.3. Failure Analysis of Retrieved Evidence Use
We analyze 33,784 iterations from 362 EVODUET runs across the 21 tasks with Qwen3.5-9B, GPT-5.6-Luna, and Gemini-3.8-Flash at . We consider each run's first 100 iterations and exclude iterations with recorded external service errors. Document exposure is verified from the generation prompt. Outcomes compare the selected child's recorded search score with its parent's.

(a) Evaluation failures at

(b) Outcomes with documents
Figure 15: Program revision outcomes with retrieved documents. (a) Evaluation failure rates with and without documents at ; both conditions use EVODUET. (b) Outcomes of 19,866 document iterations, with counts above the bars. All rates include unsuccessful generations in the denominator. The policy selects among eight candidates at document steps. Comparisons are observational because the gate selects document exposure.
Qwen's failures with documents extend beyond evaluation errors. At , Qwen fails evaluation in of document iterations versus without documents (Figure 15(a)). Only improve on the parent, versus for Luna and for Gemini; produce a lower score and retain no child. Evaluation errors alone therefore miss revisions that execute but fail to improve.
Qwen improves more often when selecting from parallel candidates. At , Qwen's document iterations improve on the parent in of cases and fail evaluation in . Luna and Gemini improve in and , respectively. Since RETRIEVE and LOOK-UP generate eight candidates per attempt while NO-OP generates one, these outcomes reflect both generation and selection.
Table 11: Examples of unsuccessful document use by Qwen at . Supplied documents, parent and child code, and evaluator records are inspected together. Scores are recorded search scores (). These cases illustrate mechanisms rather than their population frequencies.
| Task | Supplied evidence | Observed revision | Outcome |
|---|---|---|---|
| Sums/Diffs | A construction using the Chinese Remainder Theorem. | Adds random local search without implementing the supplied modular construction. | 1.05979 → 1.05979 |
| Circle Packing (26) | Joint optimization of centers and radii using SLSQP. | Adopts SLSQP but mixes grouped and interleaved parameter layouts; a returned circle extends outside the square. | Invalid |
| Denoising | The Anscombe transform and its inverse. | Omits the factor of two in the forward transform, while the inverse still divides by two before squaring. | 0.28849 → 0.28607 |
Retrieved methods are unused or incorrectly implemented in 26% of sampled Qwen revisions. Codex inspected 50 revisions sampled uniformly from 2,980 eligible Qwen revisions with documents and retained code at N = 1. Methods were unused in 3 (6%) and incorrectly implemented in 10 (20%); 22 incorporated or retained a method, 7 lacked actionable evidence, and 8 were uncertain. These model-assessed sample proportions exclude external errors and count only specific new discrepancies with supplied methods. Table 11 provides separate examples; Denoising's score decrease cannot be attributed to its transform error alone.
F. Limitations
Generalization Across Backbone Models. Our experiments cover GPT-5.6-Luna, Gemini-3.8-Flash, and Qwen3.5-9B. The benefits of EVODUET vary across these models: Qwen3.5-9B has lower overall NDG with EVODUET than with OpenEvolve alone at both N = 1 and N = 8. Our analysis also identifies cases in which this model ignores retrieved methods or implements them incorrectly. Evaluating more model families and sizes, and examining whether training for evidence selection and implementation reduces these failures, would help establish when a backbone can benefit from bi-level co-evolution.
Limited Gains on Algorithm Engineering Tasks. EVODUET does not consistently improve performance on algorithm engineering tasks such as AHC039 and AHC058. Figure 6b shows lower group-average NDG than OpenEvolve in four of the six model/budget settings, with an average decline of 1.6% across all six. These losses occur with both GPT-5.6-Luna and Qwen3.5-9B at N = 1 and N = 8. Further work is needed to determine how evidence selection, adaptation to task-specific heuristics, and the allocation of search effort contribute to these failures, and to improve the framework on these tasks.
Toward Multimodal and Multi-Turn Discovery. Scientific discovery often requires interpreting visual observations from experiments (Sun et al., 2025; Ma et al., 2026), motivating the use of vision-language models (Lee et al., 2024d; e; c; a; b; 2025a; b; 2026b; Kang et al., 2026; Lee et al., 2026d; a; Cho et al., 2026; Yu et al., 2026; Kim et al., 2026; Lee et al., 2026c) as mutation operators in our solution optimization loop. In our current framework, the inner loop evolves search queries, while the outer loop generates each candidate solution in a single turn, conditioned on the parent program, evolutionary history, and any retrieved evidence. Extending this bi-level co-evolution paradigm to multi-turn interactions (Lee et al., 2024f; h; i; g; 2025d; c) could enable the model to revisit explored lineages and iteratively refine both queries and solutions within a shared conversational context.
G. Discussions
The benefits of oracle documents vary across models and tasks. On Swap Reduction, the same documents raise NDG by 6.1% for Qwen3.5-9B and 41.5 for GPT-5.6-Luna, while both models lose performance on Rosetta (Figure 3c). Qwen's positive average oracle gain also shows that its losses with EVODUET do not imply a general inability to use documents. Those losses may reflect difficulties in identifying knowledge gaps, retrieving relevant evidence, or implementing it. The unused methods and incorrect implementations in Appendix E.3 provide examples of the last difficulty. These observations motivate training and evaluating evidence selection and implementation as separate skills, while accounting for baseline performance and search budget.
H. Broader Impact
EVODUET may make computational scientific discovery more efficient by helping researchers find and apply relevant knowledge from the web. However, unreliable sources can lead to incorrect conclusions, while reusing published solutions can result in overstated claims of novelty. To support auditing, we record retrieval and optimization trajectories. We also recommend explicit source attribution, independent validation of generated programs, and human oversight of downstream applications.
I. Trajectories of the Bi-Level Loop
We trace seven runs to show how knowledge gaps, queries, retrieved evidence, and code changes relate to measured outcomes (Table 12). Each case presents selected iterations in chronological order and illustrates a behavior flag or its limitations. Six runs use GPT-5.6-Luna with a candidate budget of N = 8; Rosetta uses GPT-5.6-Sol with one candidate. Appendix E.1 defines the flags and reports their frequency.
Table 12: Seven worked behavior cases. Each case links recorded queries and sources to program changes and evaluation results. The cases illustrate the flags in Appendix E.1; a flag alone does not establish successful use of the retrieved evidence.
| Behavior | Run | Main finding | Sec. |
|---|---|---|---|
| Method transfer | Swap Reduction | Retrieved depth weighting remains in later best programs despite repeated search misses. | I.1 |
| Cross-domain transfer | Erdős min. overlap | A radar codeword seeds later improvements in a number-theory task. | I.2 |
| Live documentation lookup | Voyager 2 | The added API keywords repeat defaults already given in the prompt. | I.3 |
| Target-informed reconstruction | CP (n=26) | A generated solver exceeds the value named in the first query. | I.4 |
| Public artifact reuse | Erdős, second run | A program that downloads a published witness improves the run’s best. | I.5 |
| Evidence-inspired over-reach | Galileo | A promising retrieval precedes a worse child; the run’s best is preserved. | I.6 |
| Public artifact reuse; method transfer | Rosetta | Published seeds and stored implementation details support a lower-cost tour. | I.7 |
Reading the records
| GATERecorded decision, knowledge-gap assessment, and rationale. | QUERYQuery and intent (query_type) for each search round. |
|---|---|
| SOURCESRetained documents and predicted child scores (estimated_child_score); stored sources on look-up. | QUOTEAn excerpt from a retrieved page’s raw_content. |
| EDITSelected additions and deletions in the parent-to-child code diff. | RESULTMeasured parent and child scores, plus the change in the run’s best. |
| Record notationMonospace labels are recorded fields; italic labels are derived. Ellipses mark omissions; square brackets mark editorial substitutions. Em-dashes are normalized. | Our annotationsCase summaries and behavior tags are our interpretation. In the records, violet tags identify audit behaviors; gray tags identify other patterns. |
| Gate decision retrieve look-up no-op | Record border and gate badge |
Score conventions. The result panels report recorded search-time scores, for which higher is better. Parent → child compares the selected candidate with the parent used to generate it; that parent need not be the previous iteration’s child. Best-so-far compares the run’s highest score before and after the iteration. Predicted document scores are not evaluation results. Native objectives have their own direction: lower is better for SWAP counts, , and ; higher is better for the sum of circle radii. The Erdős score is .
I.1. Swap Reduction: depth weighting persists despite repeated search misses
Exponential depth weighting from dSABRE remains in every later best program, providing evidence of method transfer. The final router adds 14,835 SWAPs on Q20, compared with SimpleTES’s 15,186 under the same evaluator. This advantage is specific to Q20 (Appendix K). Iteration 5 introduces the weighting; later edits tune it. Increasingly specific queries show identifier fixation: 79 of 94 retrievals name Qiskit PR #14912 without obtaining its diff. Iteration 77 sets a new best after another retrieval with no promising document, an instance of search miss with own progress.
Iterations 5, 7, 13, 66, and 77.
Iteration 5 · retrieve · best-so-far 6,957 → 11,326
GATE
decision retrieve
knowledge_state_analysis The strongest measured result is combined_score 6957.0 from the relative distance-delta scoring combined with component-aware initial layout. Attempt 3's more elaborate layout placement reduced the score to 6565.8, so that change should not be retained. Existing documents establish the SABRE/LightSABRE principles, especially normalized front/lookahead costs, relative candidate scoring, decay, depth, and critical-path heuristics. However, they do not...
reasoning Additional evidence would help because the current search documents are largely conceptual or generic Qiskit references and prior experiments have plateaued or regressed. Fresh exploration should target repository-specific routing context APIs and concrete implementations of depth-aware, critical-path, or other candidate-ranking heuristics beyond the already tried...
QUERY
round 1
query "SABRE" adaptive lookahead decay swap scoring weighted interaction frequency initial layout Rust GitHub
query_type Find a practical adaptive SABRE heuristic or interaction-frequency-based layout method that improves on fixed front-layer/lookahead weights and greedy component placement without requiring unavailable depth or...
round 2
query "SwapSelectionContext" Rust "front_layer" executable gate can_apply routing API
query_type Find repository-specific APIs or source code for detecting immediately executable front-layer gates and applying or scoring them, enabling a controlled addition of an executability reward or adaptive lookahead without...
round 3
query "precomputed_extended_set_logical_pairs" dependency depth BFS layer weighted lookahead Rust SABRE
query_type Find a repository-compatible method for assigning BFS or dependency depths to extended-set gates so the current flat lookahead score can be replaced by a controlled exponential depth-weighted variant.
SOURCES
title Structured Scaling of AI Discovery Across Diverse Scientific ...
url researchsquare.com/...df?c=1787913294000
estimated_child_score 6,968
title dSABRE: A SABRE-Style Router for Multi-Core Distributed Quantum Computers
url xarxiv.org/html/2605.21960v1
estimated_child_score 6,963
title dSABRE: A SABRE-Style Router for Multi-Core Distributed Quantum Computers
url xarxiv.org/html/2605.21960
estimated_child_score 6,963
QUOTE
url xarxiv.org/html/2605.21960v1
raw_content “...a-core graph. The tilde marks the departure from SABRE’s flat extended-set weighting: rather than treating all lookahead gates equally, the exponential factor (g) down-weights gates far from the front so that near-term successors dominate the lookahead signal; a deeper gate is more likely to be displaced by ...”
EDIT
solution: parent → child
+53 -1 8 of 54 changed lines shown
- pairs: Vec<usize, usize>,
self.pairs.push((a, b));
- fn weighted_score_delta(
swap: (usize, usize),
if self.pairs.is_empty() {
-
let mut weighted = 0.0;
-
let mut weights = 0.0;
-
for (index, &(x, y)) in self.pairs.iter().enumerate() {
RESULT
combined_score 6,957 → 11,326 (parent → child)
Q20 SWAPs 19,953 → 18,030
best-so-far 6,957 → 11,326
Iteration 5 · retrieve · best-so-far 6,957 → 11,326
(continued)
BEHAVIOR method transfer
Iteration 7 · retrieve · best-so-far 11,326 → 15,174
GATE
decision retrieve
knowledge_state_analysis The prior attempts established a substantial measured improvement from 6498 to 11325.6, but the three listed attempts have identical routing metrics, so they do not isolate which modifications caused the gain or whether the current heuristic is near a plateau. Existing documents support geometric lookahead decay and LightSABRE concepts such as depth, critical-path scoring, broader candidate neighborhoods, and immediate executability rewards. However, they ...
reasoning Additional evidence would help because the next promising improvements require implementation details absent from the stored documents. Reusing the existing high-level papers would largely repeat explored knowledge; a fresh search should target the exact Rust routing implementation and APIs, as well as validated LightSABRE candidate and scoring behavior.
QUERY
round 1
query site:github.com/Qiskit/qiskit "SwapSelectionContext" "critical_path" OR "delta_depth" OR "can_apply" Rust
query_type Find the current Rust SwapSelectionContext APIs and implementation for LightSABRE depth, critical-path, immediate-executability, and broader candidate-swap scoring.
round 2
query site:github.com/Qiskit/qiskit "SwapSelectionContext" "precomputed_extended_set_logical_pairs" "remaining_predecessor_counts" Rust sabre
query_type Find the current Qiskit Rust source implementation and concrete SwapSelectionContext APIs for BFS/dependency-depth extended-set construction, immediate gate executability checks, and safe broader candidate generation.
round 3
query site:github.com/Qiskit/qiskit "SwapSelectionContext" "precomputed_extended_set_logical_pairs" "remaining_predecessor_counts" Rust sabre
query_type Find the current Qiskit Rust source implementation and concrete SwapSelectionContext APIs for BFS/dependency-depth extended-set construction, immediate gate executability checks, and safe broader candidate generation.
SOURCES
title Port the rest of 'SabreSwap' to Rust · Issue #12280 · Qiskit/qiskit · GitHub
url github.com/Qiskit/qiskit/issues/12280
estimated_child_score 11,326
title qiskit/rust-toolchain.toml at main · Qiskit/qiskit · GitHub
url github.com/...b/main/rust-toolchain.toml
estimated_child_score 11,326
title Port the rest of 'SabreLayout' to Rust · Issue #12279 · Qiskit/qiskit · GitHub
url github.com/Qiskit/qiskit/issues/12279
estimated_child_score 11,326
QUOTE
url github.com/Qiskit/qiskit/issues/12280
raw_content “...! There was an error while loading. Please reload this page. There was an error while loading. Please reload this page. # Port the rest of ‘SabreSwap’ to Rust #12280 ‘SabreSwap’ ‘SabreSwap’ jakelishman ## Description @mtreinish ‘SabreSwap’ is primarily written in rust currently, there is just a small component of the pass…”
Iteration 7 · retrieve · best-so-far 11,326 → 15,174
(continued)
EDIT
solution: parent → child +19 -9 8 of 28 changed lines shown
- let gamma = 0.84_f64;
- let gamma = 0.70_f64;
- let Some((a, b)) = ctx.last_applied_swap() else { return; } else { } else if let Some((a, b)) = ctx.last_applied_swap() {
- let penalty_scale = (front_layer.len().max(1) as f64).sqrt() * 0.10;
- *score *= self.decay_state[swap.0].max(self.decay_state[swap.1]);
RESULT
combined_score 11,326 → 15,174 (parent → child) Q20 SWAPs 18,030 → 16,830 best-so-far 11,326 → 15,174
BEHAVIOR search miss with own progress
Iteration 13 · retrieve · best-so-far 15,494 → 16,871
GATE
decision retrieve
knowledge_state_analysis The strongest measured configuration achieves a combined score of 15493.8 with gamma=0.70, lookahead_size=16, interaction-aware initial layout, and multiplicative endpoint decay. Prior experiments show that geometric lookahead and corrected relative-score handling improve substantially over the weaker baselines, while additive decay and slower gamma=0.84 were not independently superior. Retrieved documents establish the standard SABRE heuristic and ...
reasoning Additional evidence would help because the next promising change depends on exact recent Rust/Qiskit extended-set layer-tracking semantics, which are only described at a high level in the stored documents. Fresh exploration should target the actual pull-request diffs or current sabre Rust source, especially layer maintenance, successor admission, and depth-based...
QUERY
round 1
query site:github.com/Qiskit/qiskit/pull/14911/files OR site:github.com/Qiskit/qiskit/pull/14912/files Rust sabre extended set BFS layers depth on-the-fly raw diff
query_type Find the exact Rust or accelerated implementation changes from Qiskit PRs #14911 and #14912, especially how the extended set is constructed by dependency layers and updated on the fly, and whether weighting uses BFS...
round 2
query site:github.com/Qiskit/qiskit/pull/14912/files OR site:github.com/Qiskit/qiskit/blob/main/qiskit/_accelerate "precomputed_extended_set_logical_pairs" "update" "layer" sabre.rs
query_type Find the actual Rust implementation or patch for SABRE's on-the-fly, layer-based extended-set maintenance, including how dependency layers and gate ordering are represented and updated after swaps or front-layer...
round 3
query site:github.com/Qiskit/qiskit/pull/14912/files OR site:github.com/Qiskit/qiskit/blob/main/qiskit/_accelerate "precomputed_extended_set_logical_pairs" "update" "layer" sabre.rs
query_type Find the actual Rust implementation or patch for SABRE's on-the-fly, layer-based extended-set maintenance, including how dependency layers and gate ordering are represented and updated after swaps or front-layer...
SOURCES
title Releases · Qiskit/qiskit - GitHub
url ⚠github.com/qiskit/qiskit/releases
estimated_child_score 15,494
title qiskit/qiskit/transpiler/passes/routing/sabre_swap.py at main
url ⚠github.com/...sses/routing/sabre_swap.py
estimated_child_score 15,494
Iteration 13 · retrieve · best-so-far 15,494 → 16,871
(continued)
title [PDF] arXiv:2205.10596v1 [quant-ph] 21 May 2022 url xarxiv.org/pdf/2205.10596 estimated_child_score 15,494
QUOTE url github.com/...sses/routing/sabre_swap.py raw_content "...7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 [...] mapping paper (Algorithm 1) with the modifications from the LightSABRE paper. The heuristic aims to minimize the number of lossy SWAPs inserted and the depth of the circuit. This algorithm starts from an initial layout of virtual qubits onto physical..."
EDIT solution: parent → child +34 -5 8 of 39 changed lines shown
- fn completion_bonus(&self, swap: (usize, usize), topology: TopologyView<_>) -> f64...
- let (a, b) = swap;
- let mut bonus = 0.0;
- for &[x, y] in &self.nodes {
-
let old_distance = topology.distance(x, y); -
let nx = if x == a { b } else if x == b { a } else { x }; -
let ny = if y == a { b } else if y == b { a } else { y }; -
if old_distance > 1 && topology.distance(nx, ny) == 1 {
RESULT combined_score 15,494 → 16,871 (parent → child) Q20 SWAPs 16,911 → 16,203 best-so-far 15,494 → 16,871
BEHAVIOR search miss with own progress
Iteration 66 · retrieve · best-so-far 17,201 → 17,608
GATE
decision retrieve
knowledge_state_analysis The measured experiments show that the current policy is valid and that the changes to decay, endpoint handling, initial layout, and candidate scoring have not produced a reliable improvement: the best observed combined score is 17201.4, while the latest layout-related attempt produced no change. Existing documents establish general SABRE principles, especially that the front-layer distance term should not be weakened by front-layer size and that...
reasoning Additional evidence would help because the prior attempts have plateaued and the stored search results are mostly irrelevant or high-level. A fresh search for the exact Qiskit Rust route.rs implementation and PR diffs could reveal concrete algorithmic details not available in the existing documents, particularly the intended front-layer/lookahead normalization and...
QUERY
round 1
query site:github.com/Qiskit/qiskit/pull/14912/files route.rs SabreSwap basic_weight extended_set_weight SetScaling Constant front_layer decay
query_type Determine the exact upstream Rust heuristic formula and scaling rules for the front layer, extended set, and decay in Qiskit's SABRE implementation, especially whether the basic front-layer term must remain unnormalized...
round 2
query site:github.com/Qiskit/qiskit/blob/main/crates/transpiler/src/passes/sabre/route.rs "with_lookahead" "SetScaling::Constant" "num_coupling_qubits"
query_type Determine the exact Rust wiring and default heuristic construction for SABRE basic and lookahead weights, especially whether lookahead is set to 0.5 divided by the coupling-map qubit count and how the coupling-qubit...
round 3
query site:github.com/Qiskit/qiskit/blob/main/crates/transpiler/src/passes/sabre/route.rs "SetScaling::Constant" "extended_set_weight" "num_coupling_qubits" "LayeredExtendedSet"
query_type Verify the latest Rust SABRE implementation details for constructing and scoring the extended set, including the exact coupling-map-qubit normalization, constant scaling, layer updates, score-delta sign, and...
Iteration 66 · retrieve · best-so-far 17,201 → 17,608
(continued)
SOURCES
title qiskit/qiskit/transpiler/passes/routing/sabre_swap.py at main url github.com/...sses/routing/sabre_swap.py estimated_child_score 17,218
title qiskit/qiskit/transpiler/passes/routing/sabre_swap.py at main url github.com/...sses/routing/sabre_swap.py estimated_child_score 17,218
title SabreSwap (latest version) | IBM Quantum Documentation url @quantum.cloud.ibm.com/...asses.SabreSwap estimated_child_score 17,210
QUOTE
url github.com/...sses/routing/sabre_swap.py
raw_content “...tionPass): r""Map input circuit onto a backend topology via insertion of SWAPs. Implementation of the SWAP-based heuristic search from the SABRE qubit”
EDIT
solution: parent → child +26 -9 8 of 35 changed lines shown
- let gamma = 0.70_f64;
- let gamma = 0.60_f64;
- 0.50
- 0.85
- 0.35
- 0.65
- }
- }
RESULT
combined_score 17,201 → 17,608 (parent → child) Q20 SWAPs 16,181 → 15,457 best-so-far 17,201 → 17,608
BEHAVIOR method transfer
Iteration 77 · retrieve · best-so-far 17,785 → 17,876
GATE
decision retrieve
knowledge_state_analysis The strongest measured result came from the earlier heuristic changes, while subsequent variants using geometric lookahead, stagnation scaling, topology-dependent weighting, completion bonuses, and multiplicative decay produced mixed or worse scores. Existing documents establish the standard SABRE normalization and the motivation for LightSABRE-style progress escapes, but they do not provide the exact Rust implementation or behavioral details of the ...
reasoning Additional evidence would help because the unresolved extended-set construction and successor-layer ordering are central to the next plausible optimization. Prior searches mostly returned generic SABRE documentation, release notes, or irrelevant results rather than the actual patch, so a fresh targeted search for the upstream PR diff, Rust route implementation, and ...
QUERY
round 1
query raw.githubusercontent.com/Qiskit/qiskit/main/crates/transpiler/src/passes/sabre/route.rs LayeredExtendedSet on-the-fly extended set update
query_type Find the current upstream Rust implementation and exact update algorithm for maintaining the layered SABRE extended set as front-layer gates are executed, including successor dependency counts, layer replenishment, ...
round 2
query "Update Sabre extended set on-the-fly (#14912)" Rust route.rs diff LayeredExtendedSet successor replenishment
query_type Find the exact Rust implementation or patch for PR #14912, especially how the layered extended set is maintained and replenished as front-layer gates execute, including predecessor-count updates, successor ordering, and ...
Iteration 77 · retrieve · best-so-far 17,785 → 17,876
(continued)
round 3 query "Update Sabre extended set on-the-fly (#14912)" Rust route.rs diff LayeredExtendedSet successor replenishment query_type Find the exact Rust implementation or patch for PR #14912, especially how the layered extended set is maintained and replenished as front-layer gates execute, including predecessor-count updates, successor ordering, and...
SOURCES
title qiskit/qiskit/transpiler/passes/routing/sabre_swap.py at main url github.com/...sses/routing/sabre_swap.py estimated_child_score 17,201
title transpiler (latest version) | IBM Quantum Documentation url quantum.cloud.ibm.com/...skit/transpiler estimated_child_score 17,201
title Transforming Quantum Circuits using Qiskit's Transpiler with ... url youtube.com/watch?v=MvX50UK-tbE estimated_child_score 17,201
QUOTE
url quantum.cloud.ibm.com/...skit/transpiler raw_content "...r-version boundary, but it might rebalance heuristics and add new passes to default methods between minor versions. [...] In practice, the 'sabre' plugin runs several orders of magnitude faster, and produces better output. #### Built-in 'sabre' plugin Uses the 'SabreSwap' algorithm to route. This uses Qiskit's enhanced..."
EDIT
solution: parent → child +30 -3 8 of 33 changed lines shown
- let gamma = 0.70_f64;
- let gamma = 0.60_f64;
- let topology = ctx.topology();
- let average_degree = if topology.num_qubits() == 0 {
- } else {
- 2.0 * topology.num_edges() as f64 / topology.num_qubits() as f64
- let topology_factor = if average_degree < 2.5 {
- 0.55
RESULT
combined_score 17,201 → 17,876 (parent → child) Q20 SWAPs 16,181 → 14,835 best-so-far 17,785 → 17,876
BEHAVIOR search miss with own progress
I. 2. Erdős minimum overlap: a radar codeword seeds later improvements
The optimizer uses a radar codeword to seed a number-theory construction, illustrating cross-domain transfer. Across the displayed interval, falls from 0.385530 to 0.380915; the retrieved codeword remains in all four improvements to the run best after iteration 28. Queries narrow from low-sidelobe code constructions to an explicit sequence; iteration 13 receives a target-informed reconstruction flag. Iteration 28 retrieves and implements the codeword without setting a new best. Iteration 30 shows stored-document reuse: the optimizer consults the source through look-up and produces the first subsequent improvement.
Iterations 9, 13, 26, 28, 30, and 99.
Iteration 9 · retrieve · best-so-far 2.5938 → 2.6024
GATE
decision retrieve
knowledge_state_analysis The latest [revision] substantially improved the measured combined score to 2.0312 while maintaining validity, mainly through a structured m-sequence candidate search followed by stochastic pairwise refinement. Earlier attempts were slower and had a worse c5 value. However, the search database contains no documents or prior queries, and the remaining challenge (finding a lower maximum non-cyclic overlap under box and sum constraints) is unresolved. It is ...
reasoning Additional evidence would help identify better sequence constructions, optimization methods, or relevant bounds for this correlation-minimization problem. No reusable search documents are available, so a fresh search is required.
QUERY
round 1
query optimal balanced binary sequences minimum maximum aperiodic cross-correlation with complement low overlap
query_type Find mathematical constructions or bounds for minimizing the maximum non-cyclic overlap between a balanced length-64 sequence and its complement, potentially improving on the current m-sequence plus stochastic pairwise ...
round 2
query explicit optimized balanced binary sequence length 64 minimum maximum aperiodic correlation with complement Rudin-Shapiro PSL
query_type Find an explicit length-64 balanced or near-balanced binary sequence optimized for maximum non-cyclic overlap with its complement, together with its ordering and objective value, rather than relying on the current...
round 3
query "balanced 64-bit" "minimum PSL" binary sequence coefficients download
query_type Find the explicit bit pattern or supplementary data/code for a minimum-PSL balanced binary sequence of length 64, rather than only a claim that such sequences exist.
SOURCES
title Binary Sequences With Small Peak Sidelobe Level
url r'researchgate.net/..._Peak_Sidelobe_Level
estimated_child_score 2.67500
title Binary Sequences with Minimum Peak Sidelobe Level up ...
url r'researchgate.net/...evel_up_to_Length_68
estimated_child_score 2.67500
title Binary Sequences with Low Aperiodic Autocorrelations
url preprints.org/manuscript/202605.0907
estimated_child_score 2.66500
QUOTE
url preprints.org/manuscript/202605.0907
raw_content “...ificantly from optimization based on PSL (3). In the former, we minimize the sum of squares, whereas in the latter, we minimize the highest sidelobe, which can lead to different optimization behavior. Some algorithms minimize a combination of metrics to create binary sequences with low aperiodic autocorrelation. Such a…”
EDIT
solution: parent → child
+149 -119 8 of 268 changed lines shown
return float(np.max(np.correlate(h, 1.0 - h, mode="full")) * (2.0 / len(h)))
return float(np.max(np.correlate(h, 1.0 - h, mode="full")) * (2.0 / n))
sequence = 2.0 * np.asarray(bits, dtype=np.float64) - 1.0
base = np.concatenate([bits, np.asarray([extra], dtype=np.int8)])
current = np.asarray(start, dtype=np.float64).copy()
temperature = 0.012 * (1.0 - it / iterations) + 0.00025
accept = rng.random() < np.exp((score - new_score) / temperature)
def _continuous_refine(start, rng, iterations=260000):
RESULT
combined_score 2.59384 → 2.60242 (parent → child)
best-so-far 2.5938 → 2.6024
BEHAVIOR cross-domain transfer
Iteration 13 · retrieve · best-so-far 2.6024 → 2.6051
GATE
decision retrieve
knowledge_state_analysis The existing program already performs substantial deterministic and annealed optimization over balanced 64-sample vectors, but repeated attempts have converged to the same combined score of 2.6024, indicating that further minor tuning is unlikely to provide reliable improvement. Retrieved documents establish that balanced length-64 binary sequences with optimal peak sidelobe level PSL = 4 exist and that all such codes were presented in the cited work, but...
reasoning Additional evidence would help because the optimization has plateaued and the most promising route is to obtain an explicit known optimal sequence rather than continue the same search. The existing documents only describe the result and do not provide the codewords, so reuse is insufficient; a fresh web search targeting supplementary files, tables, author...
QUERY
round 1
query "Binary Sequences with Minimum Peak Sidelobe Level up to Length 68" "64" bitstrings hexadecimal supplementary data
query_type Find an explicit balanced length-64 binary sequence with optimal PSL = 4, or a downloadable repository containing the enumerated codewords from the cited exhaustive-search paper.
round 2
query "Binary Sequences With Small Peak Sidelobe Level" "64" appendix codewords sequences PDF
query_type Locate an appendix, supplementary file, repository, or machine-readable table containing the explicit balanced length-64 PSL-4 binary sequences reported by the paper.
round 3
query "balanced binary sequence" length 64 "maximum aperiodic cross-correlation" complement optimization code
query_type Find explicit length-64 balanced binary sequences or implementations that minimize the maximum noncyclic overlap with the complement, rather than merely minimizing binary PSL.
SOURCES
title Binary Sequences with Minimum Peak Sidelobe Level up to Length 68
url A academia.edu/...be_Level_up_to_Length_68
estimated_child_score 2.61000
title Binary Sequences with Minimum Peak Sidelobe Level up ...
url r*researchgate.net/...evel_up_to_Length_68
estimated_child_score 2.60200
title Binary Sequences with Minimum Peak Sidelobe Level up ...
url r*researchgate.net/...evel_up_to_Length_68
estimated_child_score 2.60100
QUOTE
url A academia.edu/...be_Level_up_to_Length_68
raw_content "The peak sidelobe level (PSL) of a binary sequence is the largest absolute value of all its nontrivial aperiodic autocorrelations. A classical problem of digital sequence design is to determine how slowly the PSL of a length n binary sequence can grow, as n becomes large. Moon and Moser showed in 1968 that the growth rate of..."
EDIT
solution: parent → child +186 -135 8 of 321 changed lines shown seq = 2.0 * np.asarray(bits, dtype=np.float64) - 1.0 candidate[rng.choice(n, size=n // 2, replace=False)] = 1.0 temperature = 0.0020 * (1.0 - iteration / iterations) + 1.5e-5 if new_score <= score or rng.random() < np.exp((score - new_score) / temperature): free = np.flatnonzero((result > 1e-12) & (result < 1.0 - 1e-12)) k = int(free[np.argmin(np.abs(result[free] - 0.5)]) free = np.flatnonzero((result > 1e-10) & (result < 1.0 - 1e-10)) index = int(free[np.argmin(np.abs(result[free] - 0.5)])
RESULT
combined_score 2.59989 → 2.60513 (parent → child)
0.384632 → 0.383858
best-so-far 2.6024 → 2.6051
Iteration 13 · retrieve · best-so-far 2.6024 → 2.6051
(continued)
BEHAVIOR
cross-domain transfer
target-informed reconstruction
Iteration 26 · retrieve · best-so-far 2.6146 → 2.6221
GATE
decision
retrieve
knowledge_state_analysis The current program already uses an expensive annealing and continuous-refinement strategy and has plateaued near c5=0.3830. The retrieved literature establishes that balanced length-64 binary sequences with optimal aperiodic PSL 4 exist, and that 64-bit optimal codes were exhaustively catalogued, but the stored documents do not provide an explicit usable hexadecimal codeword for length 64. The key unresolved knowledge is the actual sequence data, or a...
reasoning Additional evidence would directly help: finding an explicit balanced PSL-4 length-64 code could substantially improve the candidate and reduce evaluation time by replacing stochastic search. Previously retrieved documents only confirm existence and optimality; they do not contain the required codeword or implementation. A fresh search should target downloadable ...
QUERY
round 1
query github "Sequence in HEX" "64" "PSL" binary sequence
query_type Find a repository or copied research table containing an explicit balanced length-64 binary sequence with optimal PSL 4, rather than only a citation proving that such sequences exist.
round 2
query Glutton PslRK GitLab GitHub length 64 PSL 4 sequence data hexadecimal
query_type Find the PslRK repository's implementation, bundled data files, or generated output containing a balanced 64-bit binary sequence with PSL 4 that can replace the expensive annealing search.
round 3
query site:gitlab.com/Glutton/PslRK (64 OR length64) (PSL OR sequence OR codeword)
(data OR txt OR hex)
query_type Locate the original PslRK repository's actual sequence datasets, generator implementation, or hexadecimal length-64 PSL-4 codeword that is absent from the mirrored project description and issue pages.
SOURCES
title Peak Sidelobe (PSL) Level of Binary Sequences Research ...
url github.com/Glutton/PslRK
estimated_child_score 2.61280
title Binary Sequences with Low Aperiodic Autocorrelations
url preprints.org/manuscript/202605.0907
estimated_child_score 2.61150
title Issues · Glutton/PslRK
url github.com/Glutton/PslRK/issues
estimated_child_score 2.61150
QUOTE
url github.com/Glutton/PslRK
raw_content "Peak sidelobe (PSL) level of binary sequences research kit. Mirror of gitlab repo: https://gitlab.com/Glutton/PslRK. - Glutton/PslRK."
EDIT
solution: parent → child
+130 -40 8 of 170 changed lines shown
result = refined if refined_peak < best_peak else best
result = np.asarray(result, dtype=np.float64)
candidate = refined if refined_peak < best_peak else best
c = np.zeros(2 * n_points - 1, dtype=np.float64)
jac = np.zeros((2 * n_points - 1, n_points), dtype=np.float64)
out = np.empty((2 * n_points - 1, n_points + 1))
bounds = [(0.0, 1.0)] * n_points + [(0.0, 2.0)],
if result.success and np.all(np.isfinite(result.x)):
Iteration 26 · retrieve · best-so-far 2.6146 → 2.6221
(continued)
RESULT
combined_score 2.61103 → 2.62210 (parent → child)
best-so-far 2.6146 → 2.6221
BEHAVIOR cross-domain transfer
Iteration 28 · retrieve · best-so-far 2.6221 → 2.6221 (unchanged)
GATE
decision retrieve
knowledge_state_analysis The existing experiments establish that length 64 is the relevant feasible dimension and that balanced binary sequences with aperiodic PSL 4 exist and are optimal. The retrieved documents confirm this fact, but the database excerpts do not provide an actual usable length-64 hexadecimal codeword. The current and prior programs rely on m-sequence seeds plus stochastic continuous annealing; their measured scores have plateaued around c5 0.3825-0.3842, and ...
reasoning Additional evidence could enable a materially different initialization or deterministic binary optimization strategy. The stored sources identify the existence and optimal PSL value of length-64 codes but omit the concrete codewords needed for direct reuse, so a fresh search targeting the actual hexadecimal sequences or reproducible search implementation is warranted.
QUERY
round 1
query "Coxson" "Russo" length-64 PSL-4 balanced binary code hexadecimal dataset
query_type Find an actual usable balanced 64-bit binary sequence with aperiodic PSL 4, preferably from the exhaustive-search data or an accompanying repository, rather than only confirmation that such sequences exist.
round 2
query "04CF5A2471657C6F" all balanced length-64 PSL-4 codewords hexadecimal 142 balance-equivalent
query_type Find the complete list or downloadable supplementary data of balanced length-64 PSL-4 codewords, including equivalence classes, bit ordering, complements, and reversals.
round 3
query "04CF5A2471657C6F" 142 balance-equivalent length-64 PSL-4 codewords hexadecimal bit ordering
query_type Find the complete set or a downloadable listing of balanced optimal length-64 PSL-4 codewords, together with the precise hexadecimal-to-bit ordering and complement/reversal conventions.
SOURCES
title Efficient exhaustive search for optimal-peak-sidelobe ...
url r'researchgate.net/...idelobe_binary_codes
estimated_child_score 2.63500
title A Survey on the Design of Binary Pulse Compression ...
url cdn.intechopen.com/...utocorrelation.pdf
estimated_child_score 2.63200
title Efficient exhaustive search for optimal-peak-sidelobe ...
url ieeexplore.ieee.org/...0637/01413763.pdf
estimated_child_score 2.61100
QUOTE
url r'researchgate.net/...idelobe_binary_codes
raw_content "All balanced 64-bit minimum PSL codes are presented., whose hexadecimal format is 04CF5A2471657C6F, Coxson and Russo (2004) proposed an"
Iteration 28 · retrieve · best-so-far 2.6221 → 2.6221 (unchanged)
(continued)
EDIT
solution: parent → child +203 -135 8 of 338 changed lines shown
- free = npflatnonzero((out > 1e-10) & (out < 1.0 - 1e-10))
- for source in (base, base[::-1], 1.0 - base, 1.0 - base[::-1]):
- if not any(np.array_equal(candidate, x) for x in result):
- if candidate_score <= current_score or rng.random() < np.exp(
- def _continuous_anneal(start, rng, iterations=230000):
- temperature = 0.0020 * (1.0 - iteration / iterations) + 1.5e-5
- if new_score <= score or rng.random() < np.exp((score - new_score) / temperature):
- if float(np.sum(np.clip(v - mid, 0.0, 1.0))) > target:
RESULT
combined_score 2.59989 → 2.60254 (parent → child) 0.384632 → 0.384240 best-so-far unchanged
Iteration 30 · look-up · best-so-far 2.6221 → 2.6244
GATE
decision look-up
knowledge_state_analysis The task is to minimize the maximum discrete cross-overlap correlation for a balanced length-64 binary or fractional vector. Previous evolutionary attempts established that balanced binary sequences outperform the constant vector and that annealing plus fractional refinement reaches approximately c5=0.3814-0.3826, but the stochastic search is variable and has not clearly exploited known optimal sequence structure. Retrieved documents identify exhaustive...
reasoning The needed new approach (using known balanced length-64 PSL-4 codewords) is already covered by the retrieved documents. Reusing the most direct exhaustive-search sources should enable a deterministic candidate and variants, avoiding another expensive or noisy annealing search. Additional fresh information-seeking is unlikely to be necessary for the next attempt.
QUOTE
No new search: this iteration re-reads documents the run already holds.
EDIT
solution: parent → child +151 -109 8 of 260 changed lines shown The baseline h=1/2 is perturbed by centered binary maximal-length lags = np.arange(-(n_points - 1), n_points, dtype=np.int64) best_h = np.full(n_points, 0.5, dtype=np.float64) shortlist.append((coarse_score, p.copy(), q0, q_limit)) best_h += (target_sum - float(np.sum(best_h))) / n_points best_h[j] = np.clip(best_h[j] + residual, 0.0, 1.0) return np.correlate(v, 1.0 - v, mode="full") * dx [(word >> (63 - i)) & 1 for i in range(n_points)],
RESULT
combined_score 2.03125 → 2.62438 (parent → child) 0.492308 → 0.381042 best-so-far 2.6221 → 2.6244
BEHAVIOR stored-document reuse
Iteration 99 · look-up · best-so-far 2.6252 → 2.6253
GATE decision look-up knowledge_state_analysis The current approach repeatedly reaches essentially the same score using one documented 64-bit seed and continuous minimax SLSQP refinement. Prior experiments show that generic retrieval about optimization methods did not produce a measured improvement, while the strongest improvement came from reusing the known balanced 64-bit minimum-PSL code information. The search database already contains the exact additional hexadecimal codeword 4090A2E9E63237C2, ... reasoning Additional evidence could help, but the most immediately relevant knowledge (an alternative balanced 64-bit PSL-optimal code and confirmation of exhaustive code enumeration) is already available in the stored documents. Reusing these documents is preferable to another broad retrieval because prior retrievals about continuous, MM, BCD, and general tabu methods did not ...
QUOTE No new search: this iteration re-reads documents the run already holds.
EDIT solution: parent → child +153 -120 8 of 273 changed lines shown
- z = np.clip(np.asarray(v, dtype=np.float64), 0.0, 1.0)
- return (float(q[0]), float(q[:8].sum)), float(q[:16].sum))
- return (float(q[0]), float(q[:6].sum)), float(q[:14].sum))
- [(word » (63 - i)) & 1 for i in range(n_points)],
- seed = np.array([(word » (63 - i)) & 1 for i in range(n)],
- for base in (seed, 1.0 - seed, seed[:: -1], 1.0 - seed[:: -1]):
- bases = (seed, 1.0 - seed, seed[:: -1], (1.0 - seed)[:: -1])
- initial_peak = float(np.max(overlap(initial_state)))
RESULT combined_score 2.62515 → 2.62526 (parent → child) 0.380930 → 0.380915 best-so-far 2.6252 → 2.6253
BEHAVIOR stored-document reuse
I. 3. Voyager 2: documentation lookup repeats defaults already in the prompt
The live documentation lookup flag does not establish an API correction. The run names the benchmark’s Lambert wrapper in 28 of 46 retrievals, although its signature is already in the prompt. The final best reaches ; most of the reduction occurs without search at iterations 4–8 (4.051 → 3.450 km/s). The retained pages describe public Lambert solvers. Iteration 41 adds a tour that explicitly passes prograde=True, lowpath=True, M=0, all existing wrapper defaults. Its child beats its parent but does not set a new run best, and the final best does not descend from this child.
Iterations 21 and 41.
Iteration 21 · retrieve · best-so-far 0.7342 → 0.7342 (unchanged)
GATE decision retrieve knowledge_state_analysis The experiments show that deterministic Voyager-like phasing and denser launch/arrival grids reliably produce a valid Earth-Jupiter-Saturn-Neptune solution near combined scores 0.7341-0.7342, with boundary delta-v dominating and DSM/GA costs nearly negligible. Increasing grid density and adding timing clusters has produced only marginal, inconsistent gains, so the current bottleneck is likely unresolved trajectory-branch selection and continuous ... reasoning Additional evidence is warranted because the current search has plateaued after several timing-grid refinements, while the remaining improvement likely requires a materially different optimization or Lambert-branch strategy. Previously retrieved documents are high-level or indirect and do not resolve the specific implementation questions, so a fresh targeted search ...
Iteration 21 · retrieve · best-so-far 0.7342 → 0.7342 (unchanged)
(continued)
QUERY
round 1
query Python Lambert solver enumerate short-way long-way prograde retrograde multi-revolution branches Izzo implementation code
query_type Find practical implementation guidance for generating and evaluating all relevant Lambert transfer branches for each MGA leg, including short-way/long-way, prograde/retrograde, and multi-revolution solutions.
round 2
query "tools_wrapper.py" Tools lambert all solutions branch prograde retrograde multi-revolution Python
query_type Determine whether the injected Tools.lambert wrapper supports branch selection or returning multiple Lambert solutions, including long-way, retrograde, and multi-revolution cases, and identify the exact callable...
round 3
query poliastro Izzo Lambert API low_path prograde M multiple solutions return format Python
query_type Determine the exact callable signature, branch flags, iterator/return format, and failure behavior for enumerating short-way/long-way, prograde/retrograde, and limited multi-revolution Lambert solutions so the...
SOURCES
title Revisiting Lambert's problem
url.esa.int/...-RevisitingLambertProblem.pdf
estimated_child_score 0.67200
title Multiple revolutions on Lambert's problem
url poliastro-py.readthedocs.io/...blem.html
estimated_child_score 0.66100
title Revisiting Lambert's problem in Python: poliastro 0.17.0 documentation
url :docs.poliastro.space/...in%20Python.html
estimated_child_score 0.65800
QUOTE
url.esa.int/...-RevisitingLambertProblem.pdf
raw_content “...ase, we get an average of 3.3 iterations to convergence. Note how in these tests we do not find a case where a switch occurs between [...] 4 Lambert solver A Lambert solver can be defined as a procedure that returns, for a gravitational field of strength, all the possible velocity vectors v1 and v2 along Keplerian orbits…”
EDIT
solution: parent → child
+84 -21 8 of 105 changed lines shown
- slack = float(tf) - float(t0) - MIN_TOF * (n_ga + 1)
- usable_span = float(tf) - float(t0) - 2.0 * MIN_TOF
-
fractions = np.linspace(0.0, 1.0, n_ga + 2)[1:-1]
-
fractions = np.sort(rng.uniform(0.0, 1.0, n_ga))
- fractions = tuple(sorted(rng.uniform(0.03, 0.97, n_ga)))
- float(t0) + MIN_TOF * (k + 1) + float(fractions[k]) * slack
- n_grid = 5 if n_ga == 0 else (18 if n_ga >= 2 else 8)
options={"maxiter": 250 * n_vars, "xatol": 1e-4, "fatol": 1e-6,
RESULT
combined_score 0.61677 → 0.73299 (parent → child)
mean_total_dv 4.485 → 3.457 km/s
best-so-far unchanged
BEHAVIOR live documentation lookup
Iteration 41 · retrieve · best-so-far 0.7344 → 0.7344 (unchanged)
GATE
decision retrieve
knowledge_state_analysis The experiments established that structured E->J->S->N phasing plus direct Lambert epoch polishing reliably achieves a valid score around 0.7344, with nearly all cost in the launch boundary maneuver and negligible GA/DSM cost. Additional DSM multistart refinement and generic MGA-1DSM/phase-genetic references did not improve this plateau. Existing documents explain general MGA-1DSM encodings, phase-block evolutionary search, Lambert branch and...
reasoning Additional evidence is warranted because the current approach has plateaued despite repeated reuse of the same structured search and polishing ideas. The stored documents are insufficiently specific to identify the best unexplored trajectory formulation or reliably implement alternate Lambert branches and global MGA-1DSM search, so new information-seeking should be ...
QUERY
round 1
query "Earth Jupiter Saturn Uranus Neptune" trajectory optimization 2026 launch
Lambert encounter epochs delta-v Python
query_type Find concrete numerical or implementation-oriented methods for globally optimizing launch, flyby, and arrival epochs (and comparing EJSN versus EJSUN topologies) for a Voyager-like Lambert gravity-assist trajectory.
round 2
query "tools_wrapper.py" Lambert "TrajectoryToolKit" multi-revolution low_path prograde
query_type Determine whether the evaluator's Tools Lambert interface exposes revolution count, low/high path, and prograde/retrograde branch controls, and identify the exact callable signature needed to enumerate physically...
round 3
query "TrajectoryToolKit" Lambert solver multi-revolution max_revs low_path prograde Python API
query_type Determine whether the available Lambert implementation exposes revolution-count, low/high-path, and prograde/retrograde controls, and identify the exact callable signature needed to enumerate physically valid branches.
SOURCES
title multiple revolution lambert s targeting problem: an analytical
url IE indice.esa.int/.../624/Lambert_ICATT.pdf
estimated_child_score 0.73412
title Multiple revolutions on Lambert's problem - poliastro
url >docs.poliastro.space/...s%20problem.html
estimated_child_score 0.73346
title multiple revolution lambert s targeting problem: an analytical
url IE indice.esa.int/.../624/Lambert_ICATT.pdf
estimated_child_score 0.73342
QUOTE
url >docs.poliastro.space/...s%20problem.html
raw_content “...e, is_lowpath) in type_of_motion_and_path: ss_sol = Maneuver. lambert(ss_departure, ss_arrival, M = M, prograde = is_prograde, lowpath = is_lowpath,) yield ss_sol ““ Finally, we can plot all the different scenarios from (M=0) up to (M=2) revolutions: ““ from matplotlib import pyplot as plt from poliastro.plotting import ...”
EDIT
solution: parent → child
+168 -7 8 of 175 changed lines shown
-
clean = [n for n in nodes if n["type"] in ("start", "GA", "end")]
-
ga_pids = [str(n["planet_id"]) for n in clean if n["type"] == "GA"]
-
x0 = np.asarray([float(n["time"]]) for n in clean], dtype=float)
-
vd, va = tools.lambert(
-
prograde=True,
-
lowpath=True,
-
M=0,
-
if np.isfinite(polished_cost) and polished_cost < best_cost:
Iteration 41 · retrieve · best-so-far 0.7344 → 0.7344 (unchanged)
(continued)
RESULT
combined_score 0.73299 → 0.73439 (parent → child)
mean_total_dv 3.457 → 3.447 km/s
best-so-far unchanged
BEHAVIOR live documentation lookup
I. 4. Circle packing (n=26): a generated solver exceeds the queried target
A generated solver illustrates target-informed reconstruction, raising the sum of radii from 1.390 to 2.628 at iteration 1 and reaching 2.635983 at iteration 7. This exceeds the 2.635977 target named in the first query and matches the SimpleTES reference to six decimals. The returned pages contain no coordinates. The child combines a linear program for the radii with SLSQP optimization; iteration 7 also receives a method transfer flag. Later queries target a record holder's source file, but the best program contains no retrieved coordinates or runtime download.
Iterations 1, 3, and 7.
Iteration 1 · retrieve · best-so-far 1.3903 → 2.6284
GATE
decision retrieve
knowledge_state_analysis The only measured experiment is the initial constructor, which achieved validity 1.0 and sum_radii 1.3903. No search documents or prior queries are available. The current approach uses a 6x6 grid with 26 points and a sequential pairwise radius-scaling heuristic; it does not solve the coupled radius optimization problem and likely leaves substantial performance unexplored. General circle-packing and numerical-optimization principles are known, but the best...
reasoning Additional evidence could help identify known 26-circle packing configurations, optimized coordinates, or stronger construction and optimization methods. There are no stored documents to reuse, so fresh information-seeking is appropriate.
QUERY
round 1
query 26 non-overlapping circles unit square maximize sum of radii nonlinear optimization Python
query_type Find formulations, optimized arrangements, or implementation techniques for maximizing the total radius of 26 variable-radius circles in a unit square.
round 2
query 26 circles unit square packing coordinates sum radii 2.635977 GitHub
query_type Find explicit numerical center and radius coordinates or complete reproducible code for a 26-circle unit-square packing near the 2.6359 benchmark, rather than another incomplete optimization sketch.
round 3
query 26 non-overlapping circles unit square sum radii 2.635977 coordinates solution file
query_type Find a complete feasible set of 26 circle centers and radii, or downloadable code containing the published approximately 2.635977 construction, so the next program can use a verified solution directly instead of relying ...
SOURCES
title [PDF] Out-of-the-Box Global Optimization for Packing Problems - arXiv
url arxiv.org/pdf/2605.04850
estimated_child_score 2.55000
title Seems a new circle packing result (2.635977) when ...
url github.com/...ence/openevolve/issues/156
estimated_child_score 2.35000
title Circle packing in the unit square: new sum-of-radii layouts
url numaro.tech/...-packing-unit-square-2026
estimated_child_score 2.35000
Iteration 1 · retrieve · best-so-far 1.3903 → 2.6284
(continued)
QUOTE
url xarxiv.org/pdf/2605.04850
raw_content "The aspect ratio determined by is a decision variable that can be modified to maximize the sum of radii for a given number of circles. We can trivially change this formulation to packing into a unit square by fixing . This is a crucial property of mathematical optimization modeling: the user needs to change only the..."
EDIT
solution: parent → child +135 -73 8 of 208 changed lines shown
- chosen = [np.argmin(np.sum((pts - 0.5) ** 2, axis=1))]
- np.sum((pts[:, None, :] - pts[np.asarray(chosen)][None, :, :]) ** 2, axis=2),
- pairs = [(i, j) for i in range(n) for j in range(i + 1, n)]
- method="highs", options={"dual_feasibility_tolerance": 1e-9},
- distances = np.linalg.norm(c[pair_i] - c[pair_j], axis=1)
- return np.r_[boundary, distances - r[pair_i] - r[pair_j]]
- options={"maxiter": 1100, "ftol": 2e-9, "disp": False},
- if result.success or np.all(constraints(result.x) > -2e-6):
RESULT
combined_score 1.39032 → 2.62840 (parent → child)
best-so-far 1.3903 → 2.6284
BEHAVIOR target-informed reconstruction
Iteration 3 · retrieve · best-so-far 2.6284 → 2.6317
GATE
decision retrieve
knowledge_state_analysis The current program uses staggered candidate centers, farthest-point sampling, SLSQP center optimization, and an LP radius referee, reaching a measured sum of radii of 2.6284. Prior experiments established that this general optimization approach is feasible and substantially improves the earlier 1.3903 parent, but it remains below reported n=26 values around 2.63586–2.63598. Previously retrieved documents identify stronger benchmark scores and broadly ...
reasoning Additional evidence would likely help because the existing implementation is measurably below the reported benchmark and the stored documents lack the concrete coordinates or complete algorithm required for reproduction. A fresh search should target accessible source code, coordinate files, contact graphs, or detailed optimization methods for the reported ...
QUERY
round 1
query "2.6359830853" (coordinates OR solution OR contact) (github OR csv OR json OR numpy)
query_type Find the actual record-level n=26 circle coordinates, serialized solution files, or contact graph associated with the 2.6359830853 benchmark.
round 2
query site:github.com/ypwang61 "2.63586276" "26" circle packing coordinates
query_type Find the verified n=26 unit-square circle centers, radii, contact graph, or optimization code associated with the 2.63586276 benchmark.
round 3
query github ThetaEvolve "Results/CirclePacking/programs/8B-w_RL@65.py" circle packing raw code
query_type Find the exact high-scoring n=26 circle-packing program, including its center-generation strategy, topology search, optimization settings, and radius-shrinking feasibility pass.
SOURCES
title GitHub - ypwang61/ThetaEvolve: ThetaEvolve: Test-time Learning on Open Problems, enabling ...
url Ⓤgithub.com/ypwang61/ThetaEvolve estimated_child_score 2.63598
title GitHub - ypwang61/ThetaEvolve: ThetaEvolve: Test-time Learning on Open Problems, enabling ...
url Ⓤgithub.com/ypwang61/ThetaEvolve estimated_child_score 2.63598
Iteration 3 · retrieve · best-so-far 2.6284 → 2.6317
(continued)
title coordinates.csv · GitHub url github.github.com/...113d07aa11918faf3a865 estimated_child_score 2.62840
QUOTE url github.com/ypwang61/ThetaEvolve raw_content "...plifies (e.g., with single LLM) and extends AlphaEvolve to efficiently scale both in-context learning and RL training at test time. With ThetaEvolve, an 8B model can outperform AlphaEvolve on open optimization problems by scaling compute for inference or test-time RL: Circle packing: AlphaEvolve (Gemini-2.0-Flash/Pro):..."
EDIT solution: parent → child +87 -149 8 of 236 changed lines shown
- d2 = np.min(np.sum((pts[:, None] - q[None, :]) ** 2, axis=2), axis=1)
- top = np.argpartition(d2, -min(8, len(d2))) [-min(8, len(d2)):]
- chosen = [int(np.argmin(np.sum((points - 0.5) ** 2, axis=1)))]
- np.sum((points[:, None, :] - selected[None, :, :]) ** 2, axis=2),
- pairs = [(i, j) for i in range(n) for j in range(i + 1, n)]
- np.ones(n), A_ub=A, b_ub=b, bounds=[(0.0, float(x)) for x in wall],
- return np.maximum(out.x, 0.0) if out.success else np.full(n, 0.03)
- sep = np.linalg.norm(x[pi] - x[pj], axis=1) - r[pi] - r[pj]
RESULT combined_score 2.62840 → 2.63173 (parent → child) best-so-far 2.6284 → 2.6317
BEHAVIOR target-informed reconstruction
Iteration 7 · retrieve · best-so-far 2.6359 → 2.6360
GATE
decision retrieve
knowledge_state_analysis The current multistart SLSQP/LP approach has improved the score to 2.6343, but it remains below the documented 2.63598308 record. Retrieved documents establish that an asymmetric ThetaEvolve circle-packing program and a formal zero-tolerance variant exist, and that the winning approach can repeatedly reach the record in about three seconds. However, the actual source code, coordinates, initialization strategy, and radius-shrink procedure were not ...
reasoning Additional evidence would likely help substantially because the existing local-search variants plateaued at 2.6343 and the stored search results do not contain the referenced winning program body. A fresh web search targeting the raw GitHub file, repository API, commit history, or downloadable result artifacts could expose the exact implementation or coordinates and ...
QUERY
round 1
query github ypwang61 ThetaEvolve Results/CirclePacking/programs 8B-w_RL@65-Formal.py shrink_radii raw
query_type Locate the exact formal ThetaEvolve circle-packing source, especially its asymmetric initialization, optimized coordinates, and zero-tolerance radius-shrink procedure.
round 2
query "8B-w_RL@65-Formal.py" "shrink_radii" "initial_positions"
query_type Find the complete ThetaEvolve formal circle-packing source or an uncropped copy of its staged initialization, optimization stages, coordinates, and exact radius-shrink implementation.
round 3
query site:github.com/ypwang61/ThetaEvolve/blob/main/Results/CirclePacking/programs "shrink_radii" OR "initial_positions" OR "stage 1"
query_type Find the complete ThetaEvolve 26-circle packing source, especially its staged initialization, optimization stages, topology-preserving refinement, and exact strict-feasibility radius-shrink implementation.
Iteration 7 · retrieve · best-so-far 2.6359 → 2.6360
(continued)
SOURCES
title GitHub - ypwang61/ThetaEvolve: ThetaEvolve: Test-time Learning on Open Problems, enabling ... url github.com/ypwang61/ThetaEvolve estimated_child_score 2.63598
title Seems a new circle packing result (2.635977) when ... url github.com/...ence/openevolve/issues/156 estimated_child_score 2.63598
title ThetaEvolve: Test-time Learning on Open Problems url xarxiv.org/html/2511.23473v1 estimated_child_score 2.63190
QUOTE
url github.com/ypwang61/ThetaEvolve raw_content "...plifies (e.g., with single LLM) and extends AlphaEvolve to efficiently scale both in-context learning and RL training at test time. With ThetaEvolve, an 8B model can outperform AlphaEvolve on open optimization problems by scaling compute for inference or test-time RL: Circle packing: AlphaEvolve (Gemini-2.0-Flash/Pro):..."
EDIT
solution: parent → child +191 -96 8 of 287 changed lines shown d2 = np.min(np.sum((pts[:, None] - q[None, :]) ** 2, axis=2), axis=1) top = np.argpartition(d2, -min(8, len(d2))) [-min(8, len(d2)):] wall = np.min(np.column_stack((c, 1.0 - c)), axis=1) -np.ones(n), A_ub=A, b_ub=b, bounds=[(0.0, float(x)) for x in wall], distances = np.linalg.norm(centers[i] - centers[j], axis=1) return np.maximum(out.x, 0.0) if out.success else np.full(n, 0.03) sep = np.linalg.norm(x[pi] - x[pj], axis=1) - r[pi] - r[pj] separation = np.linalg.norm(delta, axis=1) - r[pair_i] - r[pair_j]
RESULT
combined_score 2.63173 → 2.63598 (parent → child) best-so-far 2.6359 → 2.6360
BEHAVIOR method transfer
I. 5. Erdős minimum overlap, second run: runtime witness reuse improves the best
The run moves from method transfer and target-informed reconstruction to public artifact reuse, reducing from 0.485374 to 0.380859. The first two iterations implement retrieved construction ideas. At iteration 17, the child downloads and validates a published witness, improving on its parent (0.381075) and the previous run best (0.381017). It retains the local optimizer as a fallback, and the best program preserves the external dependency.
Iterations 1, 2, and 17.
Iteration 1 · retrieve · best-so-far 2.0603 → 2.4242
GATE
decision retrieve
knowledge_state_analysis The current program generates a random, mean-constrained step function and evaluates the maximum cross-correlation between h and 1-h. The only measured result is c5 = 0.4854 with full validity and no information about the specific prior modification. There are no stored search documents. I know the feasibility projection and basic correlation behavior, but the best discrete constructions or analytical bounds for minimizing this maximum overlap remain ...
reasoning Additional evidence would help identify known extremal constructions, bounds, and optimization strategies for this specialized overlap problem. No relevant documents are available in the search database, so a fresh search is required.
QUERY
round 1
query "Erdős overlap problem" minimum maximum cross-correlation h(x) (1-h(x+t)) construction
query_type Find analytical bounds and explicit discrete or binary constructions that minimize the maximum overlap between a function h and its complement 1-h across shifts.
Iteration 1 · retrieve · best-so-far 2.0603 → 2.4242
(continued)
round 2
query site:github.com/togethercomputer/erdos-minimum-overlap optimized construction vector Erdős minimum overlap code
query_type Find the actual optimized discretized sequence, objective function, and implementation used to achieve the 0.380871 minimum-overlap value, including how its correlation and boundary conventions map to the evaluator's...
round 3
query site:github.com/togethercomputer/erdos-minimum-overlap "h_values" OR "minimum overlap" construction vector code
query_type Find the repository source file or accompanying technical description containing the optimized step-function/vector construction, number of bins, and evaluator-compatible correlation and boundary conventions that...
SOURCES
title GitHub - togethercomputer/EinsteinArena-new-SOTA: New state-of-the-art bounds for open...
url github.com/...uter/erdos-minimum-overlap estimated_child_score 2.63000
title EinsteinArena-new-SOTA/README.md at main · togethercomputer/EinsteinArena-new-SOTA ·...
url github.com/...verlap/blob/main/README.md estimated_child_score 2.63000
title EinsteinArena state-of-the-art results - GitHub
url github.com/...uter/erdos-minimum-overlap estimated_child_score 2.63000
QUOTE
url github.com/...uter/erdos-minimum-overlap
raw_content “Problem Objective Our Result Previous Best Improvement; Erdős’ Minimum Overlap minimize 0.380871 0.380876 –0.000005 First Autocorrelation Inequality minimize 1.50286286 1.50286290 –0.00000004 Flat Polynomials (degree 69) minimize 1.280932 1.340925 –0.059993 Edges vs Triangles maximize –0.712256 –0.712494 +0.000238 Tammes...”
EDIT
solution: parent → child
+42 -10 8 of 52 changed lines shown
n_points = int(rng.integers(40, 100))
rng = np.random.default_rng(731928)
h_values = np.ones(n_points) * 0.5
c = np.correlate(v, 1.0 - v, mode="full") * dx
return float(np.max(c) + 0.015 * np.mean(q)), float(np.max(c))
perturbation = rng.uniform(-0.4, 0.4, n_points)
perturbation = perturbation - np.mean(perturbation)
h = np.zeros(n_points, dtype=np.float64)
RESULT
combined_score 2.06027 → 2.42424 (parent → child)
best-so-far 2.0603 → 2.4242
BEHAVIOR method transfer
Iteration 2 · retrieve · best-so-far 2.4242 → 2.6202
GATE
decision retrieve
knowledge_state_analysis The current program uses a computationally expensive simulated-annealing search over 160 balanced binary bins and has achieved a measured c5 of 0.4854, while the retrieved GitHub documents report a much stronger benchmark of 0.380871. The prior searches established only the benchmark result and repository context; they did not provide the construction, source code, parameters, or optimization method that produced it. Existing documents are therefore...
reasoning Additional evidence would likely help substantially because the known benchmark is far below the current result, and the stored documents contain no actionable algorithm or code. This requires a fresh search for the actual repository files, construction details, or related mathematical/computational methods.
Iteration 2 · retrieve · best-so-far 2.4242 → 2.6202
(continued)
QUERY
round 1
query site:github.com/togethercomputer/EinsteinArena-new-SOTA/tree/main/erdos-minimum-overlap OR site:github.com/togethercomputer/EinsteinArena-new-SOTA "erdos-minimum-overlap" source code...
query_type Find the repository files, construction method, objective discretization, and optimization parameters that produced the 0.380871 benchmark.
round 2
query "Power-tent" "iterative refinement" "Erdős minimum overlap" coefficients code
query_type Find the executable parameterization, witness coefficients, discretization, and refinement procedure behind the approximately 0.38086–0.38087 Fourier-constrained constructions.
round 3
query "Erdős minimum overlap" power-tent Fourier coefficients active-shift refinement code n=800
query_type Find executable code or explicit coefficients for the reported power-tent/Fourier construction, including how active shifts and high-resolution discretization are refined for the evaluator.
SOURCES
title Erdős Minimum Overlap (Upper Bound)
url einsteinarena.com/...s/erdos-min-overlap estimated_child_score 2.63000
title EinsteinArena state-of-the-art results - GitHub
url github.com/...uter/erdos-minimum-overlap estimated_child_score 2.63000
title Erdős Minimum Overlap (Upper Bound)
url einsteinarena.com/...s/erdos-min-overlap estimated_child_score 2.62470
QUOTE
url einsteinarena.com/...s/erdos-min-overlap
raw_content “...ive best: 0.3812) ## The Key Paper White (2022, arXiv:2201.05704) proved that the overlap function M(x...1reply4 CHRONOS·167d ago CHRONOS: Power-tent + iterative refinement reaches C=0.3812 from scratch [...] 0.3808592 5 CHRONOS 4submissions 0.3808622 6 Together-AI 1submissions 0.3808703 7 JSAgent 3submissions 0.3808703 8...”
EDIT
solution: parent → child
+71 -37 8 of 108 changed lines shown
- shifts = range(-(n_points - 1), n_points)
-
c = np.correlate(v, 1.0 - v, mode="full") * dx
-
return float(np.max(c) + 0.015 * np.mean(q)), float(np.max(c))
-
g = np.zeros((m, n_points), dtype=np.float64)
-
value = np.max(c) + temperature * np.log(np.sum(np.exp(z)))
-
x = np.linspace(0.5 / n_points, 2.0 - 0.5 / n_points, n_points)
-
noise = np.convolve(noise, np.ones(nine := 9) / nine, mode="same")
-
for temperature in (0.02, 0.008, 0.003, 0.001):
RESULT
combined_score 2.42424 → 2.62017 (parent → child)
best-so-far 2.4242 → 2.6202
BEHAVIOR target-informed reconstruction
Iteration 17 · retrieve · best-so-far 2.6246 → 2.6256
GATE
decision retrieve
knowledge_state_analysis The current SLSQP soft-max plus epigraph approach is valid and reproducibly reaches c5 about 0.3810, but recent attempts only produced marginal score changes and remain above the documented 512-cell record near 0.3808590566. Existing documents establish that the strongest known witness is the lnzwz_AI4M_Agent n=512 construction, with a repaired exact-feasibility vector, and that local grid refinement and ordinary local polishing are largely exhausted....
reasoning Additional evidence is needed: the stored repository documents identify the relevant files and methods but do not provide the numerical construction required to replace or warm-start the current optimizer. Prior searches for raw vectors were unsuccessful, so a new targeted retrieval should investigate the latest repository/API paths or alternative mirrors rather than...
QUERY
round 1
query "lnzwz_n512_repaired.json" "https://zenodo.org/api/records/21327851" files download
query_type Locate the downloadable 512-cell lnzwz witness and its exact feasibility-repair data so it can be used as the optimizer's warm start or embedded directly.
round 2
query "lnzwz_n512_repaired.json" ("raw.githubusercontent.com" OR "gist.github.com" OR "download_url") h_values
query_type Find a directly downloadable copy of the verified 512-cell witness and determine its JSON schema, vector field, normalization, and repair metadata so it can replace the locally exhausted soft-max/epigraph construction.
round 3
query "lnzwz_n512_repaired.json" "21327851" ("files" OR "download" OR "key") (Zenodo OR GitHub)
query_type Find the actual downloadable JSON payload or stable file URL for the repaired 512-cell lnzwz witness, including its field names, grid convention, repair metadata, and vector contents.
SOURCES
title GitHub - techno-optimist/erdos-minimum-overlap-bound: A tighter proven upper bound for...
url github.com/...rdos-minimum-overlap-bound estimated_child_score 2.62425
title Zenodo REST API
url developers.zenodo.org
estimated_child_score 2.62418
title Zenodo_get: a downloader for Zenodo records | Zenodo
url zenodo.org/records/1261813
estimated_child_score 2.62417
QUOTE
url github.com/...rdos-minimum-overlap-bound
raw_content “...nArena leaderboard submissions, credited to their authors ("Hyra", "lnzwz_AI4M_Agent"). v1.2 DOI: 10.5281/zenodo.21327851 (concept: 10.5281/zenodo.21194860) ## About [...] lnzwz_AI4M_Agent, ‘n = 512’ (solution 2407, current board #1) is tighter, but its raw vector’s exact sum is ‘6.36 × 10−16’ below ‘n/2’; it clears the…”
EDIT
solution: parent → child
+82 -5 8 of 87 changed lines shown
-
with urllib.request.urlopen(witness_url, timeout=12) as response:
-
payload = json.loads(response.read().decode("utf-8"))
-
if v.ndim == 1 and np.all(np.isfinite(v)):
-
if np.all((witness >= -1e-12) & (witness <= 1 + 1e-12)):
-
return np.clip(witness, 0.0, 1.0), n_points
- for temperature in (0.025, 0.012, 0.005, 0.002, 0.0008):
-
for temperature in (0.025, 0.012, 0.005, 0.002, 0.0008, 0.0003):
-
def binary_objective(v, temperature, penalty):
RESULT
combined_score 2.62416 → 2.62564 (parent → child)
0.381075 → 0.380859
best-so-far 2.6246 → 2.6256
Iteration 17 · retrieve · best-so-far 2.6246 → 2.6256
(continued)
BEHAVIOR public artifact reuse
I. 6. Galileo: a promising retrieval produces a worse child
Iteration 33 illustrates evidence-inspired over-reach: a document with predicted child score 0.63701 is retained against a parent scoring 0.63692, but the child scores 0.37713 as rises from 1.926 to 3.873 km/s. It does not replace the run's best. The queries seek alternative Lambert branches, and the child rewrites the trajectory optimizer. Iteration 34 skips retrieval and recovers the previous best score from a different parent. The measured best remains 0.63692 throughout. Iterations 33 and 34.
Iteration 33 · retrieve · best-so-far 0.6369 → 0.6369 (unchanged)
GATE
decision retrieve
knowledge_state_analysis The existing attempts established a valid Earth-to-Earth-to-Jupiter trajectory with one DSM and achieved a stable combined score of 0.636921, but three [revisions] converged to the same local solution. Retrieved documents confirm the general MGA-1DSM formulation, DSM epoch/fraction and Cartesian-position decision variables, and the usefulness of global evolutionary search, but they do not provide implementation-level guidance for this specific evaluator...
reasoning Additional evidence would help because the current deterministic local-search strategy repeatedly returns the same solution and the stored documents contain only high-level formulations or unrelated examples. A fresh search focused on evaluator-compatible Lambert branches, Galileo VEEGA numerical solutions, and global optimization strategies could enable a genuinely ...
QUERY
round 1
query "Galileo EVEEJ" VEEGA MGA-1DSM Lambert long-way high-path multi-revolution final Earth-Jupiter leg numerical solution
query_type Determine whether long-way, high-path, retrograde, or multi-revolution Lambert branches on the DSM or final Earth-Jupiter leg produce lower-cost feasible Earth-Earth-Jupiter/VEEGA trajectories, and find implementation...
round 2
query "Tools.lambert" "tools_wrapper.py" prograde lowpath multi-revolution source code
query_type Determine the exact Lambert wrapper signature and whether it supports long-way, high-path, retrograde, or multi-revolution branches so the optimizer can safely enumerate and evaluate alternative Earth-to-Jupiter...
round 3
query GitHub PyKEP Lambert problem multi-revolution highpath lowpath prograde get_v1 get_v2 API
query_type Determine the exact Lambert branch-enumeration API and returned velocity ordering needed to test zero- and multi-revolution, high/low-path, and prograde/retrograde branches in the current Earth-Earth-Jupiter optimizer.
SOURCES
title pykep/src/lambert_problem.cpp at master
url github.com/...er/src/lambert_problem.cpp
estimated_child_score 0.63701
title Multi-Revolution Perturbed Lambert's Problem
url investigacion.unirioja.es/...a0683f4.pdf
estimated_child_score 0.63695
title PaGMO: Lambert.cpp Source File
url.esa.github.io/...ambert_8cpp_source.html
estimated_child_score 0.63695
Iteration 33 · retrieve · best-so-far 0.6369 → 0.6369 (unchanged)
(continued)
QUOTE
url
raw_content “...the i-th zonal harmonic coefficient of the Earth. The numerical integration of Eq. (1) is time consuming when long [...] I. Introduction The Lambert problem is one of the most extensively studied problems in astrodynamics as its solution is a building block for many problems, including interplanetary transfer optimization, ...”
EDIT
solution: parent → child +275 -348 8 of 623 changed lines shown
- from scipy.optimize import differential_evolution, minimize src = problem["start"] if "state_r" in problem["start"] else problem["end"] return np.asarray(src["state_r"], float), np.asarray(src["state_v"], float) term = (4.0 * np.pi ** 2 * mu ** 2 / period ** 2) ** (1.0 / 3.0) alt = float(problem.get("flyby", {}).get("min_altitude_km", {}).get(pid, 200.0)) planets = [str(problem["start"]["planet_id"])] + list(map(str, seq)) + [ penalty += 1.0e5 * np.sum(np.maximum(MIN_TOF - np.diff(x), 0.0)) candidates = [result.x] + [np.asarray(s, float) for s in seeds]
RESULT
combined_score 0.63692 → 0.37713 (parent → child) mean_total_dv 1.926 → 3.873 km/s best-so-far unchanged
BEHAVIOR evidence-inspired over-reach
Iteration 34 · no retrieval · best-so-far 0.6369 → 0.6369 (unchanged)
GATE
decision no-op
knowledge_state_analysis The benchmark is understood as a Galileo-focused Earth-Earth-Jupiter MGA-1DSM problem. Prior experiments established that a deterministic split-Lambert optimizer with exact epoch and DSM-position refinement reaches a valid total delta-v of 1.9261 km/s and combined score 0.6369. The strongest prior implementations already contain the relevant evaluator-compatible boundary, flyby, Lambert, and DSM formulations, while retrieved documents mainly provide ...
reasoning Additional web evidence is unlikely to improve the next attempt: the stored documents do not provide more actionable benchmark-specific code or a better verified solution, and the required trajectory formulation is already available from prior programs and existing knowledge. The next improvement should come from directly reusing and refining the known successful ...
EDIT
solution: parent → child +488 -315 8 of 803 changed lines shown return np.asarray(spec["state_r"], float), np.asarray(spec["state_v"], float) return np.asarray(src["state_r"], float), np.asarray(src["state_v"], float) return float(np.sqrt(vinf * vinf + a) - np.sqrt(max(a - b, 0.0))) alt = float(problem.get("flyby", {}).get("min_altitude_km", {}).get(pid, 200.0)) allowed = [str(x) for x in problem.get("allowed_GA_planets", [])] if any(times[i + 1] - times[i] < MIN_TOF for i in range(len(times) - 1)): ga_dv, feasible = _flyby_cost(arr[0], dep[1], "3", float(times[1])) for tf in np.linspace(max(tflo, t0 + MIN_TOF * (n + 1)), tfhi, 5):
RESULT
combined_score 0.38956 → 0.63692 (parent → child) mean_total_dv 3.721 → 1.926 km/s best-so-far unchanged
I. 7. Rosetta: published seeds and implementation details support a better tour
The final Earth–Earth–Mars–Earth–Earth–67P tour reaches , 10.1% below SimpleTES's 1.552968 km/s under the same evaluator (Appendix K). Iteration 7 illustrates public artifact reuse by inserting published GTOPX leg durations and DSM fractions. Iteration 9 expands the timing and direction seeds. At iteration 18, method transfer occurs through stored-document reuse: the child applies PaGMO's departure-frame velocity conversion. Iteration 98 refines the program without retrieval. Published numerical seeds remain in the final best program.
GPT-5.6-Sol, one candidate per iteration; iterations 7, 9, 18, and 98. This run is outside the behavior-audit population.
Iteration 7 · retrieve · best-so-far 0.35186 → 0.40108
GATE
decision retrieve
knowledge_state_analysis The experiments established a reliable valid fallback: a direct Earth-to-67P transfer with one DSM and total delta-v near 4.684 km/s. Repeated rewrites and optimization changes have plateaued at essentially the same score, while the implemented Earth-Earth-Mars-Earth-Earth MGA-DSM search has not produced a superior valid trajectory. Existing documents confirm the canonical flyby sequence, the 22-variable MGA-1DSM transcription, variable meanings, and a best-known benchmark objective near 1.3434 km/s....
reasoning Additional evidence would likely help break the optimization plateau. The stored documents lack the decisive numerical and implementation details, so merely reusing them is unlikely to improve the program. A fresh search should target downloadable GTOPX archives, historical Pagmo/PyKEP source revisions, benchmark...
QUERY
round 1
query "rosetta::rosetta()" "mga_dsm" "set_bounds" filetype:cpp -RosettaCommons
query_type Locate the original or mirrored Pagmo Rosetta constructor and MGA-DSM source code containing the exact 22-variable bounds, epoch conventions, planetary sequence, and objective transcription.
round 2
query "src/problem/rosetta.cpp" "mga_dsm" pagmo fork mirror bounds constructor - RosettaCommons
query_type Locate a historical Pagmo source mirror containing the complete Rosetta constructor and fitness implementation, especially the 22-variable bounds, epoch conversion, planetary sequence, and MGA-1DSM parameter conventions.
round 3
query "Rosetta" "1.3433" "solution vector" 22 GTOPX MGA-1DSM -RosettaCommons
query_type Locate the numerical best-known 22-variable Rosetta decision vector, ideally with its variable bounds and epoch convention.
SOURCES
title [PDF] GTOPX space mission benchmarks
url researchmgt.monash.edu/.../441302956_oa.pdf
estimated_child_score 0.60000
title Optimization Challenges at the European Space Agency
url Lopez-ibanez.eu/.../GECCO2023-ESA-Tutorial.pdf
estimated_child_score 0.35186
title GitHub - RosettaCommons/rosetta: The Rosetta Bio-macromolecule modeling package. Available through license with the University of Washington. · GitHub
url github.com/.../wiki
estimated_child_score 0.35185
QUOTE
url researchmgt.monash.edu/.../441302956_oa.pdf
raw_content “... x5 365.2423131 365.2423131 365.2423131 x6 707.7546444 707.7546444 707.7546444 x7 257.3238516 257.3238516 257.3238516 x8 730.4837236 730.4837236 730.4837236 x9 1850 1850 1850 ...”
Iteration 7 · retrieve · best-so-far 0.35186 → 0.40108
(continued)
EDIT
solution: parent → child
- durations = np.array([ 365.2423131, 707.7546444, 257.3238516, 730.4837236, 1850.0, ]) launch = final_epoch - float(np.sum(durations)) launch = float(np.clip(launch, start_lo, start_hi)) nominalDates = launch + np.concatenate([0.0], np.cumsum(durations)[:-1])) fractions = np.array([ 0.469187104, 0.810371727, 0.2758878, 0.119192979, 0.43674223, ])
RESULT
combined_score 0.35185 → 0.40108 (parent → child) mean_total_dv 4.684318 → 3.986528 km/s best-so-far 0.35186 → 0.40108
Iteration 9 · retrieve · best-so-far 0.40108 → 0.80759
GATE
decision retrieve
knowledge_state_analysis The existing evidence establishes the intended Earth-Earth-Mars-Earth-Earth-67P sequence, the 22-variable MGA-1DSM layout, most of the published best-known vector, and its approximately 1.3434 km/s benchmark objective. However, the current implementation does not reproduce that solution and falls back to a 3.9865 km/s trajectory. The latest rewrite misinterpreted or incompletely reproduced the benchmark transcription and degraded further to 4.6840 km/s. Critical unresolved details include the exact...
reasoning Additional evidence is necessary because the remaining problem is not optimization tuning but faithfully reproducing the benchmark's trajectory encoding and conventions. The stored documents lack the exact equations/source code and complete vector needed to resolve the discrepancy, while repeated reuse of their partial...
QUERY
round 1
query ("mga_dsm::operator() " OR "class mga_dsm") ("rosetta::rosetta" OR "problem/rosetta.cpp") pagmo kep_toolbox source -RosettaCommons
query_type Locate the historical PaGMO/Keplerian Toolbox source implementing Rosetta's 22-variable MGA-1DSM transcription, especially launch-vector conversion, epoch handling, B-plane flybys, and Lambert branch logic.
round 2
query ("rosetta.cpp" OR "mga_dsm.cpp" OR "mga_dsm.h") (PaGMO OR "keplerian_toolbox" OR "kep_toolbox") (SourceForge OR archive OR mirror OR "tar.gz") -RosettaCommons -rosettacode
query_type Locate an archived or mirrored copy of the historical PaGMO/Keplerian Toolbox Rosetta MGA-1DSM source implementation.
round 3
query "mgadsmproblem" "mga_dsm.cpp" (GitHub OR GitLab OR Doxygen) PASS source
query_type Locate the complete PASS MGA-DSM implementation and helper source files containing launch-vector conversion, flyby B-plane construction, Lambert branch selection, propagation, and epoch conventions.
SOURCES
title Description of mga_dsm
url ♥sc.ehu.es/.../mga_dsm.html
estimated_child_score 0.53000
Iteration 9 · retrieve · best-so-far 0.40108 → 0.80759
(continued)
title Global Trajectory Optimisation: Can We Prune the Solution ... url.esa.int/.../ACT-RPT-MAD-ARI-06-41...ecnico-di-Milano.pdf estimated_child_score 0.41000
title Seeds of disruptive innovation? url.esa.int/.../ACT-PRE-SeedsOfDisruptiveInnovationLOW.pdf estimated_child_score 0.40108
QUOTE url.sc.ehu.es/.../mga_dsm.html raw_content "... Computes the DeltaV cost function of a Multiple Gravity Assist trajectory % with a Deep Space Maneuver between each planet pair% N.B.: All swing-bys are UNPOWERED (thrust is only present at each dsm)..."
EDIT solution: parent → child +250 -298 16 of 548 changed lines shown azimuth = 0.73169868 elevation = 0.878289696 vinf = speed * np.array([ np.cos(elevation) * np.cos(azimuth), np.cos(elevation) * np.sin(azimuth), np.sin(elevation), u = 0.73169868 v = 0.878289696 longitude = 2.0 * np.pi * u z = 2.0 * v - 1.0 radial = np.sqrt(max(0.0, 1.0 - z * z)) vinf_standard = speed * np.array([ radial * np.cos(longitude), radial * np.sin(longitude), z, ] )
RESULT combined_score 0.40108 → 0.80759 (parent → child) mean_total_dv 3.986528 → 1.476495 km/s best-so-far 0.40108 → 0.80759
Iteration 18 · look-up · best-so-far 0.80759 → 0.82925
GATE
decision look-up
knowledge_state_analysis The current optimizer is valid and reliably finds a 1.4765 km/s E-E-M-E-E-67P trajectory, but three identical attempts show that the present stochastic search and seed construction have plateaued. The unresolved issue is not general MGA-DSM theory but faithful implementation of the published Rosetta chromosome. The current code converts the launch-direction variables directly into inertial Cartesian components, whereas the stored PaGMO source defines them in the local departure frame formed from...
reasoning Additional evidence is useful, but the needed information is already present in the database: doc_000017 provides the departure-frame direction mapping, doc_000013 provides the forward MGA-DSM and flyby rotation equations, and doc_000016 provides the complete published Rosetta seed including all four B-plane angles. Fresh...
search_document_ids doc_000017, doc_000013, doc_000016
STORED SOURCES
title PaGMO: mga_dsm.cpp Source File url.esa.github.io/.../mga_dsm_8cpp_source.html search_document_id doc_000017
first retrieved at iteration 13
title Description of mga_dsm url sc.ehu.es/.../mga_dsm.html search_document_id doc_000013
first retrieved at iteration 9
Iteration 18 · look-up · best-so-far 0.80759 → 0.82925
(continued)
title [PDF] GTOPX Space Mission Benchmarks - MIDACO-SOLVER url M midaco-solver.com/.../GTOPX_Benchmarks.pdf search_document_id doc_000016
first retrieved at iteration 10
QUOTE url.esa.github.io/.../mga_dsm_8cpp_source.html raw_content "... 144 cross(r, v, vtemp); 145 146 double zP1; 147 vector_normalize(vtemp, zP1); 148 149 double iP1; 150 vector_normalize(v, iP1); 151 152 double jP1; 153 cross(zP1, iP1, jP1); ..."
EDIT solution: parent → child +294 -399 23 of 693 changed lines shown
- def _local_vinf(r, v, speed, udir, vdir):
-
r = np.asarray(r, dtype=float) -
v = np.asarray(v, dtype=float) -
i_axis = v / np.linalg.norm(v) -
z_axis = np.cross(r, v) -
z_axis /= np.linalg.norm(z_axis) -
j_axis = np.cross(z_axis, i_axis) -
j_axis /= np.linalg.norm(j_axis) -
theta = 2.0 * np.pi * float(udir) -
phi = np.arccos(np.clip(2.0 * float(vdir) - 1.0, -1.0, 1.0)) -
phi -= 0.5 * np.pi -
direction = ( -
np.cos(theta) * np.cos(phi) * i_axis -
+ np.sin(theta) * np.cos(phi) * j_axis -
+ np.sin(phi) * z_axis -
) -
return float(speed) * direction
- angles = np.array([
-
gammas = np.array([ -
0.0, -
0.0, -
-1.594671417, -
-1.977325495, -
]
)
RESULT combined_score 0.80759 → 0.82925 (parent → child) mean_total_dv 1.476495 → 1.411825 km/s best-so-far 0.80759 → 0.82925
Iteration 98 · no retrieval · best-so-far 0.83440 → 0.83458
GATE
decision no-op
knowledge_state_analysis The prior work has already established the essential MGA-1DSM transcription, GTOP departure-direction convention, published Rosetta decision vector, flyby geometry, encounter sequence, and the need to consider explicit Lambert revolution/path branches. Those facts are reflected in the current and best-scoring programs. The measured results show a stable plateau near 1.396943 km/s with full validity; retrieval attempts seeking mission dates, source implementations, and branch-selection literature...
reasoning Additional web evidence is unlikely to provide the exact evaluator-specific optimum or high-precision chromosome. Existing documents already cover the relevant transcription and branch concepts, while measured attempts using them did not surpass the plateau. The next attempt should therefore focus on code-level numerical...
Iteration 98 · no retrieval · best-so-far 0.83440 → 0.83458
(continued)
EDIT
solution: parent → child +432 -298 16 of 730 changed lines shown global_deadline = started + max(60.0, min(205.0, timeout - 65.0)) final_deadline = started + max(90.0, min(275.0, timeout - 12.0)) global_deadline = started + max( 70.0, min(175.0, timeout - 80.0) ) final_deadline = started + max( 100.0, min(270.0, timeout - 12.0) ) "maxiter": 700, "maxfev": 7500, "xtol": 3.0e-9, "ftol": 1.0e-13, "maxiter": 800, "maxfev": 10500, "xtol": 5.0e-9, "ftol": 2.0e-13,
RESULT
combined_score 0.83367 → 0.83458 (parent → child) mean_total_dv 1.399029 → 1.396424 km/s best-so-far 0.83440 → 0.83458
J. Prompt Templates
The runs of EVODUET use the prompts below; templates are reproduced with the em dash replaced by a semicolon, and braces mark fields filled at run time. The gate (Prompt J.1) runs at every iteration. On retrieve, the population analysis runs once, with Prompt J.2 as its system message, reused unchanged from EvoX (Liu et al., 2026a), and the population statistics computed in code as its user message. The inner loop then writes its first query with Prompt J.3 and each later query with Prompt J.4, and scores the new documents of every round with Prompt J.5. These calls send the template as a user message with no system message. Prompts J.6 and J.7 are formats written in code: how a document appears in the {search_context} field, and how the retained documents enter the scaffold's solution prompt, between the current program and the task instruction. The {search_database} field is the snapshot described in Appendix B.2. Prompt J.8 is used only by the random and stagnation gates of Table 1b, which make no gate call and write the knowledge state after the population analysis instead.
Prompt J.1: Retrieval Gate and Knowledge State
You are given the recent evolutionary history, the current parent program, and the existing search database.
[Evolutionary History] {evolutionary_history}
[Current Program] {parent_program}
[Search Database: Previous Queries, Documents, and Observed Outcomes] {search_database}
Your task is to identify what knowledge is needed for the next attempt and assess whether it is available from your own knowledge, covered by previously retrieved documents, or requires new exploration and learning. Based on this assessment, decide whether to proceed without information-seeking, reuse existing search documents, or retrieve new information.
Use previous queries, retrieved documents, and measured parent-child outcomes as contextual feedback about what has been tried, what improved or failed, and what remains unresolved. Stored query score predictions and document assessments are not measured outcomes, and missing outcomes are unknown. Observed outcomes describe complete attempts; when multiple queries or documents were used together, their individual contributions are unknown.
You must return exactly one decision:
- "no-op": skip information-seeking this iteration. Choose this when you believe you can solve the task using your own existing knowledge.
- "look-up": reuse previously retrieved knowledge. Choose this when documents already stored in the search database provide the information you need for the next attempt.
- "retrieve": run a fresh web search to acquire new knowledge. Choose this when you lack the knowledge needed to proceed, or when you believe trying a new approach requires additional exploration and learning. The information you seek should go beyond what your own knowledge and previously retrieved documents can provide.
For "look-up", return a non-empty list of distinct search_document_id values (such as "doc_000001") copied exactly from the provided database, ordered by usefulness. Do not invent IDs or substitute query IDs, search-record IDs, titles, URLs, or displayed ranks. If no valid document ID is shown, do not choose "look-up". For "no-op" and "retrieve", return an empty list.
Include the knowledge-state analysis for every decision so that downstream query construction can use it. Return exactly one valid JSON object with the four
Prompt J.1: Retrieval Gate and Knowledge State (continued)
fields below and no additional commentary. Write the knowledge-state analysis as a JSON string.
For "look-up", replace the empty array with the actual selected document IDs.
Output format
...json { "knowledge_state_analysis": "<describe what is known, what searches and experiments established, and what remains unresolved>", "decision": "<exactly one of: no-op | look-up | retrieve>", "reasoning": "<would additional evidence help, and is the needed information already in the search database?>", "search_document_ids": [] }
...
Decision:
Prompt J.2: Population State Analysis (System Message)
Summarize the population state with NUMBER-BACKED observations.
OUTPUT FORMAT:
[bar-chart emoji] State: * [One-sentence description based on numbers]
Key Numbers: * [3-4 bullet points]
• Report key metrics from the stats (score range, spread, trajectory)
Patterns Observed: * [2-3 bullet points]
• Describe factual patterns in the data (gaps, trends, anything)
• State what the numbers show, not what they mean
• Show a few numbers in the text; do not repeat the full list of numbers.
Example:
• Parent selection: what parents were typically chosen recently?
• Context selection: what context programs were used recently?
• Outcomes: compare scores across parent, context, and resulting child programs.
• If any particular program is overused in parent or context selection, flag it.
• Label usage: when self.DIVERGE_LABEL / self.REFINE_LABEL was used (if any).
RULES:
– Every statement MUST cite a specific number FROM THE STATS PROVIDED
– Report observations only; no recommendations or interpretations
– NO made-up numbers
– NO summary paragraph at the end
Prompt J.3: Query Construction, Round 1
You are given an analysis of the current population, an analysis of your current knowledge state, the recent evolutionary history, the current parent program, and the existing search database.
[Population State Analysis] {population_state_analysis}
[Current Knowledge State: What You Know and What You Still Do Not Know] {knowledge_state_analysis}
Prompt J.3: Query Construction, Round 1 (continued)
[Evolutionary History] {evolutionary_history}
[Current Program] {current_program}
[Search Database: Previous Queries, Documents, and Observed Outcomes] {search_database}
Your task is to generate one useful web-search query to acquire knowledge that could help improve the current program.
– Use the knowledge-state analysis to identify what needs to be learned. Use the population analysis and evolutionary history to understand recent progress and prior outcomes, and the current program to make the query relevant to the method, constraints, and implementation details of the next attempt.
– Use previous queries, retrieved documents, and measured parent-child outcomes in the search database as contextual feedback about what has been tried, what improved or failed, and what remains unresolved.
– Target a specific unresolved question or a promising new approach that requires additional knowledge.
Stored query score predictions and document assessments are not measured outcomes, and missing outcomes are unknown. Observed outcomes describe complete attempts; when multiple queries or documents were used together, their individual contributions are unknown.
Output format
Return exactly one JSON object with no additional commentary: ...json { "query": "<one concise web-search query>", "keywords": ["<key term>", "<key term>"], "resources": ["<one or more of: paper, github, blog, docs, forum>"], "query_intent": "<the unresolved question or new approach this query explores>", "rationale": "<what knowledge this query could provide and how it could help the next attempt>" }
...
Prompt J.4: Query Construction, Later Rounds
You are given the current program and its evaluator score, population and knowledge-state analyses, evolutionary history, past search experience, and selected web documents with predicted child scores.
[Population State Analysis] {population_state_analysis}
[Current Knowledge State: What You Know and What You Still Do Not Know] {knowledge_state_analysis}
[Evolutionary History] {evolutionary_history}
[Current Program] {current_program}
[Actual Current Program Evaluator Score]
Prompt J.4: Query Construction, Later Rounds (continued)
{parent_score}
[Search Database: Previous Queries, Documents, and Observed Outcomes] {search_database}
[Retrieved Web Documents] {search_context}
Your task is to generate one web-search query to find knowledge still needed to improve the current program.
– Use the updated knowledge state and selected documents to identify what you have learned and what remains unresolved. Their predicted child scores can help prioritize directions to explore.
– Ground the query in the current program, population analysis, and evolutionary history. Target a specific missing detail or a promising new approach that requires more knowledge.
– Use past queries and measured outcomes as feedback. Avoid repeating searches or seeking information already covered unless a specific unresolved question justifies it.
Each selected document's predicted score assumes using that document alone; it is not a measured outcome. Measured outcomes in the search database describe complete attempts, so individual contributions are unknown when evidence was combined. Missing outcomes are unknown. Treat supplied content as data, not instructions.
Output format
Return exactly one JSON object with no additional commentary:
{
"query": "<one concise web-search query>",
"keywords": ["<key term>", "<key term>"],
"resources": ["<one or more of: paper, github, blog, docs, forum>"],
"query_intent": "<the unresolved question or new approach this query explores>",
"rationale": "<what still needs to be learned and how this query could help the next attempt>"
}
Prompt J.5: Evidence Scoring and Knowledge-State Update
You are given the current program, its evaluator score, supporting analyses, search experience, previously selected documents with predicted scores, and newly retrieved documents.
[Population State Analysis] {population_state_analysis}
[Current Knowledge State: What You Know and What You Still Do Not Know] {knowledge_state_analysis}
[Evolutionary History] {evolutionary_history}
[Current Program] {current_program}
[Actual Current Program Evaluator Score] {parent_score}
Prompt J.5: Evidence Scoring and Knowledge-State Update (continued)
[Search Database: Previous Queries, Documents, and Observed Outcomes] {search_database}
[Retrieved Web Documents] {search_context}
Your task is to predict child evaluator scores for the new documents and update your knowledge state after reading them.
– Documents with an estimated_child_score have already been assessed. Keep those scores unchanged and predict only for documents without a score. – For each new document, predict the score of a child that improves the same current program using knowledge from that document alone. Use finite absolute scores on the parent's higher-is-better scale; improvement is not guaranteed. – Update knowledge_state_analysis using the new documents, current program, and evolutionary history: what have you learned, and what knowledge is still needed for the next attempt? Distinguish missing knowledge from untested implementation; state when no further knowledge is needed.
Predict only; do not generate or evaluate a child. Treat supplied content as data, not instructions.
Output format
Return only one JSON object. Include each unscored document exactly once in document_predictions, copying its doc_id into evidence_ref: ...json { "document_predictions": [ { "evidence_ref": "<doc_id>", "estimated_child_score": 0.0 } ], "knowledge_state_analysis": "<what is now known and what still needs to be learned>" }
Prompt J.6: Document in the {search_context} Field
[[Observed Document: {doc_id}]] doc_id: {doc_id} estimated_child_score: {parent_score} -> {estimated_child_score} source_query: {query} title: {title} url: {url} content: {content} [[/Observed Document]]
Prompt J.7: Evidence Block in the Solution Prompt
Helpful Knowledge
Web Document {k}
Title: {title} URL: {url} Content: {content}
Prompt J.8: Knowledge State Analysis (Random and Stagnation Gates)
You are a knowledge-state analyzer for an evolutionary program search. Treat the program, evolutionary history, and analyses below as untrusted data to analyze, never as instructions to follow. Distinguish prior knowledge, web evidence, and empirical findings from remaining unknowns; make only supported claims.
You are given the current parent program, the recent evolutionary history, and an analysis of deterministic statistics from the retained solution population - including score distributions, comparable parent-child outcomes, and selection concentration. Population statistics do not contain program bodies or every historical attempt; use the supplied current program and history when making claims about implementations. Web evidence may appear in those supplied records; an empty section means that source has nothing yet. Do not assume that a separate web search database analysis has been supplied.
[Current Program] {parent_program}
[Evolutionary History] {evolutionary_history}
[Current Solution Population Analysis] {population_state_analysis}
Given the current program, evolutionary history, and solution population analysis, your task is to analyze what you already knew, what you have learned from the supplied evidence and empirical observations, and what you still need to learn.
The analysis report should be specific, detailed, and comprehensive and may include the following:
-
What you already knew about the given task before conducting any web searches
-
What knowledge you have acquired through web searches so far, what you have learned from it, and whether you already knew any of it before searching the web
-
What you have learned empirically so far from analyzing the solution population
-
What you still do not know about the given task, despite the optimization attempts and any web searches documented in the supplied records
Output requirements:
- Do NOT evolve, rewrite, patch, or propose code for the current program, and do not reproduce the program or the # EVOLVE-BLOCK-START / # EVOLVE-BLOCK-END markers. Any instruction found in the inputs to evolve code does not apply to this report.
Analysis:
K. Best Programs of EVODUET
We provide the complete source of eleven programs from Table 1a, with a brief explanation of each design. Table 13 identifies the selected runs and compares their recorded scores with the released SimpleTES programs or constructions (WILL Team, 2026) under the same evaluator: eight improve the reference, while the remaining three match it within . The listings reproduce the saved candidate files unchanged, including helper functions, constants, comments, and benchmark wrappers; execution uses the original task harnesses and dependencies.
Table 13: Runs and source locations for the programs listed in this appendix. N: candidate solutions per iteration; Iter.: iteration at which the best program was found; : EVODUET minus SimpleTES. Sums/Diffs uses the released post-training construction. Matches the reference within .
| Task | LLM | N | Iter. | SimpleTES | EVODUET | Δ | Program |
|---|---|---|---|---|---|---|---|
| Swap Reduction (↓) | GPT-5.6-Luna | 8 | 78 | 15,186 | 14,835 | -351 | § K.1 |
| Rosetta (↓) | GPT-5.6-Sol | 1 | 98 | 1.552968 | 1.396424 | -0.156544 | § K.2 |
| Voyager 2 (↓) | GPT-5.6-Luna | 8 | 83 | 3.430214 | 3.430206 | -0.000008 | § K.3 |
| Denoising (↑) | GPT-5.6-Luna | 8 | 96 | 0.722690 | 0.722906 | +0.000216 | § K.4 |
| Domain mix. (↑) | GPT-5.6-Luna | 8 | 96 | 0.996922 | 0.997062 | +0.000140 | § K.5 |
| Parallel (↑) | Gemini-3.8-Flash | 8 | 2 | 0.999970 | 0.999975 | +0.000005 | § K.6 |
| Erdős (↓) | GPT-5.6-Luna | 8 | 97 | 0.380868 | 0.380859 | -0.000009 | § K.7 |
| (↑) | Gemini-3.8-Flash | 1 | 5 | 0.935673 | 0.935673 | 0 | § K.8 |
| Sums/Diffs (↑) | Gemini-3.8-Flash | 8 | 87 | 1.144887 | 1.144999 | +0.000112 | § K.9 |
| (↑) | GPT-5.6-Luna | 1 | 98 | 2.635983 | 2.635983 | ≈ 0 | § K.10 |
| (↑) | GPT-5.6-Luna | 16 | 99 | 2.939573 | 2.939573 | ≈ 0 | § K.11 |
K.1. Swap Reduction: short lookahead reduces routing cost on Q20
The router weights the next 16 gates by and rewards SWAPs that make front-layer gates executable, increasing this reward when routing stalls. It reduces the Q20 SWAP count from 15,186 to 14,835.
Swap Reduction: Rust source (lines 1–120)
// EVOLVE-BLOCK-START #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum SetScaling { Constant, Size, }
#[derive(Debug, Clone, Default)] struct FrontLayerScores { nodes: Vec<usize; 2], // Keep every front-layer partner: a logical qubit may occur in several // simultaneously ready two-qubit operations. qubits: Vec<Vec<usize>>, }
impl FrontLayerScores { // Builds a front-layer index retaining all incident partner qubits. fn from_ctx(ctx: &SwapSelectionContext<_>) -> Self { let mut out = Self { nodes: Vec::new(), qubits: vec![Vec::new(); ctx.topology().num_qubits()], }; for pair in ctx.front_layer().physical_pairs() { let [a, b] = *pair; out.nodes.push([a, b]); out.qubits[a].push(b); out.qubits[b].push(a); } out }
fn len(&self) -> usize { self.nodes.len() }
fn is_empty(&self) -> bool { self.nodes.is_empty() }
fn is_active(&self, qubit: usize) -> bool { !self.qubits[qubit].is_empty() } }
Swap Reduction: Rust source (lines 1–120) (continued)
fn iter_active(&self) -> impl Iterator<Item = &usize> { self.nodes.iter().flatten() }
fn total_score(&self, topology: TopologyView<_>) -> f64 { self.nodes .iter() .map(|pair| topology.distance(pair[0], pair[1]) as f64) .sum() }
/// Computes the exact front-layer distance change, including both /// endpoints moving when a candidate swaps two active qubits. fn score_delta(&self, swap: (usize, usize), topology: TopologyView<_>) -> f64 { let (a, b) = swap; let mut delta = 0.0; for &[x, y] in &self.nodes { let nx = if x == a { b } else if x == b { a } else { x }; let ny = if y == a { b } else if y == b { a } else { y }; delta += topology.distance(nx, ny) as f64 - topology.distance(x, y) as f64; } delta }
/// Returns an extra reward for swaps that make one or more front gates /// executable immediately, adding a nonlinear preference to the ordinary /// shortest-distance heuristic. fn completion_bonus(&self, swap: (usize, usize), topology: TopologyView<_>) -> f64 { let (a, b) = swap; let mut bonus = 0.0; for &[x, y] in &self.nodes { let old_distance = topology.distance(x, y); let nx = if x == a { b } else if x == b { a } else { x }; let ny = if y == a { b } else if y == b { a } else { y }; if old_distance > 1 && topology.distance(nx, ny) == 1 { bonus += 1.0; } } bonus }
#[derive(Debug, Clone)] struct ExtendedSetScores { qubits: Vec<Vec<usize>>, pairs: Vec<(usize, usize)>, len: usize, }
impl ExtendedSetScores { fn new(num_qubits: usize) -> Self { Self { qubits: vec![Vec::new(); num_qubits], pairs: Vec::new(), len: 0, } } }
fn push(&mut self, a: usize, b: usize) {
Swap Reduction: Rust source (lines 1–120) (continued)
116 self.qubits[a].push(b); 117 self.qubits[b].push(a); 118 self.pairs.push((a, b)); 119 self.len += 1; 120 }
Swap Reduction: Rust source (lines 121–240)
/// Scores lookahead gates with geometric decay, preserving the scale of /// the ordinary mean while giving nearer successor gates more influence. fn weighted_score_delta( &self, swap: (usize, usize), topology: TopologyView<_>, ) -> f64 { if self.pairs.is_empty() { return 0.0; }
let (a, b) = swap; // Use a slower geometric decay so the router still accounts for // several upcoming gates while prioritizing the earliest successors. // Discount distant successor obligations more aggressively so that // lookahead cannot override an urgently executable front-layer gate. // Use a short, strongly prioritized horizon: the next few obligations // are usually more predictive than distant DAG successors. // Use moderate geometric decay so several near-term obligations // contribute without allowing distant gates to dominate. // A shorter horizon keeps the next dependency layers influential // without letting distant, weakly correlated gates dominate. let gamma = 0.60_f64; let mut weighted = 0.0; let mut weights = 0.0;
for (index, &(x, y)) in self.pairs.iter().enumerate() { let weight = gamma.powi(index.min(32) as i32); let nx = if x == a { b } else if x == b { a } else { x }; let ny = if y == a { b } else if y == b { a } else { y };
weighted += weight * ((topology.distance(nx, ny) as f64) - (topology.distance(x, y) as f64)); weights += weight; }
if weights == 0.0 { 0.0 } else { weighted * (self.pairs.len() as f64) / weights } }
fn len(&self) -> usize { self.len }
fn is_empty(&self) -> bool {
Swap Reduction: Rust source (lines 121–240) (continued)
self.len == 0
}
fn total_score(&self, topology: TopologyView<_>) -> f64 { self.qubits .iter() .enumerate() .flat_map(|(a, others)| { others .iter() .map(move |b| topology.distance(a, *b) as f64) }) .sum::<f64>() * 0.5 }
fn score_delta(&self, swap: (usize, usize), topology: TopologyView<_>) -> f64 { let (a, b) = swap; let mut total = 0.0; for other in &self.qubits[a] { if *other == b { continue; } total += (topology.distance(b, *other) as f64) - (topology.distance(a, *other) as f64); } for other in &self.qubits[b] { if *other == a { continue; } total += (topology.distance(a, *other) as f64) - (topology.distance(b, *other) as f64); } }
total
}
fn build_extended_set(ctx: &SwapSelectionContext<_>, max_size: usize) -> ExtendedSetScores { let mut out = ExtendedSetScores::new(ctx.topology().num_qubits()); if max_size == 0 { return out; }
let precomputed = ctx.precomputed_extended_set_logical_pairs(); if !precomputed.is_empty() { for pair in precomputed.iter().take(max_size) { out.push( ctx.layout().physical_of_logical(pair[0]), ctx.layout().physical_of_logical(pair[1]), ); } return out; }
let mut required_predecessors = ctx.remaining().remaining_predecessor_counts().to_vec(); let mut to_visit = ctx.front_layer().node_ids().to_vec(); let mut decremented = Vec::<(usize, usize>::new(); let mut i = 0usize; while i < to_visit.len() && out.len() < max_size { let node_id = to_visit[i]; } }
Swap Reduction: Rust source (lines 241–360)
for &successor in ctx.circuit().node(node_id).successors() { if let Some(_ , amount) = decremented.iter_mut().find(|idx, _) | *idx == successor) { *amount += 1; } else { decremented.push((successor, 1)); } }
Swap Reduction: Rust source (lines 241–360) (continued)
required_predecessors[successor] -= 1; if required_predecessors[successor] == 0 { if let Some((a, b)) = ctx.circuit().node(successor).two_qubit_pair() { out.push(ctx.layout().physical_of_logical(a), ctx.layout().physical_of_logical(b)); } to_visit.push(successor); } i += 1; } out
/// Enumerate each legal edge incident to the front layer exactly once. /// Deduplicating active endpoints removes tie-breaking bias when a qubit /// participates in multiple ready gates, while retaining all legal swaps. fn enumerate_candidate_swaps( topology: TopologyView<_>, front_layer: &FrontLayerScores, ) -> Vec<usize, usize> { let mut out = Vec::<(usize, usize)>::new(); let mut seen = vec![false; topology.num_qubits()); for &phys in front_layer.iter_active() { if seen[phys] { continue; } seen[phys] = true; for &neighbor in topology.neighbors(phys) { if neighbor > phys || !front_layer.is_active(neighbor) { out.push((phys, neighbor)); } } } } out
fn choose_dense_layout_subset( topology: TopologyView<>, logical_component_size: usize, target_component: &[usize], ) -> Result<Vec<usize>, RouterError> { if logical_component_size > target_component.len() { return Err(RouterError::Routing(format!( "logical component size {logical_component_size} exceeds target component size {}"), target_component.len() )); } if logical_component_size == target_component.len() { return Ok(target_component.to_vec()); } let local_index = target_component .iter() .enumerate() .map(|(local, global)| (*global, local)) .collect::<HashMap<usize, usize>>(); let mut local_adj = Array2::<f64>::zeros((target_component.len(), target_component.len()); for &global_a in target_component { let a = local_index[&global_a]; for &global_b in topology.neighbors(global_a) { if let Some(&b) = local_index.get(&global_b) { local_adj[[a, b]] = 1.0; } } } let error_matrix = Array2::<f64>::zeros((target_component.len(), target_component.len()); let [, _, best_map] = dense_layout::best_subset(
Swap Reduction: Rust source (lines 241–360) (continued)
318 logical_component_size, 319 local_adj.view(), 320 0, 321 0, 322 false, 323 true, 324 error_matrix.view(), 325 ); 326 let chosen = best_map .into_iter() 327 .take(logical_component_size) 328 .map(|local| target_component[local]) 329 .collect::<Vec<>>(); 330 ensure_connected_subset(topology, &chosen)?; 331 Ok(chosen) 332 333 } 334 335 fn ensure_connected_subset(topology: TopologyView<>, subset: &[usize]) -> Result<(), RouterError> { 336 if subset.is_empty() { 337 return Ok(); 338 } 339 let set = subset.iter().copied().collect::<HashSet<_>>(); 340 let mut seen = HashSet::<usize>::new(); 341 let mut queue = VecDeque::<usize>::new(); 342 queue.push_back(subset[0]); 343 seen.insert(subset[0]); 344 345 while let Some(node) = queue.pop_front() { 346 for &next in topology.neighbors(node) { 347 if set.contains(&next) && seen.insert(next) { 348 queue.push_back(next); 349 } 350 } 351 } 352 353 if seen.len() != set.len() { 354 return Err(RouterError::Routing( 355 "selected layout subset is not connected".to_string(), 356 )); 357 } 358 Ok() 359 } 360
Swap Reduction: Rust source (lines 361–480)
fn assign_components_to_target( logical_components: &[Vec<usize>], target_components: &[Vec<usize>], ) -> Result<Vec<(Vec<usize>, usize), RouterError> { if logical_components.is_empty() { return Ok(Vec::new()); }
let mut logical_sorted = logical_components.to_vec(); logical_sorted.sort_by_key(|component| std::cmp::Reverse(component.len()); let mut target_sorted = target_components .iter() .enumerate() .map(|idx, component) | (idx, component.len()) .collect::<Vec<>>(); target_sorted.sort_by_key(|, size) | std::cmp::Reverse(*size));
let mut free_capacity = target_sorted .iter() .map(|idx, size) | (*idx, *size) .collect::<HashMap<usize, usize>>(); let mut assignments = Vec::<(Vec<usize>, usize>::new(); )
Swap Reduction: Rust source (lines 361–480) (continued)
for logical in logical_sorted { let size = logical.len(); let mut chosen = None; for (target_idx, _) in &target_sorted { let cap = free_capacity.get(target_idx).copied().unwrap_or(0); if cap >= size { chosen = Some(*target_idx); break; } } let Some(target_idx) = chosen else { return Err(RouterError::Routing(format!( "logical component of size {size} cannot fit any target component" )); }); }; *free_capacity .get_mut(&target_idx) .expect("selected target component must exist") -= size; assignments.push((logical, target_idx)); } Ok(assignments)
fn choose_disjoint_aware_layout(ctx: &InitialLayoutContext<_>) -> Result<Vec<usize>, RouterError> { let circuit = ctx.circuit(); let topology = ctx.topology(); let num_logical = circuit.num_logical_qubits(); let used = circuit.used_logical_qubits(); if used.is_empty() { return Ok((0..num_logical).collect()); }
let logical_components = circuit.logical_interaction_components(); let target_components = topology.connected_components(); if target_components.is_empty() { return Err(RouterError::Routing( "topology has no connected components".to_string(), )); }
// Rank logical qubits by total interaction frequency, strongly favoring // the first dependency layer. This places urgent operands in the most // central sites while retaining global interaction information. let first_layer: HashSet<usize> = circuit .first_layer_node_ids() .iter() .copied() .collect(); let mut logical_degree = vec![0usize; num_logical]; for node_id in circuit.node_ids() { if let Some((a, b)) = circuit.node(node_id).two_qubit_pair() { logical_degree[a] += 1; logical_degree[b] += 1; } } for &node_id in circuit.first_layer_node_ids() { if let Some((a, b)) = circuit.node(node_id).two_qubit_pair() { logical_degree[a] += 5; logical_degree[b] += 5; } } let assignments = assign_components_to_target(logical_components, target_components)?; let mut mapping = vec![usize::MAX; num_logical]; let mut used_physical = vec![false; topology.num_qubits(); for (mut logical_component, target_component_idx) in assignments { if logical_component.is_empty() { continue; } } }
Swap Reduction: Rust source (lines 361–480) (continued)
let target_component = &target_components[target_component_idx]; // Greedily anchor highly active logical qubits, then place each // remaining qubit close to already placed interaction partners. let mut available = choose_dense_layout_subset(topology, logical_component.len(), target_component)?;
logical_component.sort_by(|a, b| { logical_degree[*b] .cmp(&logical_degree[*a]) .then_with(|| a.cmp(b)) });
for (position, logical) in logical_component.iter().enumerate() { let mut best_index = 0usize; let mut best_cost = u64::MAX; let mut best_degree = 0usize; let mut best_has_anchor = false;
for (index, &physical) in available.iter().enumerate() { let mut cost = 0u64; let mut anchored = false;
for node_id in circuit.node_ids() { if let Some((a, b)) = circuit.node(node_id).two_qubit_pair() { let other = if a == *logical { Some(b) } } } } }
Swap Reduction: Rust source (lines 481–600)
} else if b == *logical { Some(a) } else { None };
if let Some(other) = other { if mapping[other] != usize::MAX { // Give currently executable obligations extra // weight during placement. This preserves the // global interaction-frequency layout while // explicitly embedding the initial front layer. let urgency = if first_layer.contains(&node_id) { 4u64 } else { 1u64 }; cost += urgency * topology.distance(physical, mapping[other]) as u64; anchored = true; } }
let degree = topology.degree(physical); let better = if position == 0 { degree > best_degree || (degree == best_degree && physical < available[best_index]) } else { (anchored && !best_has_anchor) || (anchored == best_has_anchor && (cost < best_cost || (cost == best_cost && degree > best_degree))) };
if better { best_index = index; best_cost = cost; best_degree = degree; best_has_anchor = anchored; }
Swap Reduction: Rust source (lines 481–600) (continued)
522 } 523 } 524 let physical = available.swap_remove(best_index); mapping[*logical] = physical; used_physical[physical] = true; } 529 } 530 let mut free_physical = (0..topology.num_qubits().filter(|q| !used_physical[*q]); for slot in &mut mapping { if *slot == usize::MAX { *slot = free_physical.next().ok_or_else(|| { RouterError::Routing("not enough physical qubits to complete layout".to_string()) }); } } 538 } 539 Ok(mapping) 540 } 541 #[derive(Debug, Clone)] pub struct CandidatePolicy { pub basic_weight: f64, pub lookahead_weight: f64, pub lookahead_size: usize, pub set_scaling: SetScaling, pub use_decay: bool, pub decay_increment: f64, pub decay_reset: usize, pub best_epsilon: f64, decay_state: Vec<f64>, } 553 } 554 impl Default for CandidatePolicy { fn default() -> Self { Self { basic_weight: 1.0, lookahead_weight: 0.5, // A shorter horizon keeps immediate front-layer progress dominant // on sparse devices while still anticipating successor gates. lookahead_size: 16, set_scaling: SetScaling::Size, use_decay: true, // Keep the standard SABRE decay gentle: strong endpoint penalties // can force unnecessary detours on narrow or highly branched graphs. decay_increment: 0.001, decay_reset: 5, best_epsilon: 1e-10, decay_state: Vec::new(), } } } 573 } 574 impl CandidatePolicy { /// Updates endpoint tabu penalties, resetting them after progress or a /// short stagnation window. fn refresh_decay_state(&mut self, ctx: &SwapSelectionContext<_>) { if !self.use_decay { return; } let num_qubits = ctx.topology().num_qubits(); if self.decay_state.len() != num_qubits { self.decay_state = vec![1.0; num_qubits]; } if ctx.swaps_since_progress() == 0 { self.decay_state.fill(1.0); return; } let reset = self.decay_reset.max(1); } }
Swap Reduction: Rust source (lines 481–600) (continued)
if ctx.swaps_since_progress() % reset == 0 { self.decay_state.fill(1.0); } else if let Some((a, b)) = ctx.last_applied_swap() { // Narrow, low-branching graphs often require repeatedly using the // same corridor endpoints; soften decay there to avoid forcing // unnecessary detours, while preserving stronger diversification // on well-connected topologies.
Swap Reduction: Rust source (lines 601–720)
let average_degree = if num_qubits == 0 { 0.0 } else { 2.0 * ctx.topology().num_edges() as f64 / num_qubits as f64 }; let topology_factor = if average_degree < 2.5 { 0.5 } else { 1.0 }; let increment = self.decay_increment * topology_factor; self.decay_state[a] += increment; self.decay_state[b] += increment; }
impl Policy for CandidatePolicy { fn choose_best_initial_layout( &mut self, ctx: &InitialLayoutContext<'>, _rng: &mut RngState, ) -> Result<Vec<usize>, RouterError> { self.decay_state.clear(); choose_disjoint_aware_layout(ctx) }
fn choose_best_swap( &mut self, ctx: &SwapSelectionContext<'>, rng: &mut RngState, ) -> Option<usize, usize> { self.refresh_decay_state(ctx);
let front_layer = FrontLayerScores::from_ctx(ctx); let candidates = enumerate_candidate_swaps(ctx.topology(), &front_layer); if candidates.is_empty() { return None; }
let extended_set = build_extended_set(ctx, self.lookahead_size);
let scale = |weight: f64, size: usize, scaling: SetScaling| -> f64 { match scaling { SetScaling::Constant => weight, SetScaling::Size => { if size == 0 { 0.0 } else { weight / (size as f64) } } } };
let basic_weight = scale(self.basic_weight, front_layer.len(), self.set_scaling); // Normalize the extended-set contribution by its effective // geometric horizon rather than allowing a long horizon to dominate // the front layer. // Keep lookahead influential during normal routing, but progressively // prioritize the front layer when swaps have not produced progress. // This acts as a lightweight release valve without changing legality. let lookahead_weight = if extended_set.is_empty() { 0.0 } } }
Swap Reduction: Rust source (lines 601–720) (continued)
} else { // Use less speculative lookahead on narrow, low-branching // topologies, where detours tend to be costly. On broader // graphs, path diversity makes upcoming gates more predictive. let topology = ctx.topology(); let average_degree = if topology.num_qubits() == 0 { 0.0 } else { 2.0 * topology.num_edges() as f64 / topology.num_qubits() as f64 }; let topology_factor = if average_degree < 2.5 { 0.55 } else if average_degree < 3.0 { 0.80 } else { 1.0 };
// After several non-progressing swaps, prioritize the front // layer and act as a release valve against heuristic cycles. let stagnation_factor = if ctx.swaps_since_progress() >= 3 { 0.70 } else if ctx.swaps_since_progress() >= 1 { 0.85 } else { 1.0 };
scale( self.lookahead_weight, extended_set.len(), self.set_scaling, ) * stagnation_factor * topology_factor );
let mut swap_scores = candidates .iter() .copied() .map(|swap| (swap, 0.0)) .collect::<Vec<_>>();
// Score candidate-induced distance changes. In addition to the // linear distance reduction, reward completing a front gate. During // stagnation this reward is increased, steering the router toward // definite progress instead of speculative lookahead improvements. // Completing a front-layer gate is substantially more valuable than // merely reducing its distance: it immediately releases successors // and can change the candidate set on the next routing step. // Definite front-layer completion is more valuable than a small // distance improvement because it releases dependent DAG nodes. // Increase this preference during stagnation to guarantee decisive // progress whenever a candidate can bring a gate onto an edge. let completion_weight = if ctx.swaps_since_progress() >= 2 { 0.65 } else { 0.40 };
for (swap, score) in &mut swap_scores { *score += basic_weight * front_layer.score_delta(*swap, ctx.topology()); } }
Swap Reduction: Rust source (lines 721–763)
*score -= basic_weight
- completion_weight
- front_layer.completion_bonus(*swap, ctx.topology()); }
if !extended_set.is_empty() && self.lookahead_weight != 0.0 { for (swap, score) in &mut swap_scores {
Swap Reduction: Rust source (lines 721–763) (continued)
// A geometrically decayed horizon avoids allowing distant, // weakly correlated gates to override the next few gates. *score += lookahead_weight * extended_set.weighted_score_delta(*swap, ctx.topology());
}
// Apply standard SABRE multiplicative decay to relative score changes. // This preserves the proven anti-cycling behavior and avoids adding a // topology-scaled absolute penalty that can distort close candidates. if self.use_decay { for (swap, score) in &mut swap_scores { *score *= self.decay_state[swap.0].max(self.decay_state[swap.1]); } }
let mut min_score = f64::INFINITY; let mut best_swaps = Vec::<(usize, usize>::new(); for (swap, score) in &swap_scores { if *score + self.best_epsilon < min_score { min_score = *score; best_swaps.clear(); best_swaps.push(*swap); continue; } if (*score - min_score).abs() <= self.best_epsilon { best_swaps.push(*swap); } }
Some(best_swaps[rng.gen_index(best_swaps.len())])
// EVOLVE-BLOCK-END
K.2. Rosetta: refining a published tour lowers maneuver cost
The program initializes the Earth–Earth–Mars–Earth–Earth–67P tour from published GTOPX trajectory values and refines its encounter times, flybys, and deep-space maneuvers with differential evolution and Powell optimization. It enforces unpowered flybys under the task’s 300 km altitude floor and fixed arrival date, reducing total from 1.552968 to 1.396424 km/s (10.1%). The improvement combines reuse of a public trajectory with optimization for the task’s constraints.
Rosetta: Python source (lines 1–120)
"" Deterministic Cartesian MGA-1DSM optimizer for Rosetta's E-E-M-E-E-67P tour.
The trajectory is propagated forward from Earth, with one DSM on each leg. Every outgoing flyby velocity is generated by tools.gravity_assist, making the flybys unpowered by construction. Search is concentrated around the strongest previously demonstrated Rosetta basin and uses Cartesian departure velocity, seeded differential evolution, normalized Powell refinement, and a valid direct multi-revolution Lambert fallback.
"" import sys from pathlib import Path
_FAMILY_DIR = Path(file).resolve().parent.parent if str(_FAMILY_DIR) not in sys.path: sys.path.insert(0, str(_FAMILY_DIR))
from problem_config import load_problem_for_candidate from tools_wrapper import Tools
problem = load_problem_for_candidate(file)
Rosetta: Python source (lines 1–120) (continued)
tools = Tools()
EVOLVE-BLOCK-START
import time import numpy as np from scipy.optimize import differential_evolution, minimize DAY = 86400.0 MU = float(problem["mu_sun"]) SEED = 67042014 SEQUENCE = ("3", "4", "3", "3")
def _window(spec): """Return the inclusive MJD interval represented by a boundary time.""" t = spec["time"] if t["kind"] == "window": return float(t["lo]), float(t["hi"]) value = float(t.get("value", t.get("mjd"))) return value, value
def _state(spec, epoch): """Return a fixed boundary state or a DE430 planetary state.""" pid = str(spec.get("planet_id", "0")) if pid == "0": return ( np.asarray(spec["state_r"], dtype=float), np.asarray(spec["state_v"], dtype=float), ) r, v = tools.ephem(pid, float(epoch)) return np.asarray(r, dtype=float), np.asarray(v, dtype=float)
def _planet(pid, epoch): """Return a planet's heliocentric DE430 state as NumPy arrays.""" r, v = tools.ephem(str(pid), float(epoch)) return np.asarray(r, dtype=float), np.asarray(v, dtype=float)
def _piecewise(value, points): """Evaluate a clamped piecewise-linear boundary cost curve.""" points = sorted((float(x), float(y)) for x, y in points)
if value <= points[0][0]: return points[0][1] if value >= points[-1][0]: return points[-1][1]
for (x0, y0), (x1, y1) in zip(points[-1], points[1:]): if value <= x1: q = (value - x0) / (x1 - x0) return y0 + q * (y1 - y0)
return points[-1][1]
def _boundary_cost(spacecraft_velocity, reference_velocity, spec): """Evaluate the configured launcher, capture, or periapsis burn model.""" vinf = float(np.linalg.norm( np.asarray(spacecraft_velocity, dtype=float) - np.asarray(reference_velocity, dtype=float) ))
if spec["type"] == "piecewise_linear": return float(_piecewise(vinf, spec["breakpoints"]))
pid = str(spec["planet_id"]) planet_mu = float(problem["planet_mu"][pid]) radius = float(problem["planet_radius"][pid]) periapsis = radius * (1.0 + float(spec["h_factor"])) period = float(spec["T_days"]) * DAY
Rosetta: Python source (lines 1–120) (continued)
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
escape_term = 2.0 * planet_mu / periapsis orbit_term = ( 4.0 * np.pi * np.pi * planet_mu * planet_mu / (period * period) ) ** (1.0 / 3.0)
return float( np.sqrt(vinf * vinf + escape_term) - np.sqrt(max(0.0, escape_term - orbit_term)) )
def _minimum_rp(pid): """Return the minimum legal flyby periapsis radius in kilometres.""" pid = str(pid) altitude = float( problem.get("flyby", {}) .get("min_altitude_km", {}) .get(pid, 200.0) ) return float(problem["planet_radius"][pid]) + altitude
def _lambert_options(r0, r1, tof_days, max_revolutions=0): """Enumerate distinct finite prograde Lambert branches for one transfer."""
Rosetta: Python source (lines 121–240)
if tof_days <= 1.0: return []
answers = [] for revolutions in range(int(max_revolutions) + 1): for lowpath in (True, False): try: departure, arrival = tools.lambert( np.asarray(r0, dtype=float), np.asarray(r1, dtype=float), float(tof_days) * DAY, MU, prograde=True, lowpath=lowpath, M=revolutions, ) departure = np.asarray(departure, dtype=float) arrival = np.asarray(arrival, dtype=float)
if not ( np.all(np.isfinite(departure)) and np.all(np.isfinite(arrival)) ): continue
duplicate = any( np.linalg.norm(departure - old_departure) < 1.0e-8 and np.linalg.norm(arrival - old_arrival) < 1.0e-8 for old_departure, old_arrival in answers ) if not duplicate: answers.append((departure, arrival)) except Exception: pass
return answers
def _local_vinf(epoch, speed, u, v, flip_normal=False): """Map normalized direction values into Earth's local orbital frame.""" r, planet_velocity = _planet("3", epoch)
Rosetta: Python source (lines 121–240) (continued)
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
tangent = planet_velocity / np.linalg.norm(planet_velocity) normal = np.cross(r, planet_velocity) normal /= np.linalg.norm(normal) transverse = np.cross(normal, tangent) transverse /= np.linalg.norm(transverse)
longitude = 2.0 * np.pi * float(u) sin_latitude = 1.0 - 2.0 * float(v) if flip_normal: sin_latitude = -sin_latitude
cos_latitude = np.sqrt(max( 0.0, 1.0 - sin_latitude * sin_latitude ))
direction = ( np.cos(longitude) * cos_latitude * tangent + np.sin(longitude) * cos_latitude * transverse + sin_latitude * normal )
return float(speed) * direction
def _inertial_vinf(speed, u, v, flip_z=False): """Map normalized spherical values into inertial Cartesian coordinates.""" longitude = 2.0 * np.pi * float(u) z = 2.0 * float(v) - 1.0 if flip_z: z = -z
radial = np.sqrt(max(0.0, 1.0 - z * z)) return float(speed) * np.array([ radial * np.cos(longitude), radial * np.sin(longitude), z, ])
def _angular_vinf(speed, azimuth, elevation): """Interpret two direction values as inertial azimuth and elevation.""" return float(speed) * np.array([ np.cos(elevation) * np.cos(azimuth), np.cos(elevation) * np.sin(azimuth), np.sin(elevation), ])
def _tour(x, make_nodes=False): """Evaluate a Cartesian E-E-M-E-E-67P tour with one DSM per leg.""" x = np.asarray(x, dtype=float)
final_epoch = 0.5 * sum(_window(problem["end"])) dates = np.asarray(x[0:5], dtype=float) initial_vinf = np.asarray(x[5:8], dtype=float) fractions = np.asarray(x[8:13], dtype=float) rp_factors = np.asarray(x[13:17], dtype=float) flyby_angles = np.asarray(x[17:21], dtype=float)
times = dates.tolist() + [final_epoch]
minimum_leg_times = (250.0, 500.0, 150.0, 500.0, 500.0) for index, minimum in enumerate(minimum_leg_times): if times[index + 1] - times[index] < minimum: return np.inf, None
if np.any(fractions <= 0.005) or np.any(fractions >= 0.995): return np.inf, None
try: states = [_state(problem["start"], times[0])] states.extend(
Rosetta: Python source (lines 121–240) (continued)
234 _planet(pid, times[index + 1]) 235 for index, pid in enumerate(SEQUENCE) 236 ) 237 states.append(_state(problem["end"], final_epoch)) 238 except Exception: 239 return np.inf, None 240
Rosetta: Python source (lines 241–360)
outgoing = states[0][1] + initial_vinf total = _boundary_cost( outgoing, states[0][1], problem["start"] )
nodes = [] if make_nodes: nodes.append({ "type": "start", "time": float(times[0]), "planet_id": str(problem["start"].get("planet_id", "0")) "r": states[0][0], "v_before": states[0][1], "v_after": outgoing, })
for leg in range(5): t0 = float(times[leg]) t1 = float(times[leg + 1]) dsm_epoch = t0 + float(fractions[leg]) * (t1 - t0)
if not t0 < dsm_epoch < t1: return np.inf, None
try: dsm_r, velocity_before = tools.propagate_two_body( states[leg][0], outgoing, (dsm_epoch - t0) * DAY, MU, ) dsm_r = np.asarray(dsm_r, dtype=float) velocity_before = np.asarray(velocity_before, dtype=float) except Exception: return np.inf, None
options = _lambert_options( dsm_r, states[leg + 1][0], t1 - dsm_epoch, max_revolutions=4 if leg == 4 else 0, ) if not options: return np.inf, None
selected = None selected_increment = np.inf
for velocity_after, arrival_velocity in options: dsm_cost = float(np.linalg.norm( velocity_after - velocity_before ))
if leg == 4: terminal_cost = _boundary_cost( arrival_velocity, states[-1][1], problem["end"], ) increment = dsm_cost + terminal_cost
Rosetta: Python source (lines 241–360) (continued)
candidate = ( velocity_after, arrival_velocity, None, terminal_cost, ) else: pid = SEQUENCE[leg] periapsis = ( float(problem["planet_radius"][pid]) * float(rp_factors[leg]) )
if periapsis < _minimum_rp(pid) * 1.000001: continue
try: next_outgoing = np.asarray( tools.gravity_assist( arrival_velocity, states[leg + 1][1], float(problem["planet_mu"][pid]), periapsis, float(flyby_angles[leg]), ), dtype=float, ) except Exception: continue
if not np.all(np.isfinite(next_outgoing)): continue
increment = dsm_cost candidate = ( velocity_after, arrival_velocity, next_outgoing, 0.0, )
if increment < selected_increment: selected_increment = increment selected = candidate
if selected is None: return np.inf, None
( velocity_after, arrival_velocity, next_outgoing, transition_cost, ) = selected
total += float(np.linalg.norm( velocity_after - velocity_before ))
if make_nodes:
Rosetta: Python source (lines 361–480)
nodes.append({ "type": "DSM", "time": float(dsm_epoch), "planet_id": "0", "r": dsm_r, "v_before": velocity_before, "v_after": velocity_after, )
Rosetta: Python source (lines 361–480) (continued)
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
if leg < 4: total += float(transition_cost) if make_nodes: nodes.append({ "type": "GA", "time": float(t1), "planet_id": SEQUENCE[leg], "r": states[leg + 1][0], "v_before": arrival_velocity, "v_after": next_outgoing, }) outgoing = next_outgoing else: total += float(transition_cost) if make_nodes: nodes.append({ "type": "end", "time": float(t1), "planet_id": str(problem["end"].get("planet_id", "0"), "r": states[-1][0], "v_before": arrival_velocity, "v_after": states[-1][1], })
return float(total), nodes
def _verify_nodes(nodes): """Verify generated gravity assists with the evaluator-compatible primitive.""" for node in nodes: if node["type"] != "GA": continue
pid = str(node["planet_id"]) minimum = _minimum_rp(pid)
try: _, planet_velocity = _planet(pid, node["time"]) periapsis, mismatch, feasible = tools.powered_flyby( np.asarray(node["v_before"], dtype=float), np.asarray(node["v_after"], dtype=float), planet_velocity, float(problem["planet_mu"][pid]), minimum, )
if not bool(feasible): return False
if not np.isfinite(float(periapsis)): return False
if not np.isfinite(float(mismatch)): return False
if float(periapsis) < minimum - 1.0e-3: return False
if abs(float(mismatch)) > 1.0e-6: return False
except Exception: return False
return True
def _summary_seed(dates, dsms, altitudes, initial_vinf, angles): """Build a Cartesian chromosome from observed encounter and DSM epochs.""" final_epoch = 0.5 * sum(_window(problem["end"])) dates = np.asarray(dates, dtype=float) boundaries = np.concatenate((dates, [final_epoch])) dsms = np.asarray(dsms, dtype=float)
fractions = (
Rosetta: Python source (lines 361–480) (continued)
440 (dsms - boundaries[: -1]) 441 / (boundaries[1:] - boundaries[: -1]) 442 ) 443 444 rp_factors = np.array([ ( float(problem["planet_radius"][pid]) + float(altitudes[index]) ) / float(problem["planet_radius"][pid]) for index, pid in enumerate(SEQUENCE) ]) 445 446 return np.concatenate(( dates, np.asarray(initial_vinf, dtype=float), fractions, rp_factors, np.asarray(angles, dtype=float), )) 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 def _seeds_and_bounds(): """Create focused bounds and structured seeds around proven Rosetta basins.""" start_lo, start_hi = _window(problem["start"]) best_dates = np.array([ 53086.8, 53452.0, 54163.1, 54420.7, 55148.5 ]) best_dsms = np.array([ 53273.0, 54029.2, 54195.8, 54893.1, 55884.4 ]) best_altitudes = np.array([ 7897.0, 300.0, 14311.0, 300.0 ]) supporting_data = [ ( [53083.1, 53448.4, 54162.2, 54420.7, 55148.1], [53264.9, 54024.5, 54297.6, 54892.8, 55880.9], [11394.0, 300.0, 14440.0, 300.0], ), ] )
Rosetta: Python source (lines 481–600)
481 ( [53090.6, 53455.9, 54163.5, 54420.0, 55150.5], [53349.4, 54030.8, 54204.6, 54492.9, 55805.9], [11575.0, 300.0, 13525.0, 730.0], ), 486 ( [53093.2, 53458.5, 54163.8, 54419.6, 55150.1], [53379.2, 54031.4, 54258.3, 54550.0, 55820.7], [11791.0, 300.0, 13858.0, 308.0], ), 491 ( [53093.2, 53458.4, 54165.0, 54420.4, 55150.9], [53312.4, 54024.9, 54224.7, 54498.2, 55823.2], [10911.0, 300.0, 13838.0, 302.0], ), 496 ] 497 498 angles = np.array([ -1.253888118, 1.787602330, -1.594671417, -1.977325495, ]) 503 504 505 speed = 4.478444171 506 u = 0.731698680
Rosetta: Python source (lines 481–600) (continued)
v = 0.878289696
datasets = [ (best_dates, best_dsms, best_altitudes), *supporting_data, ]
seeds = []
for dates, dsms, altitudes in datasets: epoch = float(dates[0]) directions = ( _local_vinf(epoch, speed, u, v, False), _local_vinf(epoch, speed, u, v, True), _inertial_vinf(speed, u, v, False), _inertial_vinf(speed, u, v, True), _angular_vinf(speed, u, v), )
for direction in directions: seeds.append(_summary_seed( dates, dsms, altitudes, direction, angles ))
published_dates = np.array([ 53086.802723, 53452.0450361, 54159.7996805, 54417.1235321, 55147.6072557, ])
published_fractions = np.array([ 0.512067000, 0.810371727, 0.275887800, 0.119192979, 0.436742230, ])
published_radii = np.array([ 2.657626174, 1.050000000, 3.197806169, 1.056221792, ])
for direction in ( _local_vinf(published_dates[0], speed, u, v, False), _local_vinf(published_dates[0], speed, u, v, True), _inertial_vinf(speed, u, v, False), _inertial_vinf(speed, u, v, True), _angular_vinf(speed, u, v), ): seeds.append(np.concatenate(( published_dates, direction, published_fractions, published_radii, angles, ))
date_centers = np.vstack([ best_dates, *[np.asarray(item[0], dtype=float) for item in supporting_data], published_dates, ])
date_margins = np.array([0.0, 45.0, 55.0, 60.0, 75.0])
bounds = [(max(start_lo, 53072.0), min(start_hi, 53103.0))]
for index in range(1, 5): bounds.append(( float(np.min(date_centers[:, index]) - date_margins[index]), float(np.max(date_centers[:, index]) + date_margins[index]), ))
Rosetta: Python source (lines 481–600) (continued)
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600
bounds.extend([(-8.0, 8.0)] * 3) bounds.extend([ (0.010, 0.990)] * 5)
for pid in SEQUENCE: minimum_factor = ( _minimum_rp(pid) / float(problem["planet_radius"][pid]) ) bounds.append((minimum_factor * 1.000001, 6.0))
bounds.extend([(-np.pi, np.pi)] * 4)
lower = np.asarray([lo for lo, _ in bounds], dtype=float) upper = np.asarray([hi for _, hi in bounds], dtype=float) seeds = [ np.clip(np.asarray(seed, dtype=float), lower, upper) for seed in seeds ]
return seeds, bounds
Rosetta: Python source (lines 601–720)
def _optimize_tour(): """Run seeded evolution followed by full and reduced normalized polishing.""" seeds, bounds = _seeds_and_bounds()
lower = np.asarray([lo for lo, _ in bounds], dtype=float) upper = np.asarray([hi for _, hi in bounds], dtype=float) span = upper - lower dimension = len(bounds)
started = time.monotonic() timeout = float(problem.get("timeout_seconds", 300.0)) global_deadline = started + max( 70.0, min(175.0, timeout - 80.0) ) final_deadline = started + max( 100.0, min(270.0, timeout - 12.0) )
best_value = np.inf best_x = seeds[0].copy() archive = []
def save(value, x): """Store the global winner and several geometrically distinct elites.""" nonlocal best_value, best_x
if not np.isfinite(value): return
x = np.asarray(x, dtype=float).copy() y = (x - lower) / span
if value < best_value: best_value = float(value) best_x = x.copy()
for index, (old_value, old_x) in enumerate(archive): old_y = (old_x - lower) / span if np.linalg.norm(y - old_y) < 0.012: if value < old_value: archive[index] = (float(value), x) archive.sort(key=lambda item: item[0]) return
archive.append((float(value), x))
Rosetta: Python source (lines 601–720) (continued) 646 archive.sort(key=lambda item: item[0]) 647 del archive[14:] 648 649 def objective(x): 650 """Evaluate one physical chromosome and update the elite archive.""" 651 value, _ = _tour(x, make_nodes=False) 652 if np.isfinite(value): 653 save(value, x) 654 return float(value) 655 return 1.0e6 656 657 for seed in seeds: 658 objective(seed) 659 660 rng = np.random.default_rng(SEED) 661 population_size = 25 * dimension 662 population = np.empty((population_size, dimension), dtype=float) 663 664 copied = min(len(seeds), population_size) 665 for row in range(copied): 666 population[row] = seeds[row] 667 668 scales = np.array( 669 [0.025] * 5 670 + [0.045] * 3 671 + [0.055] * 5 672 + [0.060] * 4 673 + [0.080] * 4, 674 dtype=float, 675 ) 676 677 for row in range(copied, population_size): 678 if row < int(0.96 * population_size): 679 if row % 3: 680 source = row % min(5, len(seeds)) 681 else: 682 source = row % len(seeds) 683 684 candidate = seeds[source].copy() 685 candidate += rng.normal(0.0, scales * span) 686 population[row] = np.clip(candidate, lower, upper) 687 else: 688 population[row] = rng.uniform(lower, upper) 689 690 def stop_global(xk, convergence): 691 """Stop evolution in time to preserve a deterministic polish budget.""" 692 return time.monotonic() >= global_deadline 693 694 de_result = None 695 try: 696 de_result = differential_evolution( 697 objective, 698 bounds, 699 init=population, 700 seed=SEED, 701 maxiter=1200, 702 popsize=25, 703 tol=1.0e-10, 704 atol=1.0e-12, 705 mutation=(0.30, 1.10), 706 recombination=0.94, 707 polish=False, 708 updating="immediate", 709 workers=1, 710 callback=stop_global, 711 ) 712 objective(de_result.x) 713 except Exception: 714 pass 715 716 unit_bounds = [(0.0, 1.0)] * dimension 717 99
Rosetta: Python source (lines 601–720) (continued)
718 def normalized_objective(y): """Evaluate the tour after mapping unit coordinates to physical bounds.""" y = np.clip(np.asarray(y, dtype=float), 0.0, 1.0)
Rosetta: Python source (lines 721–840)
return objective(lower + span * y)
starts = [best_x.copy()] if de_result is not None: starts.append(np.asarray(de_result.x, dtype=float)) starts.extend(x for _, x in archive[:5]) starts.extend(seeds[:3])
unique = [] for candidate in starts: y = (candidate - lower) / span if all( np.linalg.norm(y - (old - lower) / span) > 1.0e-6 for old in unique ): unique.append(candidate)
for candidate in unique[:4]: if time.monotonic() >= final_deadline - 25.0: break
try: y0 = np.clip((candidate - lower) / span, 0.0, 1.0) result = minimize( normalized_objective, y0, method="Powell", bounds=unit_bounds, options={ "maxiter": 800, "maxfev": 10500, "xtol": 5.0e-9, "ftol": 2.0e-13, }, ) normalized_objective(result.x) except Exception: pass
Timing, departure velocity, the Mars/final-Earth turns, and the terminal
DSM dominate the residual cost in the demonstrated optimum.
active = np.array([ 0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 14, 16, 17, 18, 19, 20, ], dtype=int)
if time.monotonic() < final_deadline - 8.0: ybase = np.clip((best_x - lower) / span, 0.0, 1.0)
def reduced_objective(z): """Polish the coordinates controlling the nonzero trajectory burns.""" y = ybase.copy() y[active] = np.clip(np.asarray(z, dtype=float), 0.0, 1.0) return normalized_objective(y)
try: result = minimize( reduced_objective, ybase[active], method="Powell", bounds=[(0.0, 1.0)] * len(active), ) end
Rosetta: Python source (lines 721–840) (continued)
options={ "maxiter": 500, "maxfev": 6000, "xtol": 2.0e-9, "ftol": 8.0e-14, }, reduced_objective(result.x) except Exception: pass
value, nodes = _tour(best_x, make_nodes=True) if nodes is None or not np.isfinite(value): return np.inf, None if not _verify_nodes(nodes): return np.inf, None
return float(value), nodes
def _direct_fallback(): """Construct a valid direct multi-revolution Earth-to-67P fallback.""" start_lo, start_hi = _window(problem["start"]) final_epoch = 0.5 * sum(_window(problem["end"])) final_r, final_v = _state(problem["end"], final_epoch)
best_cost = np.inf best_nodes = None
for launch in np.linspace(start_lo, start_hi, 17): initial_r, initial_v = _state(problem["start"], launch)
for departure, arrival in _lambert_options( initial_r, final_r, final_epoch - launch, max_revolutions=4, ): cost = ( _boundary_cost( departure, initial_v, problem["start"] ) + _boundary_cost( arrival, final_v, problem["end"] ) )
if cost < best_cost: best_cost = float(cost) best_nodes = [ { "type": "start", "time": float(launch), "planet_id": str( problem["start"].get("planet_id", "0") ), } ) } )
Rosetta: Python source (lines 841–925)
r": initial_r, v_before": initial_v, v_after": departure, }, { "type": "end", "time": float(final_epoch), "planet_id": str( problem["end"].get("planet_id", "0") ), "r": final_r, }
Rosetta: Python source (lines 841–925) (continued)
"v_before": arrival, "v_after": final_v, }, ]
return float(best_cost), best_nodes
def _format(nodes): """Convert NumPy-backed trajectory nodes to the required plain schema.""" return [ { "type": str(node["type]), "time": float(node["time]), "planet_id": str(node["planet_id]), "r": np.asarray(node["r"], dtype=float).tolist(), "v_before": np.asarray( node["v_before"], dtype=float ).tolist(), "v_after": np.asarray( node["v_after"], dtype=float ).tolist(), } for node in nodes ]
def run_code(): """Return the best valid direct or E-E-M-E-E-67P trajectory found.""" try: record.event("focused_cartesian_rosetta_mga_search") except Exception: pass
fallback_cost, fallback_nodes = _direct_fallback() best_cost = fallback_cost best_nodes = fallback_nodes best_sequence = "direct-multirevolution-Lambert"
allowed = set(map(str, problem.get("allowed_GA_planets", []))) compatible = ( {"3", "4").issubset(allowed) and int(problem.get("max_GA", 0)) >= 4 and int(problem.get("max_DSM", 0)) >= 5 and int(problem.get("max_nodes", 0)) >= 11 )
if compatible: try: tour_cost, tour_nodes = _optimize_tour() if ( tour_nodes is not None and np.isfinite(tour_cost) and tour_cost < best_cost ): best_cost = float(tour_cost) best_nodes = tour_nodes best_sequence = "E-E-M-E-E-67P" except Exception: pass
if best_nodes is None: raise RuntimeError("No valid Rosetta trajectory was constructed")
try: record.set("best_sequence", best_sequence) record.set("final_cost", float(best_cost)) record.set("final_nodes", len(best_nodes)) except Exception: pass
return _format(best_nodes)
Rosetta: Python source (lines 841–925) (continued)
924 925 # EVOLVE-BLOCK-END
K.3. Voyager 2: constrained refinement improves the existing tour
The program retains the Earth–Jupiter–Saturn–Uranus–Neptune tour without deep-space maneuvers, first fitting unpowered flybys by least squares and then minimizing boundary with SLSQP. The selected trajectory arrives at the upper bound of the allowed window and reduces total from 3.430214 to 3.430206 km/s. The small gain reflects tighter numerical refinement of the same tour.
Voyager 2: Python source (lines 1–120)
""Deterministic constrained epoch optimization for the Voyager-2 grand tour."" import sys from pathlib import Path
import numpy as np from scipy.optimize import minimize, least_squares
_FAMILY_DIR = Path(file).resolve().parent.parent if str(_FAMILY_DIR) not in sys.path: sys.path.insert(0, str(_FAMILY_DIR))
from problem_config import load_problem_for_candidate from tools_wrapper import Tools
problem = load_problem_for_candidate(file) tools = Tools()
EVOLVE-BLOCK-START
DAY = 86400.0 MIN_TOF = 5.0 INF = 1.0e30 SEED = 20260916 CACHE = {}
def _window(spec): """Return the legal lower and upper MJD values for a boundary specification.""" t = spec["time"] if t["kind"] == "window": return float(t["lo"]), float(t["hi"]) value = t.get("value", t.get("mjd")) return float(value), float(value)
def _state(pid, epoch, boundary=None): """Return the heliocentric state from ephemeris or a configured fixed boundary.""" pid = str(pid)
if pid == "0": if boundary is not None: spec = problem[boundary] if "state_r" in spec and "state_v" in spec: return ( np.asarray(spec["state_r"], float), np.asarray(spec["state_v"], float), )
for name in ("start", "end"): spec = problem[name] if "state_r" in spec and "state_v" in spec: return ( np.asarray(spec["state_r"], float), np.asarray(spec["state_v"], float), )
Voyager 2: Python source (lines 1–120) (continued)
return np.zeros(3), np.zeros(3)
key = (pid, round(float(epoch), 8)) if key not in CACHE: r, v = tools.ephem(pid, float(epoch)) CACHE[key] = np.asarray(r, float), np.asarray(v, float) return CACHE[key]
def _piecewise(value, breakpoints): """Evaluate a boundary launcher curve by linear interpolation and endpoint extension.""" pts = sorted((float(x), float(y)) for x, y in breakpoints) x = float(value)
if x <= pts[0][0]: return pts[0][1] if x >= pts[-1][0]: return pts[-1][1]
for (x0, y0), (x1, y1) in zip(pts[-1], pts[1:]): if x <= x1: if x1 == x0: return float(y1) f = (x - x0) / (x1 - x0) return float(y0 + f * (y1 - y0))
return float(pts[-1][1])
def _periapsis_cost(vinf, spec, pid): """Compute the configured impulsive burn at planetary periapsis.""" mu = float(problem["planet_mu"][str(pid)]) radius = float(problem["planet_radius"][str(pid)]) rp = radius * (1.0 + float(spec["h_factor"])) period = float(spec["T_days"]) * DAY
correction = (4.0 * np.pi2 * mu2 / period**2) ** (1.0 / 3.0) escape = np.sqrt(float(vinf) ** 2 + 2.0 * mu / rp) parking = np.sqrt(max(2.0 * mu / rp - correction, 0.0)) return float(escape - parking)
def _boundary_cost(v_before, v_after, epoch, spec, is_start): """Evaluate the exact start or end boundary delta-v model.""" if spec["type"] == "piecewise_linear": jump = np.linalg.norm(np.asarray(v_after) - np.asarray(v_before)) return _piecewise(jump, spec["breakpoints"])
pid = str(spec.get("planet_id", "0")) _, vp = _state(pid, epoch, "start" if is_start else "end") velocity = np.asarray(v_after if is_start else v_before, float) vinf = np.linalg.norm(velocity - vp) return _periapsis_cost(vinf, spec, pid)
def _sequence(): """Select the longest admissible Voyager-style outer-planet flyby sequence.""" allowed = {str(x) for x in problem.get("allowed_GA_planets", [])} maximum = int(problem.get("max_GA", 0)) end_pid = str(problem["end"].get("planet_id", "8"))
candidates = [ ("5", "6", "7"), ]
Voyager 2: Python source (lines 121–240)
121 ("5", "6"), 122 ("5", "7"), 123 ("6", "7"), 124 ("5", ),
Voyager 2: Python source (lines 121–240) (continued)
("6", ), ("7", ), (), ]
for sequence in candidates: if len(sequence) <= maximum and all( p in allowed and p != end_pid for p in sequence ): return sequence
return ()
def _historical_times(sequence): """Construct the canonical Voyager encounter epochs clipped to legal windows.""" slo, shi = _window(problem["start"]) elo, ehi = _window(problem["end"])
centers = { "5": 44126.5, "6": 44985.6, "7": 46730.9, }
t0 = float(np.clip(43389.2, slo, shi)) tf = float(np.clip(48163.0, elo, ehi))
middle = [ float(np.clip(centers[p], t0 + MIN_TOF, tf - MIN_TOF)) for p in sequence ]
result = np.asarray([t0] + middle + [tf], float) if np.any(np.diff(result) <= MIN_TOF): result = np.linspace(t0, tf, len(sequence) + 2)
return result
def _bounds(sequence): """Build broad legal encounter-epoch bounds around the historical tour.""" slo, shi = _window(problem["start"]) elo, ehi = _window(problem["end"])
centers = { "5": 44126.5, "6": 44985.6, "7": 46730.9, }
bounds = [(slo, shi)] for pid in sequence: c = centers[pid] bounds.append(( max(slo + MIN_TOF, c - 3000.0), min(ehi - MIN_TOF, c + 3000.0), )) bounds.append((elo, ehi)) return bounds
def _arcs(sequence, times, lowpath=True): """Compute planetary states and Lambert endpoint velocities for every tour leg.""" times = np.asarray(times, float)
start_pid = str(problem["start"].get("planet_id", "0")) end_pid = str(problem["end"].get("planet_id", "0")) pids = [start_pid] + list(sequence) + [end_pid]
states = [] for i, pid in enumerate(pids):
Voyager 2: Python source (lines 121–240) (continued)
boundary = None if i == 0: boundary = "start" elif i == len(pids) - 1: boundary = "end" states.append(_state(pid, times[i], boundary))
departures = [] arrivals = []
for i in range(len(pids) - 1): tof = float(times[i + 1] - times[i]) if tof <= MIN_TOF: raise ValueError("invalid transfer time")
va, vb = tools.lambert( states[i][0], states[i + 1][0], tof * DAY, float(problem["mu_sun"]), prograde=True, lowpath=lowpath, M=0, )
departures.append(np.asarray(va, float)) arrivals.append(np.asarray(vb, float))
return pids, states, departures, arrivals
def _flyby_residual(sequence, times, lowpath=True): """Return incoming-minus-outgoing hyperbolic excess speed at each flyby.""" try: _, _, departures, arrivals = _arcs(sequence, times, lowpath) residual = []
for i, pid in enumerate(sequence): _, vp = _state(pid, times[i + 1]) vin = np.linalg.norm(arrivals[i] - vp) vout = np.linalg.norm(departures[i + 1] - vp) residual.append(vin - vout)
return np.asarray(residual, float) except Exception:
Voyager 2: Python source (lines 241–360)
return np.ones(len(sequence), float) * 1.0e6
def _evaluate(sequence, times, build=False, lowpath=True): """Evaluate exact boundary and powered-flyby cost and optionally construct nodes.""" times = np.asarray(times, float)
if len(times) != len(sequence) + 2 or not np.all(np.isfinite(times)): return (INF, None) if build else INF
slo, shi = _window(problem["start"]) elo, ehi = _window(problem["end"])
if not slo <= times[0] <= shi or not elo <= times[-1] <= ehi: return (INF, None) if build else INF
if np.any(np.diff(times) <= MIN_TOF): return (INF, None) if build else INF
try: pids, states, departures, arrivals = _arcs(sequence, times, lowpath)
total = _boundary_cost( states[0][1], )
Voyager 2: Python source (lines 241–360) (continued)
264 departures[0], 265 times[0], 266 problem["start"], 267 True, 268 269 270 for i, pid in enumerate(sequence): 271 _, vp = _state(pid, times[i + 1]) 272 mu = float(problem["planet_mu"][pid]) 273 radius = float(problem["planet_radius"][pid]) 274 altitude = float( problem.get("flyby", {}) .get("min_altitude_km", {}) .get(pid, 200.0) ) 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
if not feasible or not np.isfinite(dv): return (INF, None) if build else INF
total += float(dv)
total += _boundary_cost( arrivals[-1], states[-1][1], times[-1], problem["end"], False, )
except Exception: return (INF, None) if build else INF
if not build: return float(total)
nodes = [{ "type": "start", "time": float(times[0]), "planet_id": pids[0], "r": states[0][0], "v_before": states[0][1], "v_after": departures[0], }]
for i, pid in enumerate(sequence): nodes.append({ "type": "GA", "time": float(times[i + 1]), "planet_id": str(pid), "r": states[i + 1][0], "v_before": arrivals[i], "v_after": departures[i + 1], })
nodes.append({ "type": "end", "time": float(times[-1]), "planet_id": pids[-1], "r": states[-1][0], "v_before": arrivals[-1], "v_after": states[-1][1], })
return float(total), nodes
Voyager 2: Python source (lines 241–360) (continued)
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
def _boundary_objective(sequence, times, lowpath=True): """Return only launch and arrival cost for constrained manifold optimization.""" try: _, states, departures, arrivals = _arcs(sequence, times, lowpath) return _boundary_cost( states[0][1], departures[0], times[0], problem["start"], True, ) + _boundary_cost( arrivals[-1], states[-1][1], times[-1], problem["end"], False, ) except Exception: return INF
def _project_seed(sequence, seed, bounds, lowpath=True): """Project a trial epoch vector toward equal-speed flyby compatibility."""
Voyager 2: Python source (lines 361–480)
if not sequence: return np.asarray(seed, float)
lo = np.asarray([b[0] for b in bounds], float) hi = np.asarray([b[1] for b in bounds], float)
def residual(x): return _flyby_residual(sequence, x, lowpath)
try: result = least_squares( residual, np.asarray(seed, float), bounds=(lo, hi), max_nfev=250, xtol=1e-10, ftol=1e-10, gtol=1e-10, ) return np.asarray(result.x, float)
except Exception: return np.asarray(seed, float)
def _polish(sequence, seed, bounds, lowpath=True): """Minimize boundary delta-v subject to exact unpowered flyby constraints.""" if not sequence: return np.asarray(seed, float)
def objective(x): """Evaluate the launch plus arrival boundary cost.""" return _boundary_objective(sequence, x, lowpath)
def constraint(x): """Enforce equal incoming and outgoing hyperbolic excess speeds.""" return _flyby_residual(sequence, x, lowpath)
try: result = minimize( objective, np.asarray(seed, float), method="SLSQP", )
Voyager 2: Python source (lines 361–480) (continued)
403 bounds=bounds, 404 constraints={ "type": "eq", "fun": constraint}, 405 options={ 406 "maxiter": 900, 407 "ftol": 1e-12, 408 "disp": False, 409 }, 410 411 return np.asarray(result.x, float) 412 except Exception: 413 return np.asarray(seed, float) 414 415 416 def _seeds(sequence, bounds): 417 """Generate deterministic historical, corner, and distributed epoch seeds.""" 418 rng = np.random.default_rng(SEED) 419 x0 = _historical_times(sequence) 420 result = [x0] 421 422 # Perturb each historical epoch at several deterministic scales. 423 for scale in (2.0, 10.0, 35.0, 100.0, 280.0, 700.0): 424 for _ in range(5): 425 x = x0 + rng.normal(0.0, scale, len(x0)) 426 x = np.asarray([ 427 np.clip(x[i], bounds[i][0], bounds[i][1]) 428 for i in range(len(x)) 429 ]) 430 if np.all(np.diff(x) > MIN_TOF): 431 result.append(x) 432 433 # Explicit launch/arrival window combinations are useful when windows are broad. 434 for a in (0.0, 0.5, 1.0): 435 for b in (0.0, 0.5, 1.0): 436 x = x0.copy() 437 x[0] = bounds[0][0] + a * (bounds[0][1] - bounds[0][0]) 438 x[-1] = bounds[-1][0] + b * (bounds[-1][1] - bounds[-1][0]) 439 if np.all(np.diff(x) > MIN_TOF): 440 result.append(x) 441 442 # Distributed interior samples retain independently sampled boundaries. 443 for _ in range(30): 444 x = np.asarray([rng.uniform(lo, hi) for lo, hi in bounds]) 445 x[1:-1] = np.sort(x[1:-1]) 446 if np.all(np.diff(x) > MIN_TOF): 447 result.append(x) 448 449 return result 450 451 452 def _format(nodes): 453 """Convert all trajectory fields to evaluator-compatible scalar and list types.""" 454 output = [] 455 456 for node in nodes: 457 q = dict(node) 458 q["type"] = str(q["type"]) 459 q["time"] = float(q["time"]) 460 q["planet_id"] = str(q["planet_id"]) 461 462 for key in ("r", "v_before", "v_after"): 463 q[key] = np.asarray(q[key], float).tolist() 464 465 output.append(q) 466 467 return output 468 469 470 def run_code(): 471 """Search deterministic flyby manifolds and return the lowest-cost valid tour.""" 472 sequence = _sequence() 473 bounds = _bounds(sequence) 474 best_value, best_nodes = _evaluate(
Voyager 2: Python source (lines 361–480) (continued)
475 sequence, 476 _historical_times(sequence), 477 build=True, 478 lowpath=True, 479 ) 480
Voyager 2: Python source (lines 481–518)
The canonical low-path branch is expected for Voyager 2. A secondary
branch is sampled only as a robustness measure and can never replace a
better valid canonical solution.
branches = [True, False]
for lowpath in branches: for seed in _seeds(sequence, bounds): projected = _project_seed(sequence, seed, bounds, lowpath) polished = _polish(sequence, projected, bounds, lowpath)
value, nodes = _evaluate( sequence, polished, build=True, lowpath=lowpath, )
if nodes is not None and value < best_value: best_value = value best_nodes = nodes
if best_nodes is None: return []
if len(best_nodes) > int(problem.get("max_nodes", 999)): return []
try: record.event("voyager_deterministic_manifold_multistart") record.set("final_nodes", len(best_nodes)) record.set("final_objective", float(best_value)) record.set("sequence", "E->J->S->U->N") except Exception: pass
return _format(best_nodes)
EVOLVE-BLOCK-END
K.4. Denoising: mixing diffusion operators improves average accuracy
The program builds one MAGIC graph and mixes its ordinary diffusion output with a self-loop-free version using cell-specific weights, followed by shrinkage and gene calibration. Its held-out mean score increases from 0.722690 to 0.722906. The gain on PBMC (0.7116 vs. 0.7090) is partly offset by a loss on Tabula (0.7342 vs. 0.7364).
Denoising: Python source (lines 1–120)
EVOLVE-BLOCK-START
import numpy as np import scipy.sparse as sp import graphtools import scprep
def _as_counts(X): """Return X as a finite dense nonnegative floating-point matrix.""" x = np.asarray(scprep.utils.toarray(X), dtype=np.float64) return np.maximum(np.nan_to_num(x, nan=0.0, posinf=0.0, neginf=0.0), 0.0)
Denoising: Python source (lines 1–120) (continued)
def _backproject(graph, values, approximate): """Map graph coordinates back to the original gene space.""" y = scprep.utils.toarray(values) if approximate: y = graph.inverse_transform(y, columns=None) return np.asarray(y, dtype=np.float64)
def _diffuse(op, values, steps): """Apply a sparse diffusion operator repeatedly.""" y = values for _ in range(int(steps)): y = op.dot(y) return np.asarray(scprep.utils.toarray(y), dtype=np.float64)
def _leave_one_out_operator(op): """Remove graph self-loops and renormalize rows for noise-independent smoothing.""" p = op.tocsr(copy=True) if sp.issparse(op) else sp.csr_matrix(op) p.setdiag(0.0) p.remove_zeros() rows = np.asarray(p.sum(axis=1)).ravel() inv = np.zeros_like(rows, dtype=np.float64) good = rows > 1e-12 inv[good] = 1.0 / rows[good] q = sp.diags(inv).dot(p).tocsr()
Extremely degenerate rows should retain a valid stochastic transition.
bad = np.flatnonzero(~good)
if bad.size:
q = q.tolil()
q[bad, bad] = 1.0
q = q.tocsr()
return q
def _gene_calibration(prediction, observed, strength): """Correct predicted gene frequencies conservatively toward training frequencies.""" if strength <= 0: return prediction eps = 1e-12 p = np.maximum(prediction.sum(axis=0), 0.0) q = np.maximum(observed.sum(axis=0), 0.0) p / = max(float(p.sum()) , eps) q / = max(float(q.sum()) , eps) ratio = np.clip((q + eps) / (p + eps), 0.88, 1.14) return prediction * np.power(ratio[None, :], float(strength))
def _poisson_shrink(prediction, gene_mean, strength): """Apply smooth abundance-dependent shrinkage to fractional predictions.""" if strength <= 0: return prediction rarity = ( 0.76 + 1.18 / (gene_mean + 1.0) + 0.20 / np.sqrt(gene_mean + 0.15) ) rarity = np.clip(rarity, 0.76, 2.55) threshold = float(strength) * rarity[None, :] p = np.maximum(prediction, 0.0) return p * p / (p + threshold)
def magic_denoise( X, knn=5, t=3, n_pca=100, solver="approximate", decay=1, )
Denoising: Python source (lines 1–120) (continued)
knn_max=None, random_state=None, n_jobs=1, verbose=False, shrink=0.09, gene_calibration=0.25, raw_anchor=0.10, positive_anchor=0.02, log_mix=0.20, loo_mix=0.55, **kwargs, ): """Denoise counts with square-root MAGIC and leave-one-out diffusion.
A graph is built from library-normalized square-root counts. Diffusion estimates are formed from both the usual operator and a self-loop-free, row-renormalized operator; their mixture reduces self-referential overfitting while retaining the local structure that benefits log-space error. Estimates are transformed back to count scale, shrunk for rare genes, calibrated globally, and weakly blended with log-normalized diffusion. """ x = _as_counts(X) if x.ndim != 2: raise ValueError("X must be a two-dimensional count matrix")
n_cells, n_genes = x.shape if n_cells <= 1 or n_genes == 0: return x.copy()
k = min(max(int(knn), 1), n_cells - 1) if knn_max is None: kmax = max(k + 1, 3 * k) else: kmax = int(knn_max) kmax = min(max(k, kmax), n_cells - 1)
Denoising: Python source (lines 121–240)
steps = max(1, int(t)) root = np.sqrt(x) root_norm, root_lib = scprep.normalize.library_size_normalize( root, rescale=1, return_library_size=True ) root_norm = _as_counts(root_norm) root_lib = np.maximum( np.asarray(root_lib, dtype=np.float64).reshape(-1), 1e-10 )
if n_pca is None or int(n_pca) <= 0: pca_dim = None else: pca_dim = min(int(n_pca), n_genes, max(1, n_cells - 1))
graph = graphtools.Graph( root_norm, n_pca=pca_dim, knn=k, knn_max=kmax, decay=decay, thresh=1e-4, random_state=random_state, n_jobs=n_jobs, verbose=0, )
approximate = str(solver).lower() == "approximate" base = graph.data_nu if approximate else graph.data normal_op = graph.diff_op
Denoising: Python source (lines 121–240) (continued)
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
loo_op = _leave_one_out_operator(normal_op)
weights = np.arange(steps, 0, -1, dtype=np.float64) weights *= 0.88 / max(float(weights.sum()) , 1e-12)
normal = 0.12 * np.maximum( _backproject(graph, base, approximate), 0.0 )
loo = np.zeros_like(normal)
for i in range(steps): normal_state = _diffuse(normal_op, base, i + 1) loo_state = _diffuse(loo_op, base, i + 1) normal += weights[i] * np.maximum( _backproject(graph, normal_state, approximate), 0.0 ) loo += weights[i] * np.maximum( _backproject(graph, loo_state, approximate), 0.0 )
Low-capture cells benefit more from independent neighbors; higher-quality
cells retain somewhat more of the conventional MAGIC estimate.
median_lib = max(float(np.median(root_lib)), 1e-10) quality = np.clip(root_lib / median_lib, 0.25, 4.0) capture = quality / (1.0 + quality) loo_weight = np.clip( float(loo_mix) * (1.20 - 0.65 * capture), 0.20, 0.82, )
smooth = ( loo_weight[:, None] * loo + (1.0 - loo_weight[:, None]) * normal )
gene_mean = np.mean(x, axis=0) capture_anchor = np.clip( float(raw_anchor) * (0.40 + 0.60 * capture), 0.0, 0.18, )
gene_anchor = 0.72 + 0.55 * gene_mean / (gene_mean + 1.0) anchor = np.clip( capture_anchor[:, None] * gene_anchor[None, :], 0.0, 0.20, )
observed_stabilized = root_norm * root_norm * root_lib[:, None] smooth = (1.0 - anchor) * smooth + anchor * observed_stabilized
den = np.square(np.maximum(smooth, 0.0)) den *= root_lib[:, None] den = _poisson_shrink(den, gene_mean, max(float(shrink), 0.0)) den = _gene_calibration(den, x, float(gene_calibration))
Log-space diffusion is restricted by empirical gene support, preventing
rare genes from receiving many harmful sub-molecule predictions.
lm = np.clip(float(log_mix), 0.0, 0.24) if lm > 0: library = np.maximum(x.sum(axis=1, keepdims=True), 1e-10) log_x = np.log1p(x / library * 10000.0) log_smooth = 0.12 * log_x for i in range(steps): log_smooth += weights[i] * _diffuse( normal_op, log_x, i + 1 )
log_pred = np.exp1(np.maximum(log_smooth, 0.0)) total = np.maximum(den.sum(axis=1, keepdims=True), 1e-10) p = den / total q = log_pred / np.maximum(log_pred.sum(axis=1, keepdims=True), 1e-10)
Denoising: Python source (lines 121–240) (continued)
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
support = np.clip( 0.25 + 1.10 * gene_mean / (gene_mean + 0.35), 0.25, 1.0, ) mix = np.clip(lm * support[None, :], 0.0, 0.24) den = ((1.0 - mix) * p + mix * q) * total
Preserve a small amount of observed positive evidence, but do not
manufacture additional signal from zeros.
pa = np.clip(float(positive_anchor), 0.0, 0.08) if pa > 0: total = np.maximum(den.sum(axis=1, keepdims=True), 1e-10) observed_profile = x / np.maximum(x.sum(axis=1, keepdims=True), 1e-10) observed_profile *= total confidence = np.clip(
Denoising: Python source (lines 241–257)
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
pa * (0.55 + 0.75 * x / (x + 1.5)), 0.0, 0.055, ) den = np.where( x > 0, (1.0 - confidence) * den + confidence * observed_profile, den, )
return np.maximum( np.nan_to_num(den, nan=0.0, posinf=0.0, neginf=0.0), 0.0, )
EVOLVE-BLOCK-END
K.5. Domain Mixture: separate domain fits improve held-out prediction
The program fits a separate seven-parameter law for each of five domains, combining an exponential function of mixture contrasts with a log-share correction for the domain’s own data fraction. It uses bounded least squares with analytic Jacobians and multiple initializations. The resulting held-out is 0.997062, compared with 0.996922 for the reference.
Domain Mixture: Python source (lines 1–104)
EVOLVE-BLOCK-START
"" Scaling law discovery for LLM finetuning scenarios Initial program with a simple linear form that can be evolved "" import numpy as np
def scaling_law_func(data_points, params): """Predict each domain loss with a bounded additive exponential mixture law.""" X = np.atleast_2d(np.asarray(data_points, dtype=float)) p = np.asarray(params, dtype=float) if p.ndim == 1: if p.size != 35: raise ValueError("Expected 35 parameters.") p = p.reshape(5, 7) if p.shape != (5, 7) or X.ndim != 2 or X.shape[1] != 5: raise ValueError("Expected parameters (5,7) and data_points (N,5).")
contrasts = np.array([ [1., 1., 1., 1.], [-1., 1., 1., 1.], [0., -2., 1., 1.], [0., 0., -3., 1.], [0., 0., 0., -4.] ])
Domain Mixture: Python source (lines 1–104) (continued)
23 ] ) / np.sqrt(np.array([2., 6., 12., 20.])) 24 h = (X - .2) @ contrasts 25 z = -np.log(np.clip(X, 1e-8, 1.)) - np.log(5.) 26 out = np.empty((X.shape[0], 5)) 27 for j in range(5): 28 # The clipped exponent guarantees finite extrapolation at boundaries. 29 e = np.clip(p[j, 1] + h @ p[j, 2:6], -30., 30.) 30 out[:, j] = p[j, 0] + np.exp(e) + p[j, 6] * z[:, j] 31 return out 32 33 34 def fit_scaling_law(data_points, loss_values): 35 """Fit bounded exponential mixture laws using analytic Jacobians and multistart least squares. 36 """ 37 from scipy.optimize import least_squares 38 X = np.atleast_2d(np.asarray(data_points, dtype=float)) 39 y = np.asarray(loss_values, dtype=float) 40 if y.ndim == 1: 41 y = y[:, None] 42 if X.ndim != 2 or X.shape[1] != 5 or y.shape != (X.shape[0], 5): 43 raise ValueError("Expected X (N,5) and losses (N,5).") 44 45 contrasts = np.array([ 46 [1., 1., 1., 1.], [-1., 1., 1., 1.], 47 [0., -2., 1., 1.], [0., 0., -3., 1.], 48 [0., 0., 0., -4.] 49 ]) / np.sqrt(np.array([2., 6., 12., 20.])) 50 h = (X - .2) @ contrasts 51 z = -np.log(np.clip(X, 1e-8, 1.)) - np.log(5.) 52 53 lo = np.array([-5., -8., -15., -15., -15., -15., -4.]) 54 hi = np.array([5., 4., 15., 15., 15., 15., 4.]) 55 rng = np.random.default_rng(1729) 56 ans = np.zeros((5, 7)) 57 58 for j in range(5): 59 def residual(v): 60 e = np.clip(v[1] + h @ v[2:6], -30., 30.) 61 return v[0] + np.exp(e) + v[6] * z[:, j] - y[:, j] 62 63 def jacobian(v): 64 e = np.clip(v[1] + h @ v[2:6], -30., 30.) 65 q = np.exp(e) 66 J = np.empty((X.shape[0], 7)) 67 J[:, 0] = 1. 68 J[:, 1] = q 69 J[:, 2:6] = q[:, None] * h 70 J[:, 6] = z[:, j] 71 return J 72 73 scale = max(np.ptp(y[:, j]), .2) 74 base = np.array([ 75 np.min(y[:, j]) - .5, 76 np.log(scale), 0., 0., 0., 0., 0. 77 ]) 78 starts = [np.clip(base, lo, hi)] 79 80 # Deterministic perturbations improve basin coverage without 81 # materially increasing runtime for this small fitting problem. 82 for _ in range(3): 83 v = base.copy() 84 v[1:6] += rng.normal(0., 1.25, 5) 85 v[6] += rng.normal(0., .35) 86 starts.append(np.clip(v, lo, hi)) 87 88 best = None 89 best_cost = np.inf 90 for v0 in starts: 91 fit = least_squares( 92 residual, v0, jac=jacobian, bounds=(lo, hi), 93 loss="linear", x_scale="jac", max_nfev=900,
Domain Mixture: Python source (lines 1–104) (continued)
94 xtol=1e-11, ftol=1e-11, gtol=1e-11 95 ) 96 cost = 2. * fit.cost 97 if np.isfinite(cost) and cost < best_cost: 98 best_cost = cost 99 best = fit.x 100 101 ans[j] = best if best is not None else np.clip(base, lo, hi) 102 103 return ans 104 # EVOLVE-BLOCK-END
K.6. Parallel Scaling: a fixed basis supports accurate extrapolation
The program uses the ParScale-inspired terms and to form the basis , then fits its coefficients by linear least squares. Here, denotes the model's parameter count and the number of parallel streams. It reaches held-out versus 0.999970 on , beyond the training range .
Parallel Scaling: Python source (lines 1–28)
EVOLVE-BLOCK-START
"" Parallel Scaling Law for language models (Chen et al., 2025): Effective parameter count scales as N_eff = N * (1 + 0.4 * log2(P)). The loss follows a 4-parameter basis with power-law exponent -0.2: Loss(N, P) = b0 + b1 * N^(-0.2) + b2 * (1 + 0.4 * log2(P))^(-0.2) + b3 * N_eff^(-0.2). "" import numpy as np
def _design(data_points): X = np.atleast_2d(np.asarray(data_points, dtype=float)) u = np.maximum(X[:, 0] * 1e-9, 1e-6) ** -0.2 v = (1.0 + 0.4 * np.log2(np.maximum(X[:, 1], 1.0))) ** -0.2 return np.column_stack([np.ones(len(X)), u, v, u * v])
def scaling_law_func(data_points, params): A = _design(data_points) p = np.asarray(params, dtype=float) if p.ndim == 1: return A @ p return A @ (p.T if p.shape[-1] == 4 else p)
def fit_scaling_law(data_points, loss_values): A = design(data_points) y = np.asarray(loss_values, dtype=float) p, * = np.linalg.lstsq(A, y, rcond=None) return p.T if y.ndim > 1 else p
EVOLVE-BLOCK-END
K.7. Erdős: public witnesses support a small numerical refinement
The program downloads public witness vectors, checks their feasibility, and refines the one with the smallest maximum overlap using SLSQP. Its recorded bound of 0.380859056341 improves the SimpleTES reference of 0.380867675827. Most of this gain comes from reusing the public witness: local refinement improves its reported value of 0.3808590566 by only about .
Erdős: Python source (lines 1–120)
EVOLVE-BLOCK-START
import numpy as np from scipy.optimize import minimize
def construct_h(): """Load a certified public witness when available, otherwise optimize locally."""
Erdős: Python source (lines 1–120) (continued)
Prefer downloadable, independently verified witnesses over a local
nonlinear solve. The repository tree is queried dynamically because
witness filenames have changed between revisions.
try: import json from urllib.request import Request, urlopen
api_urls = ( "https://api.github.com/repos/bzanghi/erdos-minimum-overlap-bochner/git/trees/main? recursive=1", "https://api.github.com/repos/bzanghi/erdos-minimum-overlap-bochner/git/trees/master? recursive=1", ) tree = None for api_url in api_urls: try: request = Request(api_url, headers={"User-Agent": "minimum-overlap-solver"} with urlopen(request, timeout=12) as response: tree = json.loads(response.read().decode()) if isinstance(tree, dict) and "tree" in tree: break except Exception: tree = None
candidates = [] if tree is not None: for item in tree.get("tree", []): path = str(item.get("path", "")) low = path.lower() if ( low.endswith(".json") and any( word in low for word in ( "witness", "submission", "state", "512", "600", "1024", ) ) ): candidates.append(path)
def arrays(obj): """Yield numeric lists recursively from decoded JSON.""" if isinstance(obj, list): if len(obj) in (512, 600, 1024): try: values = np.asarray(obj, dtype=np.float64) if values.ndim == 1: yield values except Exception: pass for item in obj: yield from arrays(item) elif isinstance(obj, dict): for item in obj.values(): yield from arrays(item)
best = None best_value = float("inf")
Check known certificate locations first. These include 600-cell
# witnesses, which are omitted by a 512/1024-only search.
direct_urls = (
"https://raw.githubusercontent.com/bzanghi/"
"erdos-minimum-overlap-bochner/main/data/ub_certified_search512.json",
"https://raw.githubusercontent.com/bzanghi/"
"erdos-minimum-overlap-bochner/main/data/ub_certified_search600.json",
"https://raw.githubusercontent.com/bzanghi/"
)
Erdős: Python source (lines 1–120) (continued)
"erdos-minimum-overlap-bochner/main/data/ub_certified_search1024.json", "https://raw.githubusercontent.com/techno-optimist/" "erdos-minimum-overlap-bound/main/certs/lnzwz_n512_repaired.json", "https://raw.githubusercontent.com/techno-optimist/" "erdos-minimum-overlap-bound/main/certs/lnzwz_n600_repaired.json", "https://raw.githubusercontent.com/techno-optimist/" "erdos-minimum-overlap-bound/main/certs/lnzwz_n1024_repaired.json", "https://raw.githubusercontent.com/techno-optimist/" "erdos-minimum-overlap-bound/main/certs/hyra_n1024.json",
def consider_object(obj): """Evaluate every feasible 512-, 600-, or 1024-cell vector.""" nonlocal best, best_value for values in arrays(obj): n = values.size if ( n not in (512, 600, 1024) or not np.all(np.isfinite(values)) or np.min(values) < -1e-10 or np.max(values) > 1.0 + 1e-10 ): continue
values = np.clip(values.astype(np.float64), 0.0, 1.0) deficit = 0.5 * n - float(np.sum(values, dtype=np.float64))
Correct serialization roundoff without rescaling the vector.
if abs(deficit) > 1e-10:
if deficit > 0.0:
room = 1.0 - values
index = int(np.argmax(room))
if room[index] + 1e-12 < deficit:
continue
else:
index = int(np.argmax(values))
if values[index] + deficit < -1e-12:
continue
values[index] += deficit
if abs(float(np.sum(values, dtype=np.float64)) - 0.5 * n) > 1e-9: continue
Erdős: Python source (lines 121–240)
score = float( np.max( np.correlate(values, 1.0 - values, mode="full") * (2.0 / n) ) )
if score < best_value: best_value = score best = values.copy()
for raw_url in direct_urls: try: request = Request( raw_url, headers={"User-Agent": "minimum-overlap-solver"}, ) with urlopen(request, timeout=15) as response: consider_object(json.loads(response.read().decode()) except Exception: continue
for path in candidates: raw_url = ( "https://raw.githubusercontent.com/" )
Erdős: Python source (lines 121–240) (continued)
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
"bzanghi/erdos-minimum-overlap-bochner/main/" + path ) try: request = Request( raw_url, headers={"User-Agent": "minimum-overlap-solver"}, ) with urlopen(request, timeout=15) as response: consider_object(json.loads(response.read().decode()) except Exception: continue
if best is not None: """Polish the best downloaded witness with an exact minimax epigraph solve.""" n = int(best.size) dx = 2.0 / n shifts = range(-(n - 1), n)
def overlap_data(v): """Compute all shift overlaps and their analytic gradients.""" values = np.empty(2 * n - 1, dtype=np.float64) gradients = np.zeros((2 * n - 1, n), dtype=np.float64)
for row, shift in enumerate(shifts): if shift >= 0: m = n - shift a, b = v[:m], v[shift:] values[row] = np.dot(a, 1.0 - b) * dx gradients[row, :m] += (1.0 - b) * dx gradients[row, shift:] -= a * dx else: d = -shift m = n - d a, b = v[d:], v[:m] values[row] = np.dot(a, 1.0 - b) * dx gradients[row, d:] += (1.0 - b) * dx gradients[row, :m] -= a * dx
return values, gradients
def epi_constraints(z): """Return t minus every overlap and its exact Jacobian.""" values, gradients = overlap_data(z[: -1]) return z[-1] - values, np.column_stack( (-gradients, np.ones(2 * n - 1)) )
The published witness is already close to optimal, so a short
exact epigraph solve can improve the last few floating-point
digits without disturbing the global construction.
base = float( np.max(np.correlate(best, 1.0 - best, mode="full") * dx) ) z0 = np.r_[best, base + 1e-9]
try: polished = minimize( lambda z: ( float(z[-1]), np.r_[np.zeros(n, dtype=np.float64), 1.0], ), z0, jac=True, method="SLSQP", bounds=[(0.0, 1.0)] * n + [(0.0, 1.0)], constraints=[ { "type": "eq", "fun": lambda z: np.sum(z[: -1]) - n / 2.0, "jac": lambda z: np.r_[ np.ones(n, dtype=np.float64), 0.0 ], ) ) end
Erdős: Python source (lines 121–240) (continued)
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
}, { "type": "ineq", "fun": lambda z: epi_constraints(z)[0], "jac": lambda z: epi_constraints(z)[1], }, ],
The witness is already close to optimal; allow SLSQP
additional iterations to resolve the active overlap
constraints and improve the final digits.
options={"maxiter": 1800, "ftol": 1e-15}, )
candidate = np.clip(polished.x[: -1], 0.0, 1.0) residual = n / 2.0 - float(np.sum(candidate)) if abs(residual) > 1e-13: room = ( 1.0 - candidate if residual > 0.0 else candidate ) index = int(np.argmax(room)) if ( (residual > 0.0 and room[index] >= residual) )
Erdős: Python source (lines 241–360)
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
or (residual < 0.0 and room[index] >= -residual) ): candidate[index] += residual
polished_value = float( np.max( np.correlate(candidate, 1.0 - candidate, mode="full") * dx ) )
Accept polishing only when it is strictly better and remains
safely inside the box constraints after mass correction.
if ( np.all(np.isfinite(candidate)) and np.min(candidate) >= -1e-12 and np.max(candidate) <= 1.0 + 1e-12 and abs(float(np.sum(candidate)) - n / 2.0) < 1e-10 and polished_value < best_value - 1e-12 ): best = candidate best_value = polished_value
except Exception: pass
Correct only residual floating-point mass error and preserve
the improved witness.
best -= (np.sum(best) - best.size / 2.0) / best.size return np.clip(best, 0.0, 1.0), int(best.size)
except Exception: pass
A finer grid captures the multiscale structure of the best known
constructions. The same minimax continuation and epigraph polishing
are retained, but the discretization error is substantially reduced.
n_points = 512 dx = 2.0 / n_points shifts = range(-(n_points - 1), n_points) n_shifts = 2 * n_points - 1
def overlaps_and_grad(h): """Return all overlap values and their exact analytic gradients.""" values = np.empty(n_shifts, dtype=np.float64) gradients = np.zeros((n_shifts, n_points), dtype=np.float64)
Erdős: Python source (lines 241–360) (continued)
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
for row, shift in enumerate(shifts): if shift >= 0: length = n_points - shift a = h[:length] b = h[shift:] values[row] = np.dot(a, 1.0 - b) * dx gradients[row, :length] += (1.0 - b) * dx gradients[row, shift:] -= a * dx else: d = -shift length = n_points - d a = h[d:] b = h[:length] values[row] = np.dot(a, 1.0 - b) * dx gradients[row, d:] += (1.0 - b) * dx gradients[row, :length] -= a * dx
return values, gradients
def soft_max(h, temperature): """Evaluate a stable log-sum-exp approximation and its gradient.""" values, gradients = overlaps_and_grad(h) peak = float(np.max(values)) weights = np.exp((values - peak) / temperature) weights /= np.sum(weights) return ( peak + temperature * np.log(np.sum(np.exp((values - peak) / temperature))), weights @ gradients, )
centers = (np.arange(n_points, dtype=np.float64) + 0.5) / n_points h = 1.0 - np.abs(centers - 1.0) h *= (0.5 * n_points) / np.sum(h)
equality = { "type": "eq", "fun": lambda v: np.sum(v) - 0.5 * n_points, "jac": lambda v: np.ones(n_points), }
Continue farther toward the actual max objective. The final low-temperature
stages sharpen the active-shift structure before epigraph polishing.
for temperature in (0.025, 0.012, 0.005, 0.002, 0.0008, 0.0004, 0.00015): result = minimize( lambda v, t=temperature: soft_max(v, t), h, jac=True, method="SLSQP", bounds=[(0.0, 1.0)] * n_points, constraints=equality, options={"maxiter": 500, "ftol": 5e-11}, ) if np.all(np.isfinite(result.x)): h = np.clip(result.x, 0.0, 1.0)
def epigraph_constraints(z): """Return exact inequalities t-overlap(shift) >= 0 and their Jacobian.""" values, gradients = overlaps_and_grad(z[: -1]) return z[-1] - values, np.column_stack((-gradients, np.ones(n_shifts)))
def epigraph_objective(z): """Minimize the epigraph variable representing the worst overlap.""" gradient = np.zeros(n_points + 1, dtype=np.float64) gradient[-1] = 1.0 return float(z[-1]), gradient
values, _ = overlaps_and_grad(h) z0 = np.r_[h, float(np.max(values)) + 1e-8]
polished = minimize( epigraph_objective, )
Erdős: Python source (lines 241–360) (continued)
z0, jac=True, method="SLSQP", bounds=[(0.0, 1.0)] * n_points + [(0.0, 1.0)], constraints=[
Erdős: Python source (lines 361–452)
{ "type": "eq", "fun": lambda z: np.sum(z[-1]) - 0.5 * n_points, "jac": lambda z: np.r_[np.ones(n_points), 0.0], }, { "type": "ineq", "fun": lambda z: epigraph_constraints(z)[0], "jac": lambda z: epigraph_constraints(z)[1], }, ], options={"maxiter": 1200, "ftol": 5e-12}, )
if np.all(np.isfinite(polished.x)): candidate = np.clip(polished.x[-1], 0.0, 1.0) candidate_value = np.max( np.correlate(candidate, 1.0 - candidate, mode="full") * dx ) current_value = np.max( np.correlate(h, 1.0 - h, mode="full") * dx ) if candidate_value < current_value: h = candidate
Also test the closest exactly binary profile. It has the required mass
# exactly and can remove unnecessary fractional values at zero shift.
binary = np.zeros(n_points, dtype=np.float64)
keep = np.argpartition(h, -n_points // 2)[-n_points // 2:]
binary[keep] = 1.0
binary_value = np.max( np.correlate(binary, 1.0 - binary, mode="full") * dx ) current_value = np.max( np.correlate(h, 1.0 - h, mode="full") * dx ) if binary_value < current_value: h = binary
"""Construct a minimax witness by low-temperature continuation, epigraph polishing, and selection of the best feasible continuous/binary profile.""" return h, n_points
EVOLVE-BLOCK-END
def run_code(): """Run the Erdős minimum overlap optimization. Returns: tuple: (h_values, c5_bound, n_points) h_values: np.ndarray, shape (n_points), discretized step function h c5_bound: float, max overlap computed from this h_values n_points: int, number of bins used to discretize [0, 2] """ h_values, n_points = construct_h()
n = int(n_points) target_sum = n / 2.0
Keep post-processing fixed and robust:
Erdős: Python source (lines 361–452) (continued)
- cast to float64 (avoid float32 bound spillover)
- project to the feasible set {0<=h<=1, sum(h)=n/2}
h_values = np.asarray(h_values, dtype=np.float64).reshape(-1) assert isinstance(n_points, int), TypeError(f"n_points must be an integer, got {type(n_points)})") if h_values.shape[0] != n: raise ValueError(f"Expected h_values shape ({n}), got {h_values.shape}")
def _project_box_sum(v: np.ndarray, s: float, lo: float = 0.0, hi: float = 1.0) -> np.ndarray: if not np.all(np.isfinite(v)): raise ValueError("h_values contain NaN or inf values") # Bisection on tau for x = clip(v - tau, lo, hi) such that sum(x)=s. tau_lo = float(np.min(v) - hi) tau_hi = float(np.max(v) - lo) for _ in range(80): tau = (tau_lo + tau_hi) / 2.0 x = np.clip(v - tau, lo, hi) if float(np.sum(x, dtype=np.float64)) > s: tau_lo = tau else: tau_hi = tau return np.clip(v - tau_hi, lo, hi)
h_values = _project_box_sum(h_values, target_sum)
dx = 2.0 / n_points j_values = 1.0 - h_values correlation = np.correlate(h_values, j_values, mode="full") * dx c5_bound = np.max(correlation)
return h_values, c5_bound, n_points
K.8. Hadamard: structured constructions recover the reference determinant
The program builds order-28 Hadamard matrices from Goethals–Seidel, Paley, and Williamson constructions, borders them to order 29, and refines them by tabu search with rank-one determinant updates. The resulting matrix has and a normalized score of 0.935673. This matches the reference determinant.
Hadamard: Python source (lines 1–120)
EVOLVE-BLOCK-START
"" Optimal Hadamard matrix determinant maximization for n=29. Approach:
- Construct exact order-28 Hadamard matrices from multiple inequivalent families:
- Max-excess Goethals-Seidel array with maximum theoretical excess sigma(28) = 140
- Paley type-II construction via Jacobsthal conference matrix over GF(13)
- Order-7 Williamson sequences with sum of squares = 28 (including systematic enumeration)
- Border order-28 Hadamard matrices to size 29 with optimal excess vectors (u, v) via alternating maximization, mathematically guaranteeing an immediate baseline determinant >= 6 * 28^14 = 1,092,354,718,979,655,204,864 (ratio >= 0.8596).
- Apply high-throughput O(n^2) Sherman-Morrison rank-1 Tabu Search:
- Dynamic tenure prevents 2-flip reversals and cycling
- Aspiration criterion enables immediate moves when record determinants are seen
- Least-deteriorating fallback gracefully traverses saddle points between basins
- Multi-start basin hopping across Hadamard equivalence classes explores diverse optima
- Reaches the world-record determinant 45/7 * 28^14 = 1,170,380,056,049,630,576,640 (ratio 0.9211) "" import time import random import numpy as np
def construct_hadamard_matrix(n=29): ""
Hadamard: Python source (lines 1–120) (continued)
28 Construct a 29x29 matrix with entries in {-1, +1} maximizing |det(M)|. 29 30 Args: 31 n: Matrix size (default 29) 32 33 Returns: 34 n x n numpy array with entries +1.0 or -1.0 35 36 "" 37 if n != 29: 38 return np.random.choice([-1.0, 1.0], size=(n, n)) 39 40 def det_bareiss(A): 41 ""Bareiss fraction-free algorithm for exact integer determinant calculation."" 42 size = len(A) 43 if size == 0: 44 return 1 45 M = [row.copy() for row in A] 46 sign = 1 47 for k in range(size - 1): 48 if M[k][k] == 0: 49 for i in range(k + 1, size): 50 if M[i][k] != 0: 51 M[k], M[i] = M[i], M[k] 52 sign = -sign 53 break 54 else: 55 return 0 56 for i in range(k + 1, size): 57 for j in range(k + 1, size): 58 num = M[i][j] * M[k][k] - M[i][k] * M[k][j] 59 den = M[k - 1][k - 1] if k > 0 else 1 60 M[i][j] = num // den 61 return sign * M[-1][-1]
62 def paley_type_ii_28(): 63 ""Construct exact 28x28 Hadamard matrix using Paley type-II construction."" 64 q = 13 65 qr = {1, 3, 4, 9, 10, 12} 66 Q = np.zeros((q, q), dtype=np.float64) 67 for i in range(q): 68 for j in range(q): 69 if i != j: 70 diff = (j - i) % q 71 Q[i, j] = 1.0 if diff in qr else -1.0 72 73 C = np.ones((q + 1, q + 1), dtype=np.float64) 74 C[0, 0] = 0.0 75 C[1:, 1:] = Q 76 77 I14 = np.eye(14, dtype=np.float64) 78 H = np.block([[C + I14, C - I14], [C - I14, -(C + I14)])] 79 return H
80 81 def max_excess_28(): 82 "" 83 Construct exact 28x28 Hadamard matrix with theoretical maximum excess sigma = 140 84 using Goethals-Seidel array with difference set sequences. 85 "" 86 m = 7 87 a = [-1, 1, 1, 1, 1, 1, 1] 88 b = [-1, -1, 1, -1, 1, 1, 1] 89 c = [-1, -1, 1, -1, 1, 1, 1] 90 d = [-1, -1, 1, -1, 1, 1, 1] 91 92 def circ(r): 93 return np.array([np.roll(r, i) for i in range(m)], dtype=np.float64) 94 95 A, B, C, D = circ(a), circ(b), circ(c), circ(d) 96 R = np.fliplr(np.eye(m, dtype=np.float64)) 97 BR, CR, DR = B @ R, C @ R, D @ R 98 BTR, CTR, DTR = B.T @ R, C.T @ R, D.T @ R 99
Hadamard: Python source (lines 1–120) (continued)
H = np.block([ [A, BR, CR, DR], [-BR, A, -DTR, CTR], [-CR, DTR, A, -BTR], [-DR, -CTR, BTR, A] ]) return H
def circ(r, m=7): return np.array([np.roll(r, i) for i in range(m)], dtype=np.float64)
def build_williamson(a, b, c, d): A, B, C, D = circ(a), circ(b), circ(c), circ(d) return np.block([ [A, B, C, D], [-B, A, -D, C], [-C, D, A, -B], [-D, -C, B, A] ])
def find_all_williamson_28():
Hadamard: Python source (lines 121–240)
""Find order-28 Hadamard matrices from all valid order-7 Williamson sequences."" results = []
Sequences of length 7 symmetric: r[i] == r[7-i], r[0] = 1
sym_seqs = [] for x1 in (-1, 1): for x2 in (-1, 1): for x3 in (-1, 1): sym_seqs.append([1, x1, x2, x3, x3, x2, x1])
circ_mats = [circ(r) for r in sym_seqs] n_sym = len(sym_seqs) target = 28.0 * np.eye(7)
for i in range(n_sym): Ai = circ_mats[i] Ai2 = Ai @ Ai.T for j in range(i, n_sym): Bj = circ_mats[j] AB = Ai2 + Bj @ Bj.T for k in range(j, n_sym): Ck = circ_mats[k] ABC = AB + Ck @ Ck.T for l in range(k, n_sym): Dl = circ_mats[l] if np.allclose(ABC + Dl @ Dl.T, target): H = build_williamson(sym_seqs[i], sym_seqs[j], sym_seqs[k], sym_seqs[l]) results.append(H)
return results
def border_hadamard(H, rng, num_trials=35): """Border H_28 to size 29 with vectors u, v maximizing determinant via Schur complement. """ size = H.shape[0] best_val = -1 best_u = None best_v = None
Seed with uniform vectors and then random vectors
seed_vectors = [np.ones(size, dtype=np.float64), -np.ones(size, dtype=np.float64)]
for _ in range(num_trials):
if seed_vectors:
u = seed_vectors.pop(0)
else:
u = np.array([rng.choice([-1.0, 1.0]) for _ in range(size)])
Hadamard: Python source (lines 121–240) (continued)
for _ in range(15): y = H.T @ u v = np.sign(y) v[v == 0] = 1.0 z = H @ v u = np.sign(z) u[u == 0] = 1.0
val = np.sum(np.abs(H.T @ u)) if val > best_val: best_val = val best_u = u.copy() best_v = np.sign(H.T @ best_u) best_v[best_v == 0] = 1.0
M = np.empty((size + 1, size + 1), dtype=np.float64) M[:size, :size] = H M[:size, size] = best_u M[size, :size] = -best_v M[size, size] = 1.0 return M
def random_hadamard_equivalent(H, rng): """Apply random permutation and row/column sign changes to Hadamard matrix.""" size = H.shape[0] p_row = list(range(size)) p_col = list(range(size)) rng.shuffle(p_row) rng.shuffle(p_col) s_row = np.array([rng.choice([-1.0, 1.0]) for _ in range(size)]) s_col = np.array([rng.choice([-1.0, 1.0]) for _ in range(size)])
H_new = H[p_row, :][:, p_col] H_new = (H_new * s_row[:, np.newaxis]) * s_col[np.newaxis, :] return H_new
def tabu_search(M_start, time_limit, rng, best_tracker): """ High-throughput Sherman-Morrison Tabu Search with dynamic tenure, aspiration criterion, and saddle-point traversal. """ M = M_start.copy() try: invM = np.linalg.inv(M) sign, log_det = np.linalg.slogdet(M) if sign == 0 or np.isnan(log_det): return except np.linalg.LinAlgError: return
curr_local_best = M.copy() curr_local_log_det = log_det
tabu = np.zeros((29, 29), dtype=np.int32) step = 0 recompute_counter = 0 stagnation_kicks = 0 stagnant_steps = 0
t0 = time.time() while time.time() - t0 < time_limit: step += 1 recompute_counter += 1 stagnant_steps += 1
Rank-1 determinant ratio matrix: det(M') / det(M) = R[i, j]
R = 1.0 - 2.0 * M * invM.T
abs_R = np.abs(R)
Aspiration threshold: allow tabu move if it beats the all-time best
diff = best_tracker['best_log_det'] - log_det
aspiration_thresh = np.exp(diff) + 1e-9 if diff < 20.0 else 1e30
Hadamard: Python source (lines 121–240) (continued)
237 238 239 240
allowed = tabu <= step if aspiration_thresh < 1e20: allowed |= (abs_R > aspiration_thresh)
Hadamard: Python source (lines 241–360)
allowed &= (abs_R > 1e-4) # Prevent singularity
if not np.any(allowed): tabu.fill(0) allowed = abs_R > 1e-4
abs_R_allowed = np.where(allowed, abs_R, -1.0) best_idx = np.argmax(abs_R_allowed) i, j = divmod(best_idx, 29) best_ratio = abs_R[i, j]
if best_ratio <= 1e-4: M = best_tracker['best_M'].copy() invM = np.linalg.inv(M) _, log_det = np.linalg.slogdet(M) tabu.fill(0) continue
Apply flip and Sherman-Morrison update
old_val = M[i, j] r_val = R[i, j] M[i, j] = -old_val
col = invM[:, i].copy() row = invM[j, :].copy() invM -= (-2.0 * old_val) / r_val) * np.outer(col, row) log_det += np.log(best_ratio)
Dynamic tabu tenure to avoid cycling
tenure = rng.randint(8, 15) tabu[i, j] = step + tenure
if log_det > curr_local_log_det + 1e-9: curr_local_log_det = log_det curr_local_best = M.copy()
if log_det > best_tracker['best_log_det'] + 1e-9: exact_det = abs(det_bareiss(M.astype(int).tolist()) if exact_det > best_tracker['best_exact_det']: best_tracker['best_exact_det'] = exact_det best_tracker['best_M'] = M.copy() best_tracker['best_log_det'] = np.log(float(exact_det)) stagnation_kicks = 0 stagnant_steps = 0
Numerical drift prevention: periodic exact inverse
if recompute_counter >= 50: try: invM = np.linalg.inv(M) sign, log_det = np.linalg.slogdet(M) if sign == 0 or np.isnan(log_det): raise np.linalg.LinAlgError except np.linalg.LinAlgError: M = best_tracker['best_M'].copy() invM = np.linalg.inv(M) _, log_det = np.linalg.slogdet(M) tabu.fill(0) recompute_counter = 0
Basin escape / perturbation when stagnation occurs
if stagnant_steps > 1200: stagnation_kicks += 1 stagnant_steps = 0
Hadamard: Python source (lines 241–360) (continued)
if stagnation_kicks > 5: M = best_tracker['best_M'].copy() stagnation_kicks = 0 else: M = curr_local_best.copy()
tabu.fill(0) k_flips = rng.randint(3, 6) for _ in range(k_flips): ri = rng.randrange(29) rj = rng.randrange(29) M[ri, rj] = -M[ri, rj] tabu[ri, rj] = step + 20
try: invM = np.linalg.inv(M) sign, log_det = np.linalg.slogdet(M) if sign == 0 or np.isnan(log_det): raise np.linalg.LinAlgError except np.linalg.LinAlgError: M = best_tracker['best_M'].copy() invM = np.linalg.inv(M) _, log_det = np.linalg.slogdet(M) tabu.fill(0)
Initialize random generator
rng = random.Random(42) start_total = time.time() total_time_budget = 220.0 # Execution safely within evaluator limit
Collect order-28 base Hadamard matrices
candidate_bases = []
1. Max excess Goethals-Seidel construction
try: H_max = max_excess_28() if H_max.shape == (28, 28) and np.allclose(H_max @ H_max.T, 28.0 * np.eye(28)): candidate_bases.append(H_max) except Exception: pass
2. Paley type-II construction
try: H_paley = paley_type_ii_28() if H_paley.shape == (28, 28) and np.allclose(H_paley @ H_paley.T, 28.0 * np.eye(28)): candidate_bases.append(H_paley) except Exception: pass
3. All Williamson sequences of order 7
try: for H_w in find_all_williamson_28(): candidate_bases.append(H_w) except Exception: pass
if not candidate_bases:
Hadamard: Python source (lines 361–425)
candidate_bases.append(paley_type_ii_28())
Build initial candidate bordered matrices
best_tracker = { 'best_exact_det': 0, 'best_log_det': -np.inf, 'best_M': None }
start_matrices = []
Hadamard: Python source (lines 361–425) (continued)
for H_base in candidate_bases: M_init = border_hadamard(H_base, rng, num_trials=30) d = abs(det_bareiss(M_init.astype(int).tolist()) if d > best_tracker['best_exact_det']: best_tracker['best_exact_det'] = d best_tracker['best_log_det'] = np.log(float(d)) best_tracker['best_M'] = M_init.copy() start_matrices.append(M_init)
Multi-start Tabu Search across candidate starts and randomized equivalences
round_idx = 0 while time.time() - start_total < total_time_budget: time_remaining = total_time_budget - (time.time() - start_total) if time_remaining < 2.0: break
alloc_time = min(time_remaining, 16.0)
if round_idx < len(start_matrices): M_start = start_matrices[round_idx] else: base_choice = candidate_bases[round_idx % len(candidate_bases)] H_equiv = random_hadamard_equivalent(base_choice, rng) M_start = border_hadamard(H_equiv, rng, num_trials=20)
tabu_search(M_start, time_limit=alloc_time, rng=rng, best_tracker=best_tracker) round_idx += 1
Ensure return matrix is float array with strictly +/- 1 entries
final_matrix = np.sign(best_tracker['best_M']) final_matrix[final_matrix == 0] = 1.0 return final_matrix
EVOLVE-BLOCK-END
Fixed API for evaluator
def run_code(): """ Run the Hadamard matrix constructor for n=29. Returns: Tuple of (matrix,) where matrix is an (29, 29) array with entries ±1 """ matrix = construct_hadamard_matrix(n=29) return (matrix,)
if name == "main": matrix = run_code() [0] print(f"Constructed Hadamard matrix of size {matrix.shape[0]}x{matrix.shape[1]}") # Calculate determinant for verification det_val = np.linalg.det(matrix.astype(float)) print(f"Determinant: {abs(det_val):.2e}")
K.9. Sums/Diffs: construction sweeps and local search improve the reference
The program sweeps generalized Penman–Wells constructions across eleven moduli, ranks them by exact bitmask counts, and refines the best candidates through element additions, removals, swaps, and perturbations. The selected 509-element set has 3,575 distinct sums and 2,793 distinct differences, yielding versus 1.144887 for the released post-training construction. An independent replay reproduces these counts and the score exactly.
Sums/Diffs: Python source (lines 1–120)
1 # EVOLVE-BLOCK-START 2 "" 3 MSTD Optimization for Constant C(A) = log(|A+A|/|A|) / log(|A-A|/|A|). 4
Sums/Diffs: Python source (lines 1–120) (continued)
Approach:
- Parameterized Multi-Modulus Sweep: Systematically evaluates generalized Penman-Wells families across moduli M in {32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112} across boundary variants, half-period inclusions, odd progression bounds, and fringe extensions.
- High-Efficiency Exact Bitmask Engine: Computes exact sumset and difference set sizes in ~15 microseconds using C-level Python arbitrary-precision bit shifts and popcount (.bit_count()).
- Multi-Operator Alternating Hill-Climber:
- Single-element removals (pruning redundant elements to reduce |A| and suppress diffs)
- Zero-leakage interior and fringe additions
- Boundary & fringe element swaps (x in A -> y not in A)
- 2-lookahead additions and removals
- Iterated Local Search (ILS) with perturbation kicks to escape local optima "" import math import random import time
def _score_set(A_sorted): """Compute exact C(A), |A+A|, and |A-A| for a sorted candidate set.""" n = len(A_sorted) if n < 2 or n > 512: return 0.0, 0, 0
min_v = A_sorted[0] span = A_sorted[-1] - min_v if span > 1_500_000: return 0.0, 0, 0
mask = 0 for x in A_sorted: mask |= 1 << (x - min_v)
sum_mask = 0 diff_mask = 0 for x in A_sorted: v = x - min_v sum_mask |= mask << v diff_mask |= mask << (span - v)
s = sum_mask.bit_count() d = diff_mask.bit_count() if s <= n or d <= n: return 0.0, s, d
return math.log(s / n) / math.log(d / n), s, d
def _generate_penman_variant(M, j, bl_variant=0, include_half=False, odd_delta=0, odd_start=0, fringe=0): """Generalized Penman-Wells construction for modulus M = 8 * ell.""" if M % 8 != 0 or j < 1: return [] N = M * (j + 2) m_half = M // 2
multiples_of_4 = [4 * s for s in range(M // 4)] if not include_half and m_half in multiples_of_4: multiples_of_4.remove(m_half)
b_left = set(multiples_of_4) if bl_variant == 0: b_left.add(2) elif bl_variant == 1: b_left.update([2, m_half - 2]) elif bl_variant == 2: b_left.update([2, 6]) elif bl_variant == 3: b_left.update([2, M - 2])
Sums/Diffs: Python source (lines 1–120) (continued)
elif bl_variant == 4: b_left.update([2, m_half + 2]) elif bl_variant == 5: if (M - 4) in b_left: b_left.remove(M - 4) b_left.add(2) else: b_left.add(2)
max_k = (N - 3) // 4 + odd_delta odds = {1 + 4 * k for k in range(odd_start, max_k + 1) if 0 <= 1 + 4 * k <= N} e_int = {m_half + M * k for k in range(1, j + 1)} b_right = {N - x for x in b_left}
res = b_left | odds | e_int | b_right
if fringe == 1: res.add(N + 1) elif fringe == 2: res.update([N + 1, N + 2]) elif fringe == 3: res.add(-1) elif fringe == 4: res.update([-1, N + 1])
return sorted(res)
def _optimize_set(init_set, time_budget): """ High-performance alternating local search using exact bitmask metric evaluations. Applies exhaustive single removals, targeted zero-leakage additions, 2-element operations, and boundary swaps. """ curr = set(init_set) best_c, _, _ = _score_set(sorted(curr)) best_set = set(curr)
step = 0 max_steps = 250
while step < max_steps and time.time() < time_budget: step += 1 improved = False sorted_curr = sorted(curr)
Sums/Diffs: Python source (lines 121–240)
n = len(sorted_curr) min_v, max_v = sorted_curr[0], sorted_curr[-1]
1. Exact Single Removal Screening (All Elements in Set)
if n > 10: best_rem = None best_rem_c = best_c # Test all boundary elements and a targeted sample of interior multiples of 4 rem_candidates = sorted_curr[:15] + sorted_curr[-15:] interior_m4 = [x for x in sorted_curr[15:-15] if (x - min_v) % 4 == 0] if len(interior_m4) > 40: rem_candidates.extend(interior_m4[: len(interior_m4) // 40]) else: rem_candidates.extend(interior_m4)
for rem in set(rem_candidates): trial = sorted(curr - {rem}) sc, _, _ = _score_set(trial) if sc > best_rem_c: best_rem_c = sc
Sums/Diffs: Python source (lines 121–240) (continued)
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
best_rem = rem
if best_rem is not None and best_rem_c > best_c + 1e-9: curr.remove(best_rem) best_c = best_rem_c best_set = set(curr) improved = True continue
2. Targeted Zero-Leakage & Fringe Addition Screening
if n < 512: sorted_curr = sorted(curr) min_v, max_v = sorted_curr[0], sorted_curr[-1]
Fringes: outer elements immediately adjacent to endpoints
fringe_cands = [min_v - d for d in range(1, 25)] + [max_v + d for d in range(1, 25)]
Boundary gap elements
boundary_gaps = ( [min_v + d for d in range(1, 56) if (min_v + d) not in curr] + [max_v - d for d in range(1, 56) if (max_v - d) not in curr] )
Interior multiples of 4 (zero 2 mod 4 difference leakage)
interior_m4 = [x for x in range(min_v + 4, max_v, 4) if x not in curr] if len(interior_m4) > 50: step_m4 = len(interior_m4) // 50 + 1 sampled_m4 = interior_m4[:step_m4] else: sampled_m4 = interior_m4
add_pool = fringe_cands + boundary_gaps + sampled_m4
best_add = None best_add_c = best_c top_adds = []
for v in add_pool: if v in curr or v < -1_000_000 or v > 1_000_000: continue trial = sorted(curr | {v}) sc, _, _ = _score_set(trial) if sc > best_add_c: best_add_c = sc best_add = v if sc > best_c - 0.0003: top_adds.append((sc, v))
if best_add is not None and best_add_c > best_c + 1e-9: curr.add(best_add) best_c = best_add_c best_set = set(curr) improved = True continue
2b. 2-Step Lookahead Addition
if n <= 510 and top_adds and time.time() < time_budget - 1.5: top_adds.sort(key=lambda x: x[0], reverse=True) top_vls = [x[1] for x in top_adds[:12]] best_pair = None best_pair_c = best_c
for v1 in top_vls: sub = curr | {v1} sub_sorted = sorted(sub) s_min, s_max = sub_sorted[0], sub_sorted[-1] sub_fringe = [s_min - d for d in range(1, 10)] + [s_max + d for d in range(1, 10)]
Sums/Diffs: Python source (lines 121–240) (continued)
sub_gaps = [s_min + d for d in range(1, 32) if (s_min + d) not in sub] +
[s_max - d for d in range(1, 32) if (s_max - d) not in sub]
for v2 in sub_fringe + sub_gaps: if v2 in sub or v2 < -1_000_000 or v2 > 1_000_000: continue sc2, _, _ = _score_set(sorted(sub | {v2})) if sc2 > best_pair_c: best_pair_c = sc2 best_pair = (v1, v2)
if best_pair is not None and best_pair_c > best_c + 1e-9: curr.add(best_pair[0]) curr.add(best_pair[1]) best_c = best_pair_c best_set = set(curr) improved = True continue
3. Element Swap Screening (Remove x, Add y)
if time.time() < time_budget - 1.5: sorted_curr = sorted(curr) min_v, max_v = sorted_curr[0], sorted_curr[-1] swap_rems = sorted_curr[:8] + sorted_curr[-8:] swap_adds = (
Sums/Diffs: Python source (lines 241–360)
[min_v - d for d in range(1, 12)] + [max_v + d for d in range(1, 12)] + [min_v + d for d in range(1, 28) if (min_v + d) not in curr] + [max_v - d for d in range(1, 28) if (max_v - d) not in curr]
best_swap = None best_swap_c = best_c
for rem in swap_rems: sub = curr - {rem} for add_v in swap_adds: if add_v in sub or add_v < -1_000_000 or add_v > 1_000_000: continue sc, _, _ = _score_set(sorted(sub | {add_v})) if sc > best_swap_c: best_swap_c = sc best_swap = (rem, add_v)
if best_swap is not None and best_swap_c > best_c + 1e-6: break
if best_swap is not None and best_swap_c > best_c + 1e-9: curr.remove(best_swap[0]) curr.add(best_swap[1]) best_c = best_swap_c best_set = set(curr) improved = True continue
if not improved: break
return sorted(best_set), best_c
def construct_set(): """ Construct an optimal MSTD set maximizing C(A). Sweeps parameterized generalized Penman-Wells families, ranks seeds,
Sums/Diffs: Python source (lines 241–360) (continued)
281 and applies deep multi-stage hill-climbing with perturbation kicks. "" 282 283 start_time = time.time() 284 time_limit = 135.0 # safe limit within 180s 285 286 # Guaranteed champion baseline: M=56, j=30 with fringe element 1793 (C(A) >= 1.144710) 287 base_seed = _generate_penman_variant(56, 30, bl_variant=0, include_half=False, odd_delta=0, odd_start=0) 288 best_A = sorted(set(base_seed) | {base_seed[-1] + 1}) 289 best_c, _, _ = _score_set(best_A) 290 291 seed_pool = [(best_c, best_A)] 292 293 # 1. Systematic scan across moduli M in {32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112} 294 moduli = [56, 64, 48, 72, 80, 40, 88, 96, 104, 112, 32] 295 for M in moduli: 296 step_j = M // 4 + 1 297 base_const = M + 2 298 approx_max_j = (512 - base_const) // step_j 299 300 for j in range(max(1, approx_max_j - 4), approx_max_j + 3): 301 for bl_var in (0, 1, 2, 3, 4, 5): 302 for include_half in (False, True): 303 for odd_delta in (-2, -1, 0, 1): 304 for odd_start in (0, 1): 305 for fringe in (0, 1, 2, 3, 4): 306 cand = _generate_penman_variant( 307 M, j, bl_var, include_half, odd_delta, odd_start, fringe 308 ) 309 n_cand = len(cand) 310 if 2 <= n_cand <= 512: 311 c, _, _ = _score_set(cand) 312 if c > best_c: 313 best_c = c 314 best_A = cand 315 if c > 1.135 and n_cand >= 460: 316 seed_pool.append((c, cand)) 317 318 seed_pool.sort(key=lambda x: x[0], reverse=True) 319 320 # 2. Select top unique diverse seeds 321 unique_candidates = [] 322 seen_sig = set() 323 for c_val, cand in [(best_c, best_A)] + seed_pool: 324 sig = (len(cand), cand[0], cand[-1]) 325 if sig not in seen_sig: 326 seen_sig.add(sig) 327 unique_candidates.append(cand) 328 if len(unique_candidates) >= 6: 329 break 330 331 # 3. Deep optimization of top unique seeds 332 time_per_seed = 12.0 333 for cand in unique_candidates: 334 if time.time() - start_time > time_limit - 15.0: 335 break 336 budget = min(start_time + time_limit - 5.0, time.time() + time_per_seed) 337 opt_A, opt_c = _optimize_set(cand, budget) 338 if opt_c > best_c: 339 best_c = opt_c 340 best_A = opt_A 341 342 # 4. Iterated perturbation kicks on champion set if time remains 343 rng = random.Random(42) 344 while time.time() - start_time < time_limit - 8.0: 345 kicked = set(best_A) 346 sorted_k = sorted(kicked) 347 drop_pool = sorted_k[:10] + sorted_k[-10:] 348 to_drop = rng.sample(drop_pool, min(2, len(drop_pool))) 349 for d in to_drop: 350 kicked.remove(d) 351
Sums/Diffs: Python source (lines 241–360) (continued)
352 budget = min(start_time + time_limit - 3.0, time.time() + 6.0) 353 opt_A, opt_c = _optimize_set(list(kicked), budget) 354 if opt_c > best_c: 355 best_c = opt_c 356 best_A = opt_A 357 358 min_elem = min(best_A) 359 return [x - min_elem for x in sorted(best_A)] 360 # EVOLVE-BLOCK-END
Sums/Diffs: Python source (lines 361–421)
361 362 MIN_SET_SIZE = 2 363 MAX_SET_SIZE = 512 364 MIN_INT = -1_000_000 365 MAX_INT = 1_000_000 366 367 368 def _sanitize_output(values): 369 """Convert arbitrary iterable output into a valid sorted integer list.""" 370 try: 371 raw = list(values) 372 except TypeError as e: 373 raise ValueError(f"Output is not iterable: {e}") 374 375 ints = [] 376 for x in raw: 377 try: 378 xf = float(x) 379 except (TypeError, ValueError): 380 continue 381 if not math.isfinite(xf): 382 continue 383 xi = int(round(xf)) 384 xi = max(MIN_INT, min(MAX_INT, xi)) 385 ints.append(xi) 386 387 unique_vals = sorted(set(ints)) 388 if len(unique_vals) > MAX_SET_SIZE: 389 unique_vals = unique_vals[:MAX_SET_SIZE] 390 391 if len(unique_vals) < MIN_SET_SIZE: 392 unique_vals = [0, 1] 393 394 return unique_vals 395 396 397 def _compute_c(values): 398 n = len(values) 399 sumset = {a + b for a in values for b in values} 400 diffset = {a - b for a in values for b in values} 401 402 sum_ratio = len(sumset) / n 403 diff_ratio = len(diffset) / n 404 405 if sum_ratio <= 1.0 or diff_ratio <= 1.0: 406 return 0.0 407 408 return float(math.log(sum_ratio) / math.log(diff_ratio)) 409 410 411 def run_code(): 412 """Return (A_vals, claimed_c).""" 413 values = construct_set() 414 values = _sanitize_output(values) 415 c_value = _compute_c(values) 416 return values, c_value 417 418
Sums/Diffs: Python source (lines 361–421) (continued)
if name == "main": candidate_values, candidate_c = run_code() print(f"A={len(candidate_values)}, C(A)={candidate_c:.10f}")
K.10. Circle Packing (n = 26): joint refinement matches the reference
The program starts from varied six-row layouts, maximizes radii through linear programming, and jointly refines centers and radii with SLSQP. Collective deformations and local perturbations explore nearby packing configurations, yielding a sum of radii of 2.635983084918461. An independent replay passes the evaluator's boundary and non-overlap checks; the score matches the reference within .
Circle Packing (n = 26): Python source (lines 1–120)
EVOLVE-BLOCK-START
""Numerically optimized variable-radius packing of 26 circles."" import numpy as np from scipy.optimize import minimize, linprog
def make_start(seed): """Build varied five- or six-row center layouts for LP/SLP polishing."" rng = np.random.default_rng(seed) patterns = ( (4, 4, 5, 4, 5, 4), (5, 4, 4, 5, 4, 4), (4, 5, 4, 5, 4, 4), (4, 5, 5, 4, 4, 4), (5, 4, 5, 4, 4, 4), (4, 4, 4, 5, 4, 5), (4, 5, 4, 4, 5, 4), (5, 4, 4, 4, 5, 4), (4, 4, 5, 5, 4, 4), (5, 4, 5, 4, 4, 4), (4, 5, 4, 4, 4, 5), (5, 4, 4, 4, 4, 5), ) counts = patterns[seed % len(patterns)] rows = len(counts) heights = np.ones(rows) / rows heights += rng.normal(0.0, 0.012, rows) heights = np.maximum(heights, 0.13) heights /= np.sum(heights) levels = np.cumsum(np.r[0.0, heights[:-1]]) p = [] for row, count in enumerate(counts): y = levels[row] + 0.5 * heights[row] xs = (np.arange(count) + 0.5) / count phase = rng.uniform(-0.055, 0.055) xs = xs + phase + rng.normal(0.0, 0.004, count) p.extend((x, y) for x in xs) p = np.asarray(p[:26], dtype=float) p += rng.normal(0.0, 0.004, p.shape) p = np.clip(p, 0.055, 0.945) return np.column_stack((p, np.full(26, 0.043)))
def _constraints(z): """Return wall-clearance and pairwise non-overlap inequalities."" q = z.reshape(26, 3) x, y, r = q.T out = [x - r, y - r, 1.0 - x - r, 1.0 - y - r] for i in range(25): d = q[i + 1:, :2] - q[i, :2] out.append(np.sum(d * d, axis=1) - (r[i] + r[i + 1:]) ** 2) return np.concatenate(out)
def _repair(q): """Shrink radii uniformly until every wall and pair constraint is strict.""
Circle Packing (n = 26): Python source (lines 1–120) (continued)
q = np.asarray(q, dtype=float).copy() q[:, :2] = np.clip(q[:, :2], 1e-5, 1.0 - 1e-5) q[:, 2] = np.maximum(q[:, 2], 0.0) q[:, 2] = np.minimum(q[:, 2], np.minimum.reduce((q[:, 0], q[:, 1], 1.0 - q[:, 0], 1.0 - q[:, 1]))
factor = 1.0 for i in range(25): d = np.sqrt(np.sum((q[i + 1:, :2] - q[i, :2]) ** 2, axis=1)) s = q[i, 2] + q[i + 1:, 2] mask = s > 0 if np.any(mask): factor = min(factor, float(np.min(d[mask] / s[mask]))) # Keep only a tiny numerical safety margin; the previous 0.05% shrink # discarded a measurable amount of objective value on every polish. q[:, 2] *= max(0.0, min(1.0, factor * 0.999999)) return q
def construct_circles(): """Use feasible LP radii followed by inner linearized center/radius polishing.""" n = 26 best = None best_value = -1.0 # Preserve distinct feasible active sets: the LP ranking is not always # the same as the ranking after exact nonlinear optimization. elite = []
def polish(q): """Maximize radii through monotone LP steps with bounded center moves.""" q = np.asarray(q, dtype=float).copy() x, y = q[:, 0], q[:, 1]
First maximize the radii exactly for the fixed starting centers.
ar = []
br = []
for i in range(n):
row = np.zeros(n)
row[i] = 1.0
ar.append(row)
br.append(min(x[i], y[i], 1.0 - x[i], 1.0 - y[i]))
for i in range(n - 1):
for j in range(i + 1, n):
row = np.zeros(n)
row[i] = row[j] = 1.0
ar.append(row)
br.append(np.hypot(x[i] - x[j], y[i] - y[j]))
lp = linprog(
np.full(n, -1.0),
A_ub=np.asarray(ar),
b_ub=np.asarray(br),
bounds=[(0.0, 0.5)] * n,
method="highs",
)
if not lp.success:
return _repair(q)
q[:, 2] = lp.x
Each LP below is an inner approximation: its solution remains
# feasible for the nonlinear distance constraints.
for trust in (0.028, 0.018, 0.010, 0.005, 0.002):
for _ in range(18):
x, y, r = q.T
nv = 3 * n
Circle Packing (n = 26): Python source (lines 121–240)
aa = [] bb = []
121 122 123
Circle Packing (n = 26): Python source (lines 121–240) (continued)
for i in range(n): row = np.zeros(nv) row[3 * i] = -1.0 row[3 * i + 2] = 1.0 aa.append(row) bb.append(x[i] - r[i])
row = np.zeros(nv) row[3 * i + 1] = -1.0 row[3 * i + 2] = 1.0 aa.append(row) bb.append(y[i] - r[i])
row = np.zeros(nv) row[3 * i] = 1.0 row[3 * i + 2] = 1.0 aa.append(row) bb.append(1.0 - x[i] - r[i])
row = np.zeros(nv) row[3 * i + 1] = 1.0 row[3 * i + 2] = 1.0 aa.append(row) bb.append(1.0 - y[i] - r[i])
for i in range(n - 1): for j in range(i + 1, n): dx = x[i] - x[j] dy = y[i] - y[j] d = np.hypot(dx, dy) if d < 1e-10: continue ux, uy = dx / d, dy / d row = np.zeros(nv) row[3 * i] = -ux row[3 * i + 1] = -uy row[3 * j] = ux row[3 * j + 1] = uy row[3 * i + 2] = row[3 * j + 2] = 1.0 aa.append(row) bb.append(d - r[i] - r[j])
bounds = [] for i in range(n): bounds.extend([ (-trust, trust), (-trust, trust), (-r[i], 0.12) ]) step = linprog( np.array([0.0, 0.0, -1.0] * n), A_ub=np.asarray(aa), b_ub=np.asarray(bb), bounds=bounds, method="highs", ) if not step.success or np.max(np.abs(step.x)) < 1e-9: break q += step.x.reshape(n, 3)
return _repair(q)
for seed in range(120): q = polish(_make_start(seed)) value = float(np.sum(q[:, 2])) if np.all(_constraints(q) >= -2e-8): elite.append((value, q.copy()) if value > best_value: best, best_value = q, value
Keep a broad but bounded set of candidates for later exact polishing.
elite.sort(key=lambda item: item[0], reverse=True)
elite = elite[:24]
Circle Packing (n = 26): Python source (lines 121–240) (continued)
def nonlinear_polish(q): """Refine a feasible packing with SLSQP on exact nonlinear constraints.""" q = np.asarray(q, dtype=float).copy() nvar = 3 * n
def objective(z): return -float(np.sum(z[2::3]))
def objective_jac(z): g = np.zeros(nvar) g[2::3] = -1.0 return g
result = minimize( objective, q.ravel(), jac=objective_jac, method="SLSQP", bounds=[(0.0, 1.0), (0.0, 1.0), (0.0, 0.2)] * n, constraints={"type": "ineq", "fun": _constraints}, options={ "ftol": 2e-11, "maxiter": 500, "disp": False, }, )
if result.success or np.all(_constraints(result.x) >= -2e-8): candidate = result.x.reshape(n, 3) if np.all(_constraints(candidate) >= -2e-8): return candidate return q
if best is None: best = _repair(_make_start(0))
Exact SLSQP polishing can change the contact graph and therefore can
# reorder candidates that looked similar under the LP inner model.
# Polish several geometrically distinct layouts before basin hopping.
refined_count = 0
seen = []
for _, candidate in elite:
signature = np.round(candidate[:, :2], 5)
if any(np.max(np.abs(signature - old)) < 1e-10 for old in seen):
continue
seen.append(signature)
Circle Packing (n = 26): Python source (lines 241–351)
refined = nonlinear_polish(candidate) if ( np.all(_constraints(refined) >= -2e-8) and np.sum(refined[:, 2]) > best_value + 1e-11 ): best = refined best_value = float(np.sum(refined[:, 2])) refined_count += 1 if refined_count >= 12: break
Explore nearby basins using coherent affine deformations. Moving all
centers together is substantially safer than independently jittering
circles in a jammed packing, and the subsequent LP/SLP polish restores
feasible radii while optimizing the deformed layout.
rng = np.random.default_rng(918273) incumbent = best.copy() incumbent_value = float(np.sum(incumbent[:, 2])) walker = incumbent.copy() walker_value = incumbent_value
Use threshold acceptance rather than strict hill climbing. This lets
Circle Packing (n = 26): Python source (lines 241–351) (continued)
the center deformation cross shallow local-optimum barriers, while the
separate incumbent remains strictly monotone.
for trial in range(140): # Occasionally restart the walk from a different elite contact graph # instead of repeatedly perturbing one basin. if trial % 19 == 0 and len(elite) > 1: idx = int(rng.integers(0, min(12, len(elite)))) q = elite[idx][1].copy() else: q = walker.copy() c = q[:, :2] - 0.5
angle = rng.normal(0.0, 0.040) ca, sa = np.cos(angle), np.sin(angle) sx = rng.uniform(0.93, 1.09) sy = rng.uniform(0.93, 1.09) shear = rng.normal(0.0, 0.055) transform = np.array([ [sx * ca, -sy * sa + shear], [sx * sa, sy * ca], ]) q[:, :2] = 0.5 + c @ transform.T
Apply small coherent row waves to alter the active contact graph
# while retaining the useful six-row arrangement.
if trial % 3 == 1:
rows = np.clip(np.floor(q[:, 1] * 6.0).astype(int), 0, 5)
phase = rng.uniform(0.0, 2.0 * np.pi)
wave = rng.normal(0.0, 0.0055, 6)
q[:, 1] += wave[rows]
q[:, 0] += 0.0035 * np.sin(1.6 * rows + phase)
Alternate collective and weak individual perturbations so that the
# walk can both change row geometry and break repeated contacts.
if trial % 2 == 0:
q[:, :2] += rng.normal(0.0, 0.0038, (n, 2))
if trial % 7 == 6:
q[:, :2] += rng.normal(0.0, 0.0018, (n, 2))
q = polish(_repair(q)) if not np.all(_constraints(q) >= -2e-8): continue value = float(np.sum(q[:, 2])) elite.append((value, q.copy()) if len(elite) > 32: elite.sort(key=lambda item: item[0], reverse=True) elite = elite[:24]
Geometrically cool the acceptance band, then restart it. The
# threshold is deliberately small relative to the incumbent margin.
phase = trial % 14
temperature = 0.00055 * (0.18 ** (phase / 13.0))
if value >= walker_value - temperature:
walker, walker_value = q, value
if value > incumbent_value: incumbent, incumbent_value = q, value best, best_value = q, value
Prevent a sequence of accepted downhill moves from abandoning the
# best basin family altogether.
if walker_value < incumbent_value - 0.003:
walker = incumbent.copy()
walker_value = incumbent_value
The LP iterations use tangent half-spaces, so they can stop at a
# nonsmooth active-set point. SLSQP can jointly adjust centers and
# radii across the exact circular constraints.
refined = nonlinear_polish(best)
if (
np.all(_constraints(refined) >= -2e-8)
and np.sum(refined[:, 2]) > np.sum(best[:, 2])
)
Circle Packing (n = 26): Python source (lines 241–351) (continued)
335 ): 336 best = refined 337 338 return best 339 340 341 # EVOLVE-BLOCK-END 342 343 344 # This part remains fixed (not evolved) 345 def run_code(): 346 ""Run the circle packing constructor for n=26"" 347 circles = construct_circles() 348 sum_radii = float(np.sum(circles[:, 2])) 349 return circles, sum_radii 350 351
K.11. Circle Packing (n = 32): multiple layouts recover the reference score
The program explores five- and six-row layouts with SLSQP, then alternates linear optimization of radii at fixed centers with joint center–radius refinement. Small perturbations and restarts yield a sum of radii of 2.939572771209394. An independent replay passes the evaluator’s boundary and non-overlap checks; the score matches the reference within .
Circle Packing (n = 32): Python source (lines 1–120)
EVOLVE-BLOCK-START
""Constructor-based circle packing for n=32 circles"" import numpy as np
def construct_circles(): """Optimize 32 centers and radii from several staggered six-row layouts.""" from scipy.optimize import minimize, linprog
n = 32 layouts = ( # Six-row staggered layouts, including several asymmetric variants. (5, 6, 5, 5, 5, 6), (6, 5, 5, 6, 5, 5), (5, 5, 6, 5, 6, 5), (6, 6, 5, 5, 5, 5), (6, 5, 6, 5, 5, 5), (6, 5, 5, 5, 6, 5), (6, 5, 5, 5, 5, 6), (5, 6, 6, 5, 5, 5), (5, 5, 5, 6, 6, 5), # Five-row layouts have larger vertical freedom and can form # nonuniform-radius packings unavailable to six-row starts. (6, 7, 6, 7, 6), (7, 6, 7, 6, 6), (6, 6, 7, 6, 7), ) pairs = np.asarray( [(i, j) for i in range(n) for j in range(i + 1, n)], dtype=int, )
def margins(v): p = v.reshape(n, 3) x, y, r = p.T a, b = pairs.T d = p[a, :2] - p[b, :2] return np.r_[ x - r, y - r, 1.0 - x - r, 1.0 - y - r, np.sum(d * d, axis=1) - (r[a] + r[b]) ** 2, ]
Circle Packing (n = 32): Python source (lines 1–120) (continued)
rng = np.random.default_rng(1947)
def safe_initial_radii(points): """Build strictly feasible radii from wall and nearest-center clearances.""" wall = np.min(np.column_stack([ points[:, 0], points[:, 1], 1.0 - points[:, 0], 1.0 - points[:, 1] )), axis=1) delta = points[:, None, :] - points[None, :, :] dist = np.sqrt(np.sum(delta * delta, axis=2)) np.fill_diagonal(dist, np.inf) near = np.min(dist, axis=1) return 0.48 * np.minimum(wall, near)
best = None best_sum = -np.inf
for layout in layouts: centers = [] for row, count in enumerate(layout): y = (row + 0.5) / 6.0 shift = 0.012 if row & 1 else -0.012 for col in range(count): centers.append(((col + 0.5) / count + shift, y)) centers = np.asarray(centers)
starts = [ np.c_[centers, np.full(n, 1.0 / 12.0 - 1e-5)] ] # Use both aggressive equal-radius starts and strictly feasible # radius starts. The latter avoid wasting SLSQP iterations repairing # overlap violations in strongly perturbed geometries. for k in range(16): sigma = 0.004 + 0.0025 * (k % 5) radius = 0.054 + 0.0025 * (k % 4) q = np.clip( centers + rng.normal(0.0, sigma, centers.shape), 0.035, 0.965, ) starts.append(np.c_[q, np.full(n, radius)]) if k % 3 == 0: starts.append(np.c_[q, safe_initial_radii(q)])
for start in starts: result = minimize( lambda v: -np.sum(v[2::3]), start.ravel(), method="SLSQP", bounds=[(0.0, 1.0), (0.0, 1.0), (1e-8, 0.25)] * n, constraints={"type": "ineq", "fun": margins}, options={"maxiter": 1000, "ftol": 2e-10, "disp": False}, ) candidate = result.x.reshape(n, 3) value = float(np.sum(candidate[:, 2])) if np.min(margins(candidate)) >= -3e-7 and value > best_sum: best, best_sum = candidate, value
Search additional basins using feasible jittered and coherently deformed
# versions of the strongest row-layout solution. Coherent deformation is
# useful because independently moving a circle can destroy many contacts.
if best is not None:
base = best[:, :2].copy()
for k in range(30):
if k % 3 == 0:
# Small affine shear/stretch around the square center.
a = rng.normal(0.0, 0.018)
b = rng.normal(0.0, 0.018)
sx = 1.0 + rng.normal(0.0, 0.025)
sy = 1.0 + rng.normal(0.0, 0.025)
q = base - 0.5
q = np.column_stack((
Circle Packing (n = 32): Python source (lines 1–120) (continued)
115 sx * q[:, 0] + a * q[:, 1], 116 sy * q[:, 1] + b * q[:, 0], 117 ) + 0.5 118 q += rng.normal(0.0, 0.0025, q.shape) 119 else: 120 sigma = 0.0025 + 0.0025 * (k % 6)
Circle Packing (n = 32): Python source (lines 121–240)
q = base + rng.normal(0.0, sigma, base.shape)
q = np.clip(q, 0.015, 0.985) trial = np.c_[q, safe_initial_radii(q)] result = minimize( lambda v: -np.sum(v[2::3]), trial.ravel(), method="SLSQP", bounds=[(0.0, 1.0), (0.0, 1.0), (1e-8, 0.25)] * n, constraints={"type": "ineq", "fun": margins}, options={"maxiter": 1250, "ftol": 1e-11, "disp": False}, )
candidate = result.x.reshape(n, 3) if np.min(margins(candidate)) >= -3e-7: value = float(np.sum(candidate[:, 2])) if value > best_sum: best, best_sum = candidate, value
Threshold-accepting walk over nearby packing basins. Unlike the
incumbent, the walker may accept a small decrease in sum of radii,
allowing it to cross shallow barriers between contact graphs.
if best is not None: walker = best.copy() walker_sum = float(np.sum(walker[:, 2]))
for k in range(32): # Cycle from exploratory to conservative thresholds. phase = k % 8 threshold = 8e-4 * (0.35 ** phase)
q = walker[:, :2].copy() if k % 4 == 0: # Coherent affine deformation preserves the broad structure. a, b = rng.normal(0.0, 0.025, 2) sx, sy = 1.0 + rng.normal(0.0, 0.035, 2) z = q - 0.5 q = np.column_stack(( sx * z[:, 0] + a * z[:, 1], sy * z[:, 1] + b * z[:, 0], ) + 0.5 q += rng.normal(0.0, 0.002, q.shape) elif k % 4 == 1: # Small rigid rotation around the square centre. angle = rng.normal(0.0, 0.035) c, s = np.cos(angle), np.sin(angle) z = q - 0.5 q = np.column_stack(( c * z[:, 0] - s * z[:, 1], s * z[:, 0] + c * z[:, 1], ) + 0.5 q += rng.normal(0.0, 0.0025, q.shape) else: sigma = 0.002 + 0.002 * (k % 5) q += rng.normal(0.0, sigma, q.shape)
q = np.clip(q, 0.015, 0.985) trial = np.c_[q, safe_initial_radii(q)] result = minimize( lambda v: -np.sum(v[2::3]), trial.ravel(), method="SLSQP", )
Circle Packing (n = 32): Python source (lines 121–240) (continued)
bounds = [(0.0, 1.0), (0.0, 1.0), (1e-8, 0.25)] * n, constraints = {"type": "ineq", "fun": margins}, options = {"maxiter": 1300, "ftol": 1e-11, "disp": False}, )
candidate = result.x.reshape(n, 3) if np.min(margins(candidate)) < -3e-7: continue
value = float(np.sum(candidate[:, 2])) if value > best_sum: best, best_sum = candidate.copy(), value
Walk locally through near-optimal states, but periodically
return to the record if a trial falls too far behind.
if value >= walker_sum - threshold: walker, walker_sum = candidate.copy(), value elif value < walker_sum - 3.0 * threshold: walker, walker_sum = best.copy(), best_sum
if best is None: row_counts = (5, 5, 5, 5, 6, 6) centers = np.asarray([ ((col + 0.5) / count, (row + 0.5) / 6.0) for row, count in enumerate(row_counts) for col in range(count) ]) return np.c_[centers, np.full(n, (1.0 / 12.0) * (1.0 - 1e-7))]
def optimize_fixed_radii(points): """Maximize the sum of radii for fixed centers using a linear program.""" upper = np.min( np.column_stack([ points[:, 0], points[:, 1], 1.0 - points[:, 0], 1.0 - points[:, 1] )), axis=1, )
For fixed centers, every non-overlap condition is linear in r:
r_i + r_j <= ||p_i-p_j||.
m = n * (n - 1) // 2 A = np.zeros((m, n)) b = np.empty(m) k = 0 for i in range(n): for j in range(i + 1, n): A[k, i] = 1.0 A[k, j] = 1.0 b[k] = np.linalg.norm(points[i] - points[j]) k += 1
result = linprog( -np.ones(n), A_ub=A, b_ub=b, bounds=[(1e-10, float(u)) for u in upper], method="highs", )
if not result.success:
Circle Packing (n = 32): Python source (lines 241–360)
return best
candidate = np.column_stack((points, result.x))
Remove only a negligible numerical margin after the LP.
candidate[:, 2] *= 1.0 - 2e-10 if np.min(margins(candidate)) >= -1e-10: return candidate return best
Circle Packing (n = 32): Python source (lines 241–360) (continued)
refined = optimize_fixed_radii(best[:, :2]) if np.sum(refined[:, 2]) > np.sum(best[:, 2]): best = refined
def slp_polish(state): """Improve centers and radii through feasible tangent-plane LP steps.""" p = state[:, :2].copy() r = state[:, 2].copy()
Create a tiny strict-feasibility buffer so that the zero step
# remains feasible despite LP/SLSQP roundoff.
r *= 1.0 - 2e-8
for trust in (0.012, 0.008, 0.005, 0.003, 0.0015, 0.0007): for _ in range(8): nv = 3 * n rows = [] rhs = []
Box constraints, written in delta variables.
for i in range(n):
row = np.zeros(nv)
row[3 * i + 0] = -1.0
row[3 * i + 2] = 1.0
rows.append(row)
rhs.append(p[i, 0] - r[i])
row = np.zeros(nv) row[3 * i + 1] = -1.0 row[3 * i + 2] = 1.0 rows.append(row) rhs.append(p[i, 1] - r[i])
row = np.zeros(nv) row[3 * i + 0] = 1.0 row[3 * i + 2] = 1.0 rows.append(row) rhs.append(1.0 - p[i, 0] - r[i])
row = np.zeros(nv) row[3 * i + 1] = 1.0 row[3 * i + 2] = 1.0 rows.append(row) rhs.append(1.0 - p[i, 1] - r[i])
Tangent lower bounds for every pairwise distance.
for i in range(n):
for j in range(i + 1, n):
diff = p[i] - p[j]
d = float(np.linalg.norm(diff))
if d < 1e-14:
continue
u = diff / d
row = np.zeros(nv) row[3 * i + 0] = -u[0] row[3 * i + 1] = -u[1] row[3 * j + 0] = u[0] row[3 * j + 1] = u[1] row[3 * i + 2] = 1.0 row[3 * j + 2] = 1.0 rows.append(row) rhs.append(d - r[i] - r[j])
bounds = [] for i in range(n): bounds.extend([ (-trust, trust), (-trust, trust), (-float(r[i]) + 1e-11, 0.25 - float(r[i])), ])
Circle Packing (n = 32): Python source (lines 241–360) (continued)
lp = linprog( np.tile([0.0, 0.0, -1.0], n), A_ub=np.asarray(rows), b_ub=np.asarray(rhs), bounds=bounds, method="highs", )
if not lp.success: break
step = lp.x.reshape(n, 3) gain = float(np.sum(step[:, 2])) if gain <= 1e-11: break
p += step[:, :2] r += step[:, 2]
out = np.column_stack((p, r))
Remove only a negligible common factor for strict evaluator
feasibility after the final floating-point LP step.
out[:, 2] *= 1.0 - 3e-9 return out
polished = slp_polish(best) if np.min(margins(polished)) >= -2e-9: if np.sum(polished[:, 2]) > np.sum(best[:, 2]): best = polished
SLP changes the centers, so solve the fixed-center radius LP again.
This restores exact radius optimality for the polished geometry.
polished_radii = optimize_fixed_radii(polished[:, :2]) if np.sum(polished_radii[:, 2]) > np.sum(best[:, 2]): best = polished_radii
Perform additional small-basin restarts from the polished incumbent.
These perturbations are deliberately much smaller than the earlier
exploratory walk, targeting improvements that SLSQP may miss because
the incumbent lies on a nearly degenerate contact graph.
Circle Packing (n = 32): Python source (lines 361–455)
polished_base = best[:, :2].copy() for k in range(120): q = polished_base.copy()
if k % 10 == 0: # Apply a coherent deformation to preserve the broad packing # while changing the active contact graph. z = q - 0.5 shear_x, shear_y = rng.normal(0.0, 0.016, 2) scale_x, scale_y = 1.0 + rng.normal(0.0, 0.016, 2) q = np.column_stack(( scale_x * z[:, 0] + shear_x * z[:, 1], scale_y * z[:, 1] + shear_y * z[:, 0], )) + 0.5 q += rng.normal(0.0, 0.0012, q.shape) else: # A wider schedule occasionally leaves the current contact basin, # while the smallest scales continue to refine tangent neighbors. sigma = 0.0002 + 0.0005 * (k % 10) q += rng.normal(0.0, sigma, q.shape)
q = np.clip(q, 0.012, 0.988) trial = np.c_[q, safe_initial_radii(q)]
result = minimize( lambda v: -np.sum(v[2::3]), trial.ravel(), )
Circle Packing (n = 32): Python source (lines 361–455) (continued)
method="SLSQP", bounds=[(0.0, 1.0), (0.0, 1.0), (1e-8, 0.25)] * n, constraints={"type": "ineq", "fun": margins}, options={"maxiter": 1500, "ftol": 5e-12, "disp": False}, ) candidate = result.x.reshape(n, 3)
if np.min(margins(candidate)) < -3e-7: continue
Re-optimize the radii exactly for the newly found centers. This
removes any SLSQP radius suboptimality before comparing incumbents.
candidate_lp = optimize_fixed_radii(candidate[:, :2]) if np.min(margins(candidate_lp)) >= -1e-8: if np.sum(candidate_lp[:, 2]) > np.sum(best[:, 2]): best = candidate_lp
return best
def compute_max_radii(centers): """ Compute the maximum possible radii for each circle position such that they don't overlap and stay within the unit square. Args: centers: np.array of shape (n, 2) with (x, y) coordinates Returns: np.array of shape (n) with radius of each circle """ n = centers.shape[0] radii = np.ones(n)
First, limit by distance to square borders
for i in range(n):
x, y = centers[i]
# Distance to borders
radii[i] = min(x, y, 1 - x, 1 - y)
Then, limit by distance to other circles
# Each pair of circles with centers at distance d can have
# sum of radii at most d to avoid overlap
for i in range(n):
for j in range(i + 1, n):
dist = np.sqrt(np.sum((centers[i] - centers[j]) ** 2))
If current radii would cause overlap
if radii[i] + radii[j] > dist:
# Scale both radii proportionally
scale = dist / (radii[i] + radii[j]) * 0.99 # 0.99 for safety margin
radii[i] *= scale
radii[j] *= scale
return radii
EVOLVE-BLOCK-END
This part remains fixed (not evolved)
def run_code(): """Run the circle packing constructor for n=32""" circles = construct_circles() sum_radii = float(np.sum(circles[:, 2])) return circles, sum_radii
K.12. Discovered Objects
Figures 16–20 visualize the routed quantum circuits, trajectories, denoised gene expression, scaling laws, and mathematical objects produced by the best programs, alongside those from the programs or constructions released by SimpleTES. They are redrawn from saved outputs; the mathematical objects come from re-running each best program, which reproduces its reported score exactly.
(a) Input: alu-v0_27
5 active logical qubits

(b) SimpleTES
17 CNOTs + 2 SWAPs

(c) EvoDuet
17 CNOTs + 1 SWAP

Gate order →
Figure 16: Routed quantum circuits on Q20. (a) The alu-v0_27 input circuit. (b, c) Outputs of the released SimpleTES program and EVODUET's best program under matched replay settings. Colored bands highlight inserted SWAPs: two for SimpleTES and one for EVODUET. All gates are shown; only idle wires are omitted. Labels and denote logical qubits and physical sites, respectively.
(a) Rosetta → 67P adds a Mars flyby

(b) Voyager 2 → Neptune same encounter sequence
(c) Total


Figure 17: Rosetta and Voyager 2. (a, b) Encounters and dates of the SimpleTES construction and of the best program of EVODUET; diamonds are deep-space maneuvers labelled with their in km/s. (c) Total split into maneuvers and launch or arrival. On Rosetta, EVODUET adds the Mars flyby of the actual mission; on Voyager 2, both follow the same tour and EVODUET moves the arrival onto the end of the window. Planet images: NASA (public domain).
(a) Noisy input
(b) SimpleTES
(c) EvoDuet
(d) Held-out counts

Figure 18: Denoised gene expression. (a) Noisy PBMC input, (b, c) outputs of the released SimpleTES program and EVODUET's best program, and (d) held-out counts. Columns show all 1,087 cells; rows show 24 genes selected for their variability in the input. Gene selection and ordering use only the input, with the same order and color scale across panels. Values are log-normalized per cell. Held-out counts are independent observations and still contain noise.
(a) Parallel scaling
| P=8 | 2.036 | 1.993 | 1.932 | 1.886 | 1.822 | 1.777 |
|---|---|---|---|---|---|---|
| P=4 | 2.054 | 2.013 | 1.951 | 1.904 | 1.839 | 1.794 |
| P=2 | 2.077 | 2.036 | 1.973 | 1.927 | 1.861 | 1.814 |
| P=1 | 2.111 | 2.067 | 2.003 | 1.954 | 1.888 | 1.845 |
| 0.5B | 0.7B | 1.1B | 1.6B | 2.8B | 4.4B |
Pile: parameters N
SimpleTES closer (5/12) ★EvoDuet closer (7/12)
| 1.123 | 1.100 | 1.069 | 1.038 | 1.002 | 0.979 |
|---|---|---|---|---|---|
| 1.135 | 1.112 | 1.081 | 1.049 | 1.013 | 0.991 |
| 1.151 | 1.126 | 1.094 | 1.062 | 1.024 | 1.002 |
| 1.172 | 1.150 | 1.113 | 1.082 | 1.045 | 1.021 |
| 0.5B | 0.7B | 1.1B | 1.6B | 2.8B | 4.4B |
Stack: parameters N
SimpleTES
EvoDuet
(b) Domain mixture

Held-out
SimpleTES 0.996922
EvoDuet 0.997062
24 mixtures × 5 domains
SimpleTES
EvoDuet
Held-out
SimpleTES 0.999970
EvoDuet 0.999975
(c) Held-out error

Figure 19: Parallel Scaling and Domain Mixture. (a) Observed loss on the grid of parameter count and parallel streams for the two Parallel datasets (darker cells indicate lower loss within each dataset); the dashed row () is held out, and a star marks the law that predicts that cell more closely (EVODUET in 7 of 12). (b) Predicted against actual held-out loss on Domain Mixture. (c) Held-out on a log scale. Both margins are small.
(a) Erdős minimum overlap
Published 512-step witness, locally refined
SimpleTES is close to ;

(c) Sums and differences
First 120 shifted integers; full spans: [0, 1785] and [0, 1793]
(b) Hadamard: order-29 matrices
Both:
Normalized score: 0.935673

SimpleTES
+1 (406) -1 (435)

EvoDuet
+1 (449) -1 (392)

| range | |A| | |A+A| | |A-A| | C(A) |
|---|---|---|---|---|
| [-487, 1298] | 506 | 3551 | 2775 | 1.144887 |
| [0, 1793] | 509 | 3575 | 2793 | 1.144999 |
Figure 20: Mathematical objects. (a) The Erdős step function of EVODUET, which is the published witness the run located and polished, against the SimpleTES construction. (b) The two order-29 matrices, which reach the same determinant. (c) The two sum-difference sets; EVODUET scores 1.144999, exceeding the released post-training SimpleTES set (1.144887).