ShinkaEvolve: Towards Open-Ended and Sample-Efficient Program Evolution
Authors: Robert Tjarko Lange
Yuki Imajuku
Edoardo Cetin
Venue: ICLR 2026 Poster (2026)
Keywords: Evolution
LLMs
Scientific discovery
Primary area: foundation or frontier models, including LLMs
TL;DR: We introduce a new framework using LLMs to advance automated scientific discovery with SotA efficiency and significant results across engineering and scientific fields.

Abstract: We introduce ShinkaEvolve: a new framework leveraging large language models (LLMs) to advance scientific discovery with state-of-the-art performance and efficiency. The field of LLM-driven scientific discovery has seen significant progress, but has yet to overcome a critical limitation: sample inefficiency, requiring thousands of samples to identify effective solutions. ShinkaEvolve takes a concrete step towards addressing this critical limitation by introducing three key innovations: a parent sampling technique balancing exploration and exploitation, code novelty rejection-sampling for efficient search space exploration, and a bandit-based LLM ensemble selection strategy. When applied to the canonical circle-packing optimization task, ShinkaEvolve discovers a new state-of-the-art circle packing solution using only 150 samples, orders of magnitude fewer than prior frameworks. Furthermore, applied to a broader set of engineering problems, ShinkaEvolve designs robust agentic harnesses for AIME mathematical reasoning tasks, identifies improvements to ALE-Bench competitive programming solutions, and discovers novel mixture-of-expert load balancing loss functions to stabilize LLM training itself. We provide ShinkaEvolve's full code together with this submission, which will be open-sourced to accelerate open advancements to open-ended automated discovery across diverse computational problems.

Published as a conference paper at ICLR 2026
SHINKAEVOLVE: TOWARDS OPEN-ENDED AND
SAMPLE-BFFICIENT PROGRAM EVOLUTION
Robert Tjarko Lange"
Yuki Imajuku Sakana Al ima jaaajukkuaaaaaa
Edoardo Cetin
Sakana AI robe rt sa kana.
Sakana Al
ABSTRACT
We introduce SHINKAEVOLVE: a new framework leveraging large language mod- els (LLMs) to advance scientific discovery with state-of-the-art performance and efficiency. The field of LLM-driven scientific discovery has seen significant progress, but has yet to overcome critical limitation: sample inefficiency, requir- ing thousands of samples to identify effective solutions. SHINK takes concrete step towards addressing this critical limitation by introducing three key innovations: a parent sampling technique balancing exploration and exploita- tion, code novelty rejection- sjjeciionsaamling for efficient search space exploration, and bandit-based LLM ensemble selection strategy. When applied to the canonical cirele-packing optimization task. SHINKAEVOLVE discovers a new ttate-of-the art circle packing solution using only 150 samples, orders of magnitude fewer than prior frameworks. Furthermore, applied to a broader set of engineering problems, ShinkaEvolve designs robust agentic harnesses for AIME mathematical rea- soning tasks, identifies improvements to ALE-Bench competitive programming solutions, and discovers novel mixture-of-expert load balancing loss functions stabilize LLM training itself. We provide MUINKAEVOLVESS full code together with this submission, which will be open-sourced to accelerate open advance- ments to open- open-ended automated discovery across diverse computational problems.
INTRODUCTION
Comparison of Methods on Circle Packing
Task Evaluator
2.61223
Packing Solution
2,62000
282575
LLM
Sample Parent Context
Feedback Archiving
Offspring Generator
2.6500
2.64755
GoenCvotve
2.6459
LLMAD
Offspring Program
Novelty
Evaluate Program
Operdediie
Filtering
Program Proposals
Figure 1: High-level overview of SHINKAEVOLAY Left: AVONK constructs archive of evaluated programs, rejection-samples new ones, and evaluates their fitness. Right: SHINKAF- VOLVE outperforms AlphaEwolve's circle packing solution in ofders-of-magnitude fewer iterations.
The rapid advancement of large language models (LLMs) has transformed scientific discovery through agentic systems that autonomously conduct experiments and test hypotheses (Lu et al.) 2024b Yamada et al., 2025 Novikov et al.) 2025 Zhang et al.) 2025). These frameworks leverage LLMs as sophisticated mutation operators, iteratively refining candidate solutions with successful variants propagating through successive generations. This methodology has proven effective across domains such as competitive programming (Li et al. [2022), mathematical optimization (Romera- Paredes et al.] 2024), and automated agentic design (Hu et al. 2024). However, current implementa- tions face significant practical limitations. The primary challenge is substantial sample inefficiency
Rooeert initiated and led the project; Robert and Edoardo were core code contributors. See Section 6 for detailed information. The code is available under http:://ptaaaccomssssaaa///aaaaa

---

Published as a conference paper at ICLR 2026
existing approaches typically require thousands of evaluations, making them computationally ex- pensive and time-consune cons-minn This inefficiency stems from naive exploration strategies that fail to effectively leverage accumulated knowledge from previous generations. SHINKAEVOLVE addresses these challenges through three key algorithmic innovations that work synergistically to enhance sam- ple efficiency. Our adaptive parent and LLM sampling intelligently balances exploration of novel regions with exploitation of known high-quality areas. Next, our code proposal novelty rejection sampling ensures efficient program mutations. Finally, our bandit-based LLM selection strategy dynamically adapts to the evolving state of the sampled archive parents and inspiration programs. Experimental validation across diverse domains demonstrates substantial improvements in both ef- ficiency and solution quality, with SHINKAEVOLA of magnitude fewer evaluations than existing approaches. SHINK EVOOLE''s full code, provided with this submission, will be open-sourced to accelerate open advancements to automated discovery across a broader range problems. In summary:
achieving lfte-of-theeart results using orders
1. We introduce SHINKAEVOLY novations: a novel parent program sampling strategy, code novelty rejection-sampliag and adaptive performance- baased LLM ensemble selection.
evolutionary framework with three key algorithmic in-
2. We compare SHINKAEVOLVE with prior frameworks on the canonical circle- secell-ppciingge task, achieving state-of- the-an art results with orders-of cffers-of-maaeee --agnntude fewer iterations.
3. We demonstrate SHINKAE ability to innovate beyond human and LLM- -LM-generated solutions across three additional engineering domains: agentic scaffolding (AIME), com- petitive programming (ALE-Bench) and LLM training design (mixture-of-exppl loss).
RELATED WORK
Evolutionary Code Optimization with L.Mss. One particular flavor of test-time compute evolu- tionary code optimization: the usage, mutation, and recombination of previously generated code to produce new samples. This approach has been used to optimize reward and preference objectives (Lu
al.
2024a Ma et al. (202)), mathematical science code (Romera- Romera--Pareess et al., 2024 and other
applications LLhhman et al. 2022 Lange et al. 2024| Meyerson et al. [023]] Berman 2025 Lange
ct al. 2025). Through prompting, LLMs are used recombination engines (Lange et 2023
Meyerson et al. 2023) capable of simulating crossover between diverse code snippets and the ratio- nales that produced them. These types of program archive-building systems resemble a population-
based LLMMguidee tree search (Jiang et al. 2025 Inoue et al.] (2025). ). Most closely related to our work are AlphaEvolve (Novikow al., (025). OpenEvolve (Sharma (0225). and LLM4AD (Liu al.) 2024a). We advance this line of work, demonstrating unprecedented sample efficiency with our com- bination of perectioon-amplingg... LLM prioritization, and online meta-scratchpad drafting.
Open-Ended Agentic Discovery. The integration of LLMs with open-ended evolutionary princi-
ples enables agentic systems capable of continuous innovation (Stanley et al.) [017]] Zhang et al.,
2025). Unlike traditional novelty search that relies on explicit diversity metrics (Lehman et al.,
2008 Lehman Stanley 201T). L.LM agents leverage learned representations to generate new so-
lutions while maintaining semantic coherence (Faldor al. 2024 Hu et al., [2244] Novikov et al.) 2025). These agents construct evolutionary trees of programs where LLM-guided mutations con- nect related solutions across generations (Lehman et al. 2020). SHINK BHINKAEVOLVE systematically combines stepping stones, suboptimal intermediate solutions that serve as building blocks for break- through innovations, by employing LLM agents to both generate mutations and evaluate program relationships, enabling successful patterns to propagate across search branches rapidly.
3 METHOD
Algorithm Overview. SHINKA control-flow entails three main phases:
1. Parent and inspiration sampling from an archive of island program subpopulations. Impor- tantly, we emphasize the trade-off between exploration and exploitation parent selection.
2. Program mutation via -.L--gd code edit proposals. We utilize novelty rejection- sampling based on code embedding similarity and an --o-----ovely assessment.
3. Program execution and world feedback guiding the LLM ensemble selection probabilities and online meta-scratchpad drafting for documentation and knowledge diffusion.
2

---

Published as a conference paper at ICLR 2026
3.1 PARENT AND INSPIRATION SAMPLING
Archive Maintenance, Island Populations & Mutation Context Construction. AHINKAEYOLVE maintains a fixed-size archive of previously evaluated programs with fitness scores and meta infor- mation, implementing elite size constraint. The mutation context incorporates primary parent program alongside inspiration programs drawn from top-performing solutions and random archive samples, providing the LLM with diverse exemplars for creative recombination. We follow R Paredes et al. (2024); Novikov et al, (2025) and employ an island model approach with independent subpopulations seeded from the same initial program. The islands evolve in parallel diversity and prevent premature convergence. Island members can occasionally migrate between is- lands to diffuse knowledge across "discovery substreams". To protect the uniqueness of each island, we prevent the island-specific best- best-performing program from migrating (Tanese) 1989 Romera- Paredes al. (024). Sampling occurs hierarchically: with the island ID first sampled uniformly from the archive, later used as the origin for both parent and inspirations.
enhance
Balancing Exploration & Exploitation: Parent Program Selection. Given an island subpopula- tion, SHINKAEVOLVE implements multiple different parent sampling strategies that balance explo- ration and exploitation. First, we employ power law sampling where programs are ranked by fitness
with ranks (r: for the best program). The selection probability follows p; ri
Σ5-1 where
controls exploitation intensity. Setting a = 0 yields uniform sampling, while - 0o implements hill-climbing. Inspired by Zhang et al. (2025). we contrast this with weighted sampling, incorpo- rating performance and novelty. Given programs, P., with offspring count ((P),, we first compute the median fitness ag = median([F(Pa]) F(P2). F(P.)). The performance component uses sigmoid scaling: 8; aA (F(P.) am)) where (x)) I+t and À controls selection pressure. The novelty component h; I+N(P.) favors programs with fewer offspring. The final probability Wy where w; S; h, balances performance and novelty. By default,
combines these:
Tc Wy
AHINKAEVOLVE uses the weighted sampling strategy. We provide visual comparison of all these strategies in Segure[belowe
Uniform (a
Hill Climbing (a+ s) Power Law (a 1.0) Weighted (1 10)
>0.030
Performance Score
0.023
samp iin Probbbbl bollllllig
0.5
0.020
0.4
-0015
0.3
0.010
Sang
0.005
10
10
10
10
Number of Offsprings
Number of offsprings
Number of Offsprings Number of Offsprings
Figure 2: SHINKAEVOLVE Parent Sampling. The strategies range from pure exploration (uniform sampling) to pure exploitation (hill-climbing) to a combination of performance and novelty.
3.2 PROGRAM MUTATION AND NOVELTY ASSESSMENT
LLM-Guided Program Mutations. To generate new programs, SHINKAEVOLVE starts by sam- pling a specific LLM and set of sampling parameters (e.g., temperature or reasoning budget) from pre-specified pool. Our framework provides support for models from leading API providers, in- cluding GPT, Gemini, Claude, and DeepSeek (OpenAI) 2023) Team 2025) Anthropic 2024 Guo
al. 2025). After sampling model, SHINKAEVOLY employs three distinct mutation approaches to foster diversity and creativity in the I.L.M-enerated program variants:
1. Diff-Based Edits.
We implement diff edits using LLMs following the approach outlined in Novikov al. (2025), utilizing SEARCH/REPLACE blocks for targeted modifications.
2. Full Rewrites. We enable full program rewrites to allow greater flexibility, programmati- cally ensuring that non-mutable blocks remain unchanged during the LLM rewrite process.
3. Crossover Mutation. We leverage crossover mutations (Lehman et al. 2022 Lange et al.)
2025) where an L.M is prompted to combine the parent and an additional archive program.
3

---

Published as a conference paper at ICLR 2026
& EVOLVE-BLOCCKENNU to ensure that immutable code is not changed during LLM rewrites. After code change proposal, enforce that the immutable code is not touched and resample pro- posal if patch is invalid, providing parsing feedback using Reflexion (Shinn et al. 2024).
Following Novikov et al. 2025
use text markers (EVOLVE-BLOCK-STAE
Program Diversity via Novelty Rejection Sampling. To enhance the creativity of executed code proposals, leverage LLM ensemble combined with temperature sampling. Additionally, introduce code novelly rejection sampling using an embedding model to embed mutable parts of the program code. Afterwards, programs. If the maximal score exceeds threshold (e.g.. 0.95), we query an LLM to further assess whether the program is meaningfully different. The approach is illustrated in Figure
compute cosine similarity scores across the island subpopulation
Resample new proposal program
Embed
Similarity
Thresh
Max
LLM-as-a-code-
novelty-judge
Figure 3: CHINKAEVOLYY Program Novelty Rejection Sampling. SHINKAEVOLVE embeds mutable code snippets, computes similarities across the archive; if the maximal score exceeds threshold, another LLM is queried to assess whether the program is meaningfully novel.
3.3 EXECUTION AND WORLD FEEDBACK
Multi-Objective Optimization & Textual Feedback. After program obtained with the above steps is executed, SHINKAEVOLVE, performs multi-objective assessment yielding both its scalar fit- ness value together with set of exposed "public metrics" and textual feedback. SHINKAEVOLY then stores this full multi-objective assessment in the population archive to provide an informative context for future generations of language model mutations using simple prompting format:
Example of Diff Edit Prompt with Textual Feedback
Curcent program
Beze 15 the current progron ve are trying to improve tyou will need to propose a modicication to it below! L'ggangggge
[esde_ccateat]
Bere are the performance netrics of the progeam: [p:rtornancemetrrica [text_ poccback
Instruations
Tack
IMFORIANT:
sowzita
entixe program focus targeted improvencats.
Adaptive LLM sampling evolution. The performance of different LLMs to propose mutations can vary across problem domains and based on the current state of the sampled archive par- ents and inspiration programs. SHINKAEVOLVE dynamically adapts to this non-stationarity by evolving the LLM sampling probability throughout at the end of each generation. Our approach based on the UCBI algorithm (Auer et al.] (002), associating each LLM with a visitation counter and estimate of the expected score updated with the performance of its sampled mu- tations. We introduce changes tailored to the domain of LLM-driven discovery. In particular, rather than the absolute fitness of each mutation F(P.). update the LLM distribution using: F(P.)" exp( (max computed as the maximum between its parent program and the initial program in the database, ensur- ing each LLM is evaluated based on its relative improvement to account for the non-stationarity of the program archive. At the same time, the exp(-) and max(-, operations help precisely promote LLMs able to come up with bold, high-risk, high-reward mutations, over "safer" minor improve- ments. We use the tracked statistics over the observed rewards to normalize F(P,)" and ensure invariance to the fitness scale of each domain.
F(P:)': ; 0)) 1, where F(P:)* is the baseline reward for program i
4

---

Published as a conference paper at ICLR 2026
Meta-Scratchpad & Online Refinement. SHINKAEVOLVE implements meta-scratchpad sys- tem that periodically analyzes successful solutions. Every T generations, we summarize the re- cent program evaluations and identify common optimization strategies and design principles. The meta-agent synthesizes insights into actionable recommendations appended to the mutation prompt, providing high-level guidance from accumulated evolutionary experience.
RESULTS
In this Section, we demonstrate how SHINKAE innovations lead to concrete breakthroughs across four relevant scientific and engineering domains. Furthermore, we conclude by providing an in-depth ablation analysis quantifying the significance of each of SHINKAE VOLVE's main compo- nents. To complement the shared code, we also refer the interested readers to Appendix B for full implementation details and hyperparameter configurations together with Appendix D for program listings representing each of SHINKAEVOLVE'S final solutions.
4.1 CIRCLE PACKING: REPRODUCING & IMPROVING ALPHAEVOLVE RESULTS
Task Description. The circle packing optimization problem requires placing 26 circles within unit square such that the sum of their radii is maximized while ensuring no circles overlap and all circles remain fully contained within the square boundary. This constrained optimization challenge combines discrete placement decisions with continuous radius optimization, making it a complex benchmark for evolutionary algorithms. The problem exhibits multiple local optima and requires so- phisticated strategies to discover high-quality solutions without suboptimal space allocation.
SHINkAEVOLeE" Discovery Dynamics. SHINKAEVOLYY EVLVVE was executed for only 150 evolution- generations before finding a state-of-the-ar solution, in contrast to existing approaches using at least thousands of evaluations (Figure D Figure (left) shows the improvement trajectory ex- hibits three distinct phases: an initial rapid improvement phase where the algorithm quickly discov- ers fundamental radii optimization strategies, a sustained exploration phase with incremental gains as more sophisticated techniques emerge (constraint-basee optimization), and final convergence phase where the best solutions are refined through restarts. The tree structure in Figure 4 (right) re- veals how successful innovations propagate through the population, with high- high-performing solutions (green and yellow) serving as parents for subsequent generations. Notably, the algorithm demon- strates sophisticated exploration patterns, with multiple evolutionary branches exploring different alg algorithmic approaches before converging toward the optimal solution path shown in black.
ShinkaEvolve Circle Packing: Improvements
ShinkaEvolve Circle Packing: Program Evolution Tree
Boo Score
Iriil
Dill zsl:
Full Cdtt
Incomet
20
Evolved Performance
Comeatte are Coat
Best Score
Ind vnual
x5
Patn to Bes kode
Curuuabis cost
Number of Evaluated LLM Program Proposalss
Figure 4: SHONKAEVOLVE on Circle Packing Task. Left: SHINKAEVOLVE outperforms AlphaE- volve's solution in less than 150 program evaluations. Right: tree demonstrates the iterative composition of stepping stones into gegh--erforming solutions.
program evolution
SHINKAEVOLVE" Discovered Solution. The final program (Section D.I combines three key innovations: (1) a sophisticated initialization that places circles in a structured golden-angle spiral pattern with strategic corner and edge positioning, (2) a hybrid optimization approach integrating SLSQP gradient-based refinement with simulated annealing for global exploration, and (3) intel- ligent perturbation mechanisms that alternate between local circle movements and global ring ro- tations to escape local optima. The discovered solution employs adaptive temperature scheduling with reheating strategies to prevent premature convergence, while maintaining feasibility through constraint- radius computation. This multi-level approach, from structured initialization through meta-heus heta-hhuriitic exploration to gradient- based polishing. exemplifies how SHINKAEVOLVE discover effective algorithmic compositions that outperform hand-designed baselines.
5

---

Published as a conference paper at ICLR 2026
4.2 AIME: EVOLVING AGENT SCAFFOLDS FOR MATH REASONING
Task Description. We evaluate SHINKAEVOLVE on AIME 2024 (AIM 2024) mathematical rea- soning problems, consisting of 30 challenging competition-level questions requiring sophisticated problem-solving strategies (Hu et al. 2024). The task involves evolving agent scaffold designs constrained to a maximum of IO LLM queries per problem for computational efficiency. Using gpt-4. -nano as the base model, we discover scaffold designs for 75 generations, with each candidate evaluated across three independent runs on the complete question set.
SHINKAEVOLVE'S Discovery Dynamics. SHINKAEVOLVE discovers scaffold designs that sig- nificantly outperform hand-designed baselines, including simple single-query agents and sophisti- cated majority-voting approaches. The search reveals Pareto frontier between efficiency and per- formance (Figure [ left), with 7 LLM queries yielding maximum performance while an alternative scaffold achieves comparable results using the full 10-query budget. We evaluate generalization by testing on 2023 and 2025 AIME problems, displaying different transfer patterns (Figure [ middle): smaller improvements on 2023 problems suggest potential saturation due to training data contam- ination, while larger gains on 2025 problems indicate successful generalization to recent, unseen challenges. Cross-LLM model transfer experiments validate robustness, with successful adaptation to gpt 44 .1 1--mmnn ni, gpt 4 1, and 04 -iini demonstrating that discovered architectures capture generalizable strategies rather than model-specific optimizations (Figure D right).
Scaffool
Trandder
Scaffekd
Dene lçem
Shanobyche
PALLS
Sewrye Beaker
JANS Prodirrs
Agest LantLagpee Mobil
Figure 5:
for Agent Scaffold Design. Left: SHINKAEVOLVE discovers a Pareto frontier between performance and query budget. Middle: The discovered scaffold generalizes to unseen AIME problems. Right: The scaffold boosts performance regardless the underlying LLM.
SHINKAEVOLE''S Discovered Solution. The evolved agent implements three-stage architec- ture leveraging diverse expert personas, critical peer review, and synthesis mechanisms. Three spe- cialized experts generate independent solutions using distinct approaches: meticulous step-by-step reasoner, an intuitive nattern-recognition specialist, and an algorithmic computer science-orientes mathematician, each operating at 0.7 temperature. The second stage introduces critical peer review, where each solution undergoes rigorous scrutiny from skeptical reviewer at low temperature (0.1). The reviewer validates pattern- fies logical flaws, and provides corrections when necessary, significantly improving solution quality. The final synthesis stage employs an editor- in-chief persona operating at zero temperature to analyze all solutions and critiques, identify the most reliable approach, and construct canonical solution. Robust fallback mechanisms resort to majority voting among reviewed solutions, then original so- lutions, ensuring reliable output when components fail. This architecture effectively utilizes 7 LLM calls (3 generation + 3 review + synthesis) even less than the specified 10-call constraint.
reasoning by testing patterns on multiple examples, identi-
4.3 ALE-BENCH: EVOLVING PROGRAMS FOR COMBINATORIAL OPTIMIZATION
Task Description. We apply SHINKAEVOLVE to ALE-Bence LITE Imaaukuu et al. 2025). ). a col- lection of 10 competitive programming contests hosted by AtCoder to test the performance of LLMs on heuristic problems. We explore SHINKAEVOLVV ability to improve high- tigh-performing solutions using the best programming solution from ALE-Agent (Imajuku et al. (0025) as an initial program. We run SHINKAEVOLVE for 50 generations, using the public set score as the fitness function. We then submit and report the score of our final solution to the private test set.
SHINKAEVOLVE'S Discovery Dynamics. SHINKAEVOLVE is able to improve the solutions dis- covered by ALE-Agent by approximately 2.3% across the 10 tasks on average (Figure 6). Fur- thermore, task ahc039, SHINKAEVOLVE'S final solution even outperformed the second place submission on the AtCoder leaderboard. These notable gains came from fine- fine-graine grained refinements that preserved the high-level algorithmic structure to ALE--Agent's solutions.

---

Published as a conference paper at ICLR 2026
Shinka Evolive Improvements of ALE-Agent Solutions
Shinkafivolve Private Performance Score (10 ALE-Bench Tasks)
Mean Score (3a (Lt-ALLa ALt- Lite Tarkel
1925
1040
19223
19719
2300
1200
2500
2250
2300
1262
3750
1448-
3500
1830
3250
ALE-Agent
Lanka
Shinks Public (Top-31
Shaia Priveks
shol13
alro24
awars
aloo2
ahoo27
alnak
Dest
Public 1Top-11
Figure 6: SHINKAEVOLVE for Improving ALE-Bench solutions. Left: SHINKAEVOLV' im- proves ALE-Agent's solution by ~ 2.3%. Right: On one task, ahc039, the solution improved from 5th to 2nd place submission on the AtCoder leaderboard if had participated in the contest.
SHINKAEVOLVE* Discovered Solution. We focus on two tasks to illustrate the discovered im- provements of SHINKAEVOLVE, ahc039 and ahc025. The objective of ahc039 to find an optimal, axis-aligned polygon maximize the number of mackerels it contains minus the number of sardines, subject to given constraints. The base solution by ALE-Agent applies simulated an- nealing with kd-tree data structure (5th, 2880 performance). SHINKAEVOLVE further improved the solution (2nd, 3140 performance) by introducing modifications such as caching the validation pro- cess and enhancing neighborhood operators. For the caching, the kd-tree was augmented to cache subtree statistics, including bounding boxes and fish counts, at each node. For the neighborhood operators, a novel "targeted edge move" was introduced, which heuristically identifies a misclassi- fied fish (e.g.. mackerel outside the polygon) and greedily moves the nearest edge to correct its state. These changes strengthened the directionality of the search. For ahc025, the task to use a balance scale to compare the total weights of any two subsets of items, aiming, after a fixed number of weighings, to partition the items into groups with as equal total weights as possible. SHINKAE- VOLVE improved the ALE-Agent's simulated annealing baseline by introducing faster caching, fining fallback weight estimation, and ultimately replacing simulated annealing with a more focused optimization combining greedy moves and targeted local search. Comparison with top human solu- tions suggests that for many tasks, there is ample room for improvement. Furthermore, often times SHINKAEVOLVE tended explore modifications staying close to the ALE-Agent's solution. This indicates the potential of overfitting to the initialization solution.
4.4 LLM TRAINING: EVOLVING LOSSES FOR BALANCED AND EFFECTIVE EXPERTS
Task Description. The Mixture-of Expert (MoF) architecture (Szymanski & Lemmon 1993
Shazeer et al.| 2017 Lepikhin et al. 2020: Fedus et al.) 2022) has been a critical advancement, flagship models (Google Al Blog 2024 Guo ctt al. 2025 Meta-Al 2025) Yang et al. 2025 Team 2025). The basic idea is simple: replace tradi- tional large fed-foowwrd residual blocks with ensembles of efficient smaller modules (the "experts"" that can each specialize in distinct problem domains (Fedus et al. 2022). For each MoE layer and token, only the outputs of the top-K experts selected by router classifier splitting the computation and making both training and inference cheaper and faster. However, due to the non-diiferentiability of the top-K expert selection operation, it is critical provide the router with an auxiliary load balancing loss (LBL). which serves to avoid early collapse toward uneven expert distribution of the token load. We deploy SHINKAEVOLVE precisely to tackle this open architectural design challenge, which has been one core focus driving recent MoE advancements (Shazeer et al. 2017 Fedus et al.) (2022, Du et al. 2022 Zoph et al., 20022, Xue et al.] [2024] Dai et al.] 2024 Qiu et al., 2025 Muennighoff et al. 2024):: Devising an effective load balancing loss to incentivize efficiency and specialization, without hindering the model's expressivity.
ubiquitous amongst modern open and closed-
computed, effectively
Evo.k'EooL Discovery Dynamics. We ground the problem of LBI. design by pretraining MoE model with 556M parameters, Ng = 64 total experts of which only K = 8 active for any given token. This results in only 82M parameters sparsely activated in each forward pass, excluding the token embeddings. We train this small model on over 2B tokens from fineweb (Penedo et al. 2024) by minimizing the MoE loss function, computed by adding the LBL, weighted by = 0.0I, to the model's 's cross-entropy loss (CE). The fitness function of each program then measures simple objective: minimize the sum of the final CE together with the model's 's overall "load imbalance" as measured by the I.I deviation from uniform distribution of tokens between the MoE experts. Given

---

Published as a conference paper at ICLR 2026
the cost of pretraining, we run SHINKAEVOLVE for only 30 iterations. We evaluate the generality of SHINKAEVOLVE'S s best-performing solutions by training a much larger MoE with 2.7B parameters on slightly under 30B fineweb tokens across three LBL coefficients À E {0.001, 0.01, 0.1), yielding different levels of regularization. We compare this solution against the "global-bated L.BI" used to train some of the most popular open L.LMs (Yang al.. 2025), in terms of final perplexity (Figure left) and end task performance (Figure 7 center) as evaluated across different downstream bench-
2019 Mihaylov al. 2018 Bisk al., 2020 Sap al. marks (Talmor al. 20118] Zellers et al.
2019 Sakaguchi et al. | et al. 2018). We provide our results below as function of load
imbalance, showing that SHINKAEVOLVE'S new loss achieves a consistent edge across our training
configurations, growing larger with the value of the À coefficient.
Task Performance vs. Token Routing
Model Perplexity vs. Token Routing
Loss Gradient Comparison
ue Improvement (%)
2.140
2.34
Loss Gredent lms
Relettve improvmment
2.30
Roa
Perpleatty
231
Stikkoteobec LSt.
2330
2700
0.2
Missrouted Tokon Fraction Bog scale, Invorted)
Expert
Figure 7: SHINKAEOOLE for discovering -ixture-of-Experts Load Balancing Loss Func-
tions. Left: Downstream task performance across seven benchmarks. Middle: Final perplexity across missroute fraction levels. Right: Load imbalance gradient as a function of token allocation.
SHINKAEVOLVE's Discovered Solution. The discovered LBL is a new twist on the established global-batch LBL, which was used for seeding the evolutionary search. SHINKAEVOLVE comple- ments this popular LBL with a new term, specifically targeted toward regularizing the MoE layers with individual sedr--specillized experts. Concretely, let fe,; and Pt, correspond to the selection frequency and the average router probabilities for each expert located in layer ?. SHINKAEVOLVE'S ((P)) log NE
LBL uses a normalized complement to the entropy in each layer s(P) = 0.5 +
and
minimum usage threshold target T 0.064/N /Ng g to compute:
1 N LLBL = NE I
NB max
0.1
fes Pe. +
s(P)) 1=1
8=1
Global butch LBL
SHINKAEVOLVE new regulatization
The effects of SHINKAEVOLVE'S new regularization term can be seen through its induced gradients acting on the router's token allocation in a simplified two-expert scenario (Figure 7 right). Intu- itively, this term affects the MoE router of any layer where experts allocated fraction of tokens less than т. The multiplier s(?t) strengthens this push when the layer's 's routing entropy H (Pt) is low and the router concentrates on few dominating experts. This closes a blind spot of the global- batch LBL: the dot product f-P can look "balanced" even if few experts are barely touched. Thus, this term can be seen as a safety net that adaptively activates and vanishes once an expert crosses the floor, preventing dead experts and avoiding over-regularizing well-balanced layers. We refer to Appendix [B] for further results and an extended discussion on how AVOLKE differs from prior approaches.
ABLATIONS & ANALYSIS
Impact of Parent Selection Strategies. To understand the importance of parent selection, we compare different strategies for choosing which programs to evolve. The Best-of-N bascline ignores the evolutionary history, always using the initial program as parent without feedback. In contrast, Hill Climbing represents greedy approach that only selects the parent for mutations. Our proposed Weighted Sampling strategy balances exploration and exploita- tion by probabilisticaly selecting parents based on their fitness and number of offspring.
program as the
Takeaways. Weighted sampling consistently outperforms random search and hill climbing across all tasks. Hill climbing shows strong initial performance but plateaus quickly, while weighted sam-
8

---

Published as a conference paper at ICLR 2026
Ablation: Parent Selection Strategy
Ablation: LLM Ensemble Prioritization
Ablation: Novelty Rejection Sam Sampling
2.7
2.5
255
24
2.4
2.4
2.3
2.3
Evoled
Best-of-i
Rejection
HBll
2.1-
Mede Ersemble
2.3-
Thancettd Rejection
Nevellyy Whighize
Sandi Pilriizztton
20
42
60
200
120
240
2.0
50 85
200
12c
140
2.0
50 80
200
120
240
Number Dratusted LLM Program Proposals
Number Evatusted LLM Program Proposals
Number Evalussde LUM Frogram Proposals
Method Ablation Studies on Circle Packing, Left: Weighted parent sampling outperforms random search and hill climbing. Middle: Bandit-based LLM ensembling slightly improves the performance over a fixed uniform ensemble distribution. Right: Embedding- based rejection sampling with LLM as a novelty judge strongly outperforms no rejection sampling.
Figure 8: SHINKAEVOLYY
pling maintains steady improvement throughout evolution. Random search demonstrates the poorest convergence, highlighting the importance of leveraging tiness-basedd parent selection.
Impact of LLM Ensembling and Prioritization. Evolutionary agents can benefit from diverse coding capabilities by leveraging multiple LLMs. We investigate this hypothesis by comparing Single LLM baseline (GPTT-5-ann) against ensemble approaches. The Fixed LLM Ensemble pro- vides diversity by sampling uniformly from a predetermined set of models, while our Bandit Badddd LLM Ensemble adaptively learns which models contribute most effectively to fitness improvements, balancing exploration of underutilized models with exploitation of high- perfforeff ones.
Takeaways. The bandit-based LLM ensemble significantly outperforms both single LLM and fixed ensemble approaches. While the fixed ensemble shows moderate improvements over single LLM usage, the adaptive bandit strategy achieves the highest performance by dynamically prioritizing more effective models based on their contribution to fitness improvements.
Impact of Code Embedding- Rejection Sampling. Similar code variants can waste com- putational resources without advancing the search frontier. To address this challenge, we examine different novelty filtering mechanisms. The No Rejection Sampling baseline accepts any LLM pro- posal, potentially allowing near-duplicate programs to proliferate. Our Embedding Based Rejection Sampling approach leverages text embeddings to identify and reject proposals with similarity scores exceeding 0.95. We also explore Additional LLM-as-d-novvely-jude variant that supplements embedding- filtering with explicit LLM assessment of program novelty.
Takeaways. Code embedding- based rejection sampling provides substantial performance gains over no rejection sampling by preventing redundant mutations. The additional au--all---novlly--.. judge offers marginal improvements, suggesting that embedding similarity is already effective proxy for novelty assessment without requiring additional computational overhead.
6 DISCUSSION
Contributions. This work introduces SHINKAEVOLVE, an evolutionary framework tackling the inefficiency of LLM-driven scientific discovery. SHINKAEVOLVE achieves state-of-the-ard results across four domains: circle packing with 150 evaluations (orders of magnitude improvement over prior baselines), sophisticated AIME reasoning scaffolds, ALE-Bench algorithmic improvements, and novel mixture-of mixture-of-eexeer expeet load balancing. By sharing its full code, we hope to remove barriers and accelerate community-drts -drive open advancements.
Limitations. While SHINKAEVOLLV makes significant strides toward improving sample efficiency and reducing costs, still shares some of the other limitations of prior approaches (Novikov et al.) 2025). In particular, our framework still requires manual task specification, relying on human pertise in the target domain for providing objective functions. Furthermore, SHINKAEVOLVE is still constrained to problems with well-defined, implemented numerical objectives, making its wider applicability to arbitrary human preferences and heuristics an open problem.
Extensions. Automated task specification through LLM task generation could enable greater auton- omy and unlock applications in unexplored domains. Transitioning to true open open-endedness, where systems generate their objectives, represents compelling future frontier.

---

Published as a conference paper at ICLR 2026
ETHICS STATEMENT
SHINKAEVOLVE s aims to further advance the field of evolutionary optimization and make it acces- sible researchers and practitioners previously lacking access to proprietary frameworks, following on the same path as SsSarmaa (025). Given its purpose and objective, we thus do not expect additional specific issues regarding fairness, privacy, or security, or any other harmful societal implications that are not already inherent to the field. However, we still want to highlight that our framework relies on closed-source models, and API costs from large-scale LLM usage could create economic barriers, potentially constraining democratization goals.
REPRODUCIBILITY STATEMENT
We provide the full anonymized SHINKAE BIIKAEVOOYY code in the supplementary material uploaded with this submission. Moreover, we provide full implementation details and hyperparameter configura- tions in Appendix B together with program listings representing each of SHINKAEVOLA
final so- lutions in Appendix [ We will also open-source a fully-documented version of SHINK A EVOive's code facilitate open reproducibility and accelerate advancements to open-ended automated dis- covery across diverse computational problems.
LLM USAGE DISCLOSURE
The authors would like to acknowledge the use of LLMS to improve the grammar, clarity, and overall presentation of this manuscript. The authors reviewed, edited, and take full responsibility for the final content.
ACKNOWLEDGMENT
We thank David Ha, Takuya Akiba, Taishi Nakamura, Luca Grilloti, Yutaro Yamada, and the rest of the Sakana Al team for helpful discussions throughout the project.
AUTHOR CONTRIBUTION LIST
Robert Tjarko Lange Initiated and led the project, designed the core SHINKAEVOLVE codebase, and implemented as well collected results for Circle Packing, AIME, and ALE-Bench. Wrote the manuscript.
Yuki Imajuku Helped setting up the ALE-Bench infrastructure, advised on the ALE-Bench re- sults and supported writing the manuscript section ALE-Bench.
Edoardo Cetin Was involved in design discussions for SHINKAEVOLVE and came up as well as implemented the adaptive LLM sampling method and the Hydra configuration. He imple- mented and collected results for LLM training and Mixture-of-Expee Expertss evolution. Co-wrote the manuscript.
SHINKAEVOLVE NAMING
The Japanese term 'shinka' translates to 'evolution' or 'innovation'. SHINKAEVOLVE refers to the vision of an open-ended self-refining innovation engine. While SHINKAEVOLVE might be bit funny for some Japanese readers, as it sounds like Evolve-Evolve or i ilt fL. similar bilingual repetitive terms appear quite often in Japan.
10

---

Published as a conference paper at ICLR 2026
REFERENCES
American invitational mathematics examination, 2023. Problems and solutions, 2023. Published by the Mathematical Association of America / AMC contests.
American invitational mathematics examination, 2024. Problems and solutions, 2024. Published by the Mathematical Association of America / AMC contests.
American invitational mathematics examination, 2025. Problems and solutions, 2025. Published by the Mathematical Association of America / AMC contests.
Anthropic. The claude model family; Opus, sonnet, haiku, 2024, URL http::/// cdn, nthropic com/ de wttp:////aaaaa..aaaaaaaaaaaa.a..
Card
Claude_3.ppl
Peter Auer, Nicolo Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine learning, 47(2):235-256, 2002.
Jeremy Berman. How got a record 53.6% on arc-agi. https: jteasss//eeerrebbbbebbbbee substac
k. ssom/p/howwae --t.tiigoooooooo record www.orrr----------------------e-
2025. Accessed: 2025-02-08.
Yonatan Bisk, Rowan Zellers, Jianfeng Gao, Yejin Choi, al. Piqa: Reasoning about physical com- monsense natural language. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pp. 7432-7439, 2020.
Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge. arXiv preprint arXiv: 1803.v 054557, 2018
Damai Dai, Chengqi Deng, Chenggang Zhao, RX Xu, Huazuo Gao, Deli Chen, Jiashi Li, Wangding Zeng, Xingkai Yu, Yu Wu, et al. Deepseekmoe: Towards ultimate expert specialization in mixture- of-experts language models. arXiv preprint arXiv:2401.066 0.006666666... 2024.
Nan Du, Yanping Huang, Andrew M Dai, Simon Tong, Dmitry Lepikhin, Yuanzhong Xu, Maxim Krikun, Yanqi Zhou, Adams Wei Yu, Orhan Firat, et al. Glam: Efficient scaling of language models with mixture-of-experts. In International conference on machine learning, pp. 5547- 5569. PMLR. 2022.
Maxence Faldor, Jenny Zhang, Antoine Cully, and Jeff Clune. Omni-epie: Open-endedness via models of human notions of interestingness with environments programmed in code, 2024. URL http://///xxxii.r//////b/s////
William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(1))):1-39 2022.
Google AI Blog. Our next-generation model: Gemini 1.5. nology Accessed: 2025-07-13. February 2024.
http::/bblog.googlleeess
Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang. Xiao Bi, et al. Deepseek-rl: Incentivizing reasoning capability in Ilms via reinforcement learning. arXiv preprint arXiv:2501.12941 2025.
Shengran Hu, Cong Lu, and Jeff Clune. Automated design of agentic systems. arXiv preprint arXiv:2408.08433, 2024.
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..0005 2025.
Yuichi Inoue, Kou Misaki. Yuki Imajuku, So Kuroki, Taishi Nakamura, and Takuya Akiba. Wider or deeper? scaling Ilm inference-time compute with adaptive branching tree search. arXiv preprint arXiv:2503. 044/2, 2025.
11

---

Published as a conference paper at ICLR 2026
Albert Q Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bam- ford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, et al. Mixtral of experts. arXiv preprint arXiv:2401.04088. 2024.
Zhengyao Jiang, Dominik Schmidt, Dhruv Srikanth, Dixing Xu, lan Kaplan, Deniss Jacenko, and Yuxiang Wu. Aide: Ai-driven exploration in the space of code. arXiv preprint arXiv:2502.13141 2025.
Robert Lange, Tom Schaul, Yutian Chen, Tom Zahavy, Valentin Dalibard, Chris Lu, Satinder Singh, and Sebastian Flennerhag. Discovering evolution strategies via meta- black box optimization. In Proceedings of the Companion Conference Genetic and Evolutionary Computation, pp. 29-30, 2023.
Robert Tjarko Lange, Yingtao Tian, and Yujin Tang, Large language models evolution strategies. arXiv preprint arXiv:2402. 18381, 2024.
Robert Tjarko Lange, Aaditya Prasad, Qi Sun, Maxence Faldor, Yujin Tang, and David Ha. The ai cuda engineer: Agentic cuda kernel discovery, optimization and composition. Technical report, Technical report, Sakana AI, 02 2025, 2025.
Joel Lehman and Kenneth Stanley. Abandoning objectives: Evolution through the search for novelty alone. Evolutionary computation, 1992):189-223, 2011.
Joel Lehman, Kenneth O Stanley, et al. Exploiting open-endedness to solve problems through the search for novelty. In ALIFE, pp. 329-336, 2008
Joel Lehman, Jeff Clune, Dusan Misevic, Christoph Adami, Lee Altenberg. Julie Beaulicu, Peter Bentley, Samuel Bernard, Guillaume Beslon, David M Bryson, et al. The surprising creativity of digital evolution: A collection of ancedotes from the evolutionary computation and artificial life research communities. Artificial life, 26(2):274-300 2020.
Joel Lehman, Jonathan Gordon, Shawn Jain, Kamal Ndousse, Cathy Ych, and Kenneth O. Stanley. Evolution through large models, 2022. URL
org/ abs / 2206. 08896
Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu. Dehao Chen, Orhan Firat, Yanping Huang, Maxim Krikun, Noam Shazeer, and Zhifeng Chen. Gshard: Scaling giant models with conditional computation and automatic sharding. arXiv preprint arXiv:2006. /6668, 2020.
Yujia Li, David Choi, Junyoung Chung, Nate Kushman, Julian Schrittwieser, Rémi Leblond, Tom Eccles, James Keeling, Felix Gimeno, Agustin Dal Lago, et al. Competition-Ievel code generation with alphacode. Science, 109
2022.
Fei Liu, Rui Zhang, Zhuoliang Xie, Rui Sun, Kai Li, Xi Lin, Zhenkun Wang. Zhichao Lu, and Qingfu Zhang. Llm4ad: A platform for algorithm design with large language model. arXiv preprint ar ar1i::2412. 17287, 2024a.
Liyuan Liu, Young Jin Kim, Shuohang Wang, Chen Liang, Yelong Shen, Hao Cheng, Xiaodong Liu, Masahiro Tanaka, Xiaoxia Wu, Wenxiang Hu, et al. Grin: Gradient-informed moe. arXiv preprint ar arXiv:2409. 12136, 2024b.
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05100 2017.
Chris Lu, Samuel Holt, Claudio Fanconi, Alex James Chan, Jakob Nicolaus Foerster, Mihaela van der Schaar, and Robert Tjarko Lange. Discovering preference optimization algorithms with and for large language models. In The Thirty-eighth Anmual Conference on Neural Information Processing Systems, 2024a. URL / /ttpa//////ttt/////eaaaaaaa/e//a www.:nntttooooomdeeeeeee JZ
91
Chris Lu, Cong Lu, Robert Tjarko Lange, Jakob Foerster, Jeff Clune, and David Ha. The ai scien- tist: Towards fully automated open-ended scientific discovery. arXiv preprint arXiv:2408.061 2024b.
12

---

Published as a conference paper at ICLR 2026
Yecheng Jason Ma, William Liang, Guanzhi Wang, De-An Huang, Osbert Bastani, Dinesh Jayara- man, Yuke Zhu, Linxi Fan, and Anima Anandkumar. Eureka: Human-level reward design via coding large language models. arXiv preprint wtt.:::2311..933333. 2023.
Meta-AL. The Llama herd: The beginming of new era of natively multimodal AI innovation, 2025. URL httpt:tttaaaatt meta. www.bloo/c//cccoccccoooccoooooot - http://poo...aaaaa------aaaaaaae
Elliot Meyerson, Mark Nelson, Herbie Bradley, Adam Gaier, Arash Moradi. Amy K Hoover, and Joel Lehman. Language model crossover: Variation through few-shot prompting. arXiv preprint 222iv:2302./2170,0 2023.
Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. Can a suit of armor conduct electricity? a new dataset for open book question answering. arXiv preprint 1rXivv1809.022 2018.
Niklas Muennighoff, Luca Soldaini, Dirk Groeneveld, Kyle Lo, Jacob Morrison, Sewon Min, Wei- jia Shi, Pete Walsh, Oyvind Tafjord, Nathan Lambert, al. Olmoe: Open mixture-of-experrs language models. arXiv preprint arXiv:2409.02066. 2024.
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: coding agent for scientific and algorithmic discovery. arXiv preprint arXiv:2506. 13131, 2025.
OpenAl. Gpt-4 technical report, 2023.
Guilherme Penedo, Hynek Kydlíček, Anton Lozhkov, Margaret Mitchell, Colin A Raffel, Leandro Von Werra, Thomas Wolf, et al. The fineweb datasets: Decanting the web for the finest text data at scale. Advances Neural Information Processing Systems, 37:3081 1-30849, 2024.
Zihan Qiu, Zeyu Huang, Bo Zheng, Kaiyue Wen, Zekun Wang, Rui Men, Ivan Titov, Dayiheng Liu, Jingren Zhou, and Junyang Lin. Demons in the detail: On implementing load balancing loss for training specialized mixture-of-expert models. arXiv preprint arXiv:2501.11877 2025.
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.
Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. Winogrande: An adver- sarial winograd schema challenge at scale. Communications of the ACM, 64(9):99-106, 2021.
Maarten Sap, Hannah Rashkin, Derek Chen, Ronan LeBras, and Yejin Choi. Socialiqa: Common- sense reasoning about social interactions. arXiv preprint arXiv:1904.099288 2019.
Asankhaya Sharma. Openevolve: an open-source evolutionary coding agent, 2025. URL https: htt.tuu...ccncccceeeoo////eeeere
Noam Shazeer. Glu variants improve transformer. arXiv preprint arXi::2002.052022 2020.
Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-expertt layer. arXiv preprint arXiv: 70170001168,,,.. 2017.
Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. Reflexion: Language agents with verbal reinforcement learning. Advances in Neural Information Processing Systems, 36, 2024.
Kenneth O Stanley, Joel Lehman, and Lisa Soros. Open- Open-endedness: The last grand challenge you't 've never heard of. While open-ent endedenndsdees could be force for discovering intelligence, could also be component of Al üself, 2017.
13

---

Published as a conference paper at ICLR 2026
Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. Roformer: En- hanced transformer with rotary position embedding. Neurocomput. 568(C), February 2024. ISSN 0925-2312. doi: 10.1016/j.am wtt.:...ccmmm.222..2222.... net.com 2023. 127063
URL URLhttts:: //t::///ooi... http://:////do.i....10... or1//0.101661
Peter T Szymanski and Michael D Lemmon.
Adaptive mixtures of local experts are source coding solutions. IEEE International Conference on Neural Networks, pp. 1391-1396. IEEE, 1993.
Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. Commonsenseqa:: question answering challenge targeting commonsense knowledge. arXiv preprint arXiv:/811.00933: 2018.
Reiko Tanese. Distributed genetic algorithms for function optimization. University of Michigan, 1989.
Chameleon Team. Chameleon: Mixed-modal early-fusion foundation models. arXiv:2405.09816 2024.
arXiv preprint
Gemini Team. Google deepmind. gemini 2.5: Pushing the frontier with advanced reasoning, mul- timodality, long context, and next generation agentic capabilities. Technical report, Technical Report v2. 5, Google DeepMind, 2025.
Fuzhao Xue, Zian Zheng, Yao Fu, Jinjie Ni, Zangwei Zheng, Wangchunshu Zhou, and Yang You. Openmoe: An early effort open mixture-of -ixture-of-experts language models. arXiv preprint arXiv:2402.01739, 2024.
Yutaro Yamada, Robert Tjarko Lange, Cong Lu, Shengran Hu, Chris Lu, Jakob Foerster, Jeff Clune, and David Ha. The ai scientist-v2: Workshop-level automated scientific discovery via agentic tree search. arXiv preprint arXiv:2504.0800 2025.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint Sttv:25055003888, 2025.
Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. Hellaswag: Can ma- chine really finish your sentence? arXiv preprint arXiv:1905.07830 2019.
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. 229554, 2025.
Barret Zoph, Irwan Bello, Sameer Kumar, Nan Du, Yanping Huang, Jeff Dean, Noam Shazeer, and William Fedus. St-moe: Designing stable and transferable sparse expert models. arXiv preprint arXiv:2202.08900 2022.
14

---

Published as a conference paper at ICLR 2026
APPENDIX
A
SHINKA IMPLEMENTATION DETAILS
SHINKAEVOL.VE uses queue based implementation where LLMSs generate program pro- posals sequentially. Afterwards, they are added to job evaluation queue. Each proposal is based on all jobs that have completed so far and are stored in the database.
Throughout development, we experimented with fully asynchronous implementation that leverages both a job and a proposal queue. This allows for higher throughput but introduces degree of "off- lfff-archiveness" in the sense that new code proposals generated in advance and not based on all the previously submitted jobs. Furthermore, jobs from faster to query models will be executed earlier since their proposal jobs will be processed earlier. Many open research questions remain regarding the optimal trade-off between throughput, sample efficiency, and off-archiveness.
Below we provide an overview of the Python API. It roughly adopts the high-level interface of OpenEvolvv lve (Sharma 2025):
fron shinka.core
Evoiut-onBunned BvelutioaCoafig fron adinka.databaae import, DatahaseCsariq from shinka. Launcl, inpost Lavel LawelJobbooniig
Mininal only what's required jok_bannig Lucaldationn db_esafig batabaseConfieef eva_config
evolution defaults
runner Rvgl at iontunee
evo_ounf fig Liges peeeeuncnnnia Cig. job_confige don foanniigeen beegge_oenfnigggoege
ccnner.zun()
Listing 1: Minimal SHINKABVOLVE configuration and usage example.
evaluate. py Evaluation Script
Eron shinks..cm core Import con_ehsrka_.om
moiniprogren_
metrics, zorrest, ezt sun_thinka_evsil ptt.rannpttappooromm.oo
results dir-resulte dir, oxporinatt____amee=raa "t___ppprnxxttt num num_runs runs-3, 4 Huiti-evals to aggreg, get experiment kwergs-get kwargs, agprepte_nntrico.. stt.rriessstttrrrrrrsss..... valleste_thrvaiioet
initial ...... -yy - Starting Solution
EVOLVE BLOCK STAR? dec advanced
will be evolved
optional
ceturn xolution
WVOLVE-BLCCE END
soturn ["pcrani": "value", "poran2":
idk:
def cag.eeeerient (exkwarg)) araaiin called by evaluatoz solve solve_ (cvargl) reen
det aggregate, In (resuite: listl +> dict: rosults[0]
selurn result
reselte[l]
def snl vollv_probl grobl (params) sulucion ion aalgnoe return solution
securn
"canbined float (sccre), "public":
chanka-visible "private": 1...hr shinka-inviaible "extra_data": (..-l. I szore as pkl *coxt_rcodtssde" text, f stx tb
nome
main
azoparsa progran path diz painppoogeos_stth sesuits_cit)
15

---

Published as a conference paper at ICLR 2026
B TASK IMPLEMENTATION DETAILS
B.1 CIRCLE PACKING PROBLEM
Detailed Task Description. The circle packing task requires placing 26 circles within unit square such that the sum of their radii is maximized while ensuring no circles overlap and all circles remain fully contained within the square boundary.
Ciie Nocing mieds, samme 6353931
Verification Methodology with Slack. For the
main SHINKAEVOLVE run presented in the paper, employed the verification script provided by
22
OpenEvol ve (Sharma 2025), which allows for x
10-6 numerical slack. To ensure the robustness of
our results, we additionally validated our solutions us-
ing AlphaEvolve'ss (Novikov al. (2225 exact ver-
ification code. We found that our discovered solu-
tion can be made trivially exact by reducing each eir-
cle's radius by 1 x 10-6, demonstrating the high pre- cision of our approach. The adjustment from the re- laxed to exact formulation reduces the sum of radii for our discovered solution by a negligible amount, from 2.63598309901 1548 to 2.63598283901 15476, repre-
a
senting a relative change of less than 10 10-6.
Figure 9: Discovered Circle Pack- ing solution by SHINKAEVOLVE.
Verification Methodology with Exact Constraint. Additionally, we replicated the solution using the exact verification code from AlphaEvoive Figure [00 with score of 2.6359777093 127. The discovery of the solution requires more samples to be evaluated. This illustrates an important principle: surrogate relaxed tasks can be effectively used during evolution and subsequently post- processed to discover exact state-of-the-art solutions.
ShinkaEvolve Circle Packing: Discoveries
40
2.6
Evolved Performance Score
30
Cumulative Cost
2.4
20
2.3
10
Best Score
2.1
Individual
Path Node
Cumulative Cost
2.0
400
500
Number of Evaluated LLM Program Proposals
Figure 10: Circle packing asynchronous evolution results for exact circle packing verification show- ing convergence behavior and solution quality over time.
Baseline Comparisons. Our performance benchmarks are established against solutions from three primary sources. The AlphaEvolve sum of radii is taken from their paper (Novikov et al. (025). The OpenEvol ve baseline scores derived from their official implementation and examples avail- able in their repository. Additionally, we compare against LLM4AD results, specifically their circle packing implementations and Evolution of Heuristies (FoH) experimental configurations/ These
16

---

Published as a conference paper at ICLR 2026
baselines provide comprehensive coverage of existing automated algorithm design approaches, abling fair and thorough performance evaluation of our method.
SHINKAEVOLVE'S Hyperparameter Configuration.
Parameter
Value
Parameter
Value
Database configuration
Archive size
40
Elite selection ratio
0.3
Archive inspirations
4
Top-k inspirations
2
Migration interval
10
Migration rate
0.0
Island elitism
true
Parent selection strategy
weighted
Parent selection
10.0
Number of islands
Evolution configuration
Patch types
[diff, full, cross]
Patch type probs
[0.45, 0.45, 0.1]
Generations
150
Max parallel johs
Max patch resamples
3
Max patch attempts
Meta recommendation interval
10
Max meta recommendations
Embedding model
text-embeddingg- 3-small
Max novelty attempts
None
Code embed sim threshold
0.95
Problem implementation
Python
LLM dynamic selection
ueb1
Exploration cocfficient
1.0
LLM models
gemini-2.5-prro
gemini-2.5-flash
claude-sonnet-4
04-mini
gpt-5
X
gpt-4.
gpt-4.1
mmiii
LLM settings
Temperatures
[0.0, 0.5, 1.0]
Max tokens
16,384
Meta models
[gpt-5-nano]
Meta temperatures
[0.0]
Novelty models
[gpt-5-nano]
Novelty temperatures
[0.0]
Table SHINKAEVOLVE hyperparameter configuration for the Circle Packing task.
17

---

Published as a conference paper at ICLR 2026
B.2 AIME MATH REASONING AGENTIC HARNESS
Detailed Task Description. For the agent scaffold design task, we evaluate SHINKAE- VOLVE on AIME 2024 mathematical rea- soning problems, consisting of 30 chal- lenging competition-level questions requir- ing sophisticated problem-solving strategies AIM, 2024). We limit the maximum num- ber of LLM queries per problem to for computational and cost efficiency. Using 1ot--4.1nante as the base model, we evolve scaffold designs over 75 generations. Additionally and to combat stochasticity in LLM queries, we evaluated each candidate evaluated across three independent runs on the complete question set. After evolution, we evaluate the discovered scaffold designs on 2023 and 2025 AIME problems (AIM 2023 (025) to assess generalization as well as robustness to different base agent lan- guage models.
ShinkaEvolve AIME Scaffold Design: Discoverie
Evolved Performance Score
Besl Scare
20
Gumoletive
Number Evaluated LLM Program Proposals
Figure 11: SHINKAEVOLVE's Discovery
Trajectory for Math Agent Scaffold Design.
SHINKAEVOLVE'S Hyperparameter Contiguration.
Parameter
Value
Parameter
Value
Database configuration
Archive size
40
Elite selection ratio
0.3
Archive inspirations
4
Top-k inspirations
Migration interval
10
Migration rate
0.1
Island clitism
truc
Parent selection strategy
weighted
Parent selection A
10.0
Number of islands
4
Evolution configuration
Patch types
[diff, full, cross]
Patch type probs
[0.6, 0.3, 0.1]
Generations
75
Max parallel jobs
Max patch resamples
3
Max patch attempts
3
Meta recommendation interval
10
Max meta recommendations
Embedding model
text-embedding 3-mmall 3-maal
Max novelty attempts
Code embed sim threshold
0.95 null
Problem implementation
Python
LLM dynamic selection
Exploration coefficient
0.0
LLM models
gemini-2..5prre
gemini-2.5-flash
claude-sonnet-4
04-mini
gpt-5
X
gpt-5-nano
g
X
gpt-4.1-mini
LLM settings
Temperatures
[0.0, 0.5, 1.0]
Max tokens
16,384
Meta models
[gpt-4.1]
Meta temperatures
[0.0]
Novelty models
[gpt-4.1]
Novelty temperatures
[0.0]
Table SHINKAEVOLVE Hyperparameter Configuration for the Math Reasoning Agentic Hameess.
18

---

Published as a conference paper at ICLR 2026
B.3
PROBLEMS
Detailed Task Description. The ALE-Bench benchmark (Imajuku et al. 2025) is collection of heuristic programming problems previously used in competitive programming contests (AiCoder). We evaluate SHINKAEVOLVE on the LITE subset of problems, which consists of 10 problems. We follow the evaluation protocol of the benchmark and use the score calculated on the 50 public test cases as the fitness function following ALB-Agent (Imajuku et al. 2025). Afterwards, we submit the best solution to the private test set and report the score. Additionally ly, in 6 we provide scores for evaluating the top-5 publicly scored solutions and taking their maximum score the private test set. While this does not resemble the traditional competitive programming setting, it allows us to assess the generalization ability of the discovered solutions. The average solution score improves by a negligible amount from 1923.5 to 1927.0. Hence, we do not observe significant evidence for overfitting to the public test cases.
SHINKAEVOLVE's Hyperparameter Configuration.
Parameter
Value
Parameter
Value
Database configuration
Archive size
50
Elite selection ratio
0.3
Archive inspirations
Top-A inspirations
2
Migration interval
10
Migration rate
0.1
Island elitism
true 10.0
Parent selection strategy
weighted 2
Parent selection À
Number of islands
Evolution configuration
Patch types
[diff. full. cross]
Patch type probs
[0.6, 0.3, 0.1]
Generations
50
Max parallel jobs Max patch attempts
1
Max patch resamples
3
3
Meta recommendation interval
5
Max meta recommendations
5
Embedding model
None None
Max novelty attempts
None
Code embed sim threshold
Problem implementation
C++
LLM dynamic selection
ucb1
Exploration coefficient
1.0
LLM models
gemini-2.5-pp pro
gemini-2.5-flass
4
V
04-mini
gpt-5
gpt-5-mini
V
gpt-4.1
X
gpt-4. 1-min
x
LLM settings
Temperatures
[0.0, 0.5, 1.0] [gpt-5-mini] None
Max tokens
16.384
Meta models
Meta temperatures
[0.0]
Novelty models
Novelty temperatures
None
Table 3: SHINKAEVOLVE Hyperparameter Configuration for the ALE-Bench Problems.
19

---

Published as a conference paper at ICLR 2026
B.4 MIXTURE-OF-EXPENT LOAD BALANCING Loss
Hyperparameter
Small MoE (evolution)
Large MoE (evaluation)
Model architecture
Model parameters
556M
2.7B
Activated parameters
82M
404M
Number of experts (Ng) active per token (K)
64/ 8
64/ 8
Hidden size
512
1024
Hidden size in each MoE expert
384
768
Number of hidden layers
12
Number of attention heads
8
16
Number of kaluv heads
8
8
Head dimension
128
128
Attention bias
false
false
Attention dropout
0.0
0.0
Initializer range
0.02
0.02
RoPE A
1, 1,000,000
1,000,000
Tied word embeddings
true true 1 0.01
true
Output router logits
true
Decoder sparse step
Router auxiliary loss coefficient (A)
0.001. 0.01, 0.1
Computation dtype
bfloat16
bfloat16
Training setup
Optimizer
Adam W
Adam 3.0 10-4 0.1 (0.9, 0.95, 1 x 10 10-*)
Learning rate
1.0 10 0.1 (0.9, 0.95, 1 1x10=*) Cosine decay 70
Weight decay
Adam parameters (31, 82,c)
Learning rate scheduler
Cosine decay 490
Warmup steps
Maximum sequence length
1024
1024
Global train batch size (sequences)
1024
2048
Tokens per training step
1,048,576
2,097,152
Maximum steps
2000
14,000
Total tokens
2.10B
29.36B
Dataset
fineweb
fineweb
Table 4: MoE architectures and training setup.
Detailed Task Description. The ofxture-of-Expeer (MoE) architecture (Szymanski & Lemmon 1993] Shazeer et al. 2017] Lepikhin et al./ 2020 Fedus et al. 2022) has been a critical advance- ment, enabling scaling breakthroughs in large language model training. MoEs are currently ubiqui- tous amongst modern open and closed-source flagship models (Google Al Blog. 2024 Guo et al.) 2025| Meta-AT, 2025 Yang et al., 2025) Team 2025). The core principle behind the MoE design to replace traditional large feed-forward residual blocks with ensembles of smaller modules (the "experts"), which can be efficiently sharded during training and only partially activated during in- ference (Fedus et al. 2022). Each expert is itself small feed-forware network Ey,, located within a larger ensemble of size Ng at layer f. The router, a layer-specific linear classifier he, selects the top-K most relevant experts for each token, computing only their outputs:
Ne Σ (x) FE)(()), (0,((x)
E Eseretay ceg if E (T(
ye (x(x))
0,
otherwise
where Tx (z) denotes the set of indices corresponding to the top-K router logits (x). This sparsely activated design allows different experts to specialize in distinct problem domains, enabling greater efficiency, scalability, and adaptability handling diverse prompts.
However, due to the non-differentiability of the top-K expert selection operation, it is critical to provide the router with an auxiliary load balancing loss (LBL). The LBL prevents collapse toward uneven token distributions and under-specialized experts. Devising effective load balancing loss
20

---

Published as a conference paper at ICLR 2026
that simultancously encourages efficiency and expert specialization, without hindering expressivity, remains an open design challenge that has driven much of the recent progress in MoEs (Shazeer
et al. 2017 Fedus et al.] 2022; Du et al. 2022] Zoph et al. 2022 Xue et al. 2024 Dai et al. 2024
Qiu et al., 2025 Muennighoff et al. 2024). Minor design variations have been shown to significantly
affect both efficiency and specialization ability (Dai et al. 2024 Jiang al. 2024 Team 2024
itt al. 2024b Qiu et al. 2025).
One of the most widely adopted designs the "global-batch" LBL introduced by Shaazerr et al. (2017). which underpins several state-of-the-art open models such as Qwen 3 (Yang et al. 2025
For layer l with Ng experts, it is defined as:
L NE ΣΣ 1=
LLB NE
fex Peç
(3)
where
fe, Tokens routed to expert
(esel) Pe. = Eng he)(z)
Total tokens in layer
This formulation encourages token usage across experts to align with the router's average soft as- signment probabilities.
We evaluate SHINKAEVOLVE by pretraining a MoE model with 556M parameters, NE = 64 ex- perts of which only K are active for each token, corresponding 82M sparsely activated parameters per forward pass (excluding embeddings). Training is performed on 2B tokens from fineweb (Penedo al. 2024). For each program, we define a fitness function consisting of the cross-entropy (CE) loss together with an LBL. term weighted by À = 0.01. To additionally measure load imbalance, we track the LI deviation from a uniform distribution of token allocations:
NR Σ 2
1
Limb
(4)
Ng
with lower values indicating more even load distribution. This grounding provides SHINKAEVOLVE a two-fold search objective: minimize CE while improving load balance. To avoid local noise affecting the cross-entropy calculations, we average over the last 10M tokens. The final fitness score used during evolution is then the negated sum of the two:
-Lce + Limb).
(S)
Given the expense of pretraining, we run SHINKAEVOLVE for only 30 iterations, focusing on gpt-4. gemini-2 5 5-pro, and claude sonnet-4, To evaluate generality, we scale to MoE of which 404M active (excluding embeddings), trained on slightly under 30B fineweb tokens, and compare across three LBL coefficients {0.001, 0.01, 0.1). We used AdamM (Loshchilov & Hutter 2017) as the optimizer with cosine decay, and linear warmup. As common practice modern training regimes, we used rotary positional embeddings (Su al., 2024), SwiGLU MIPs (Shazeer 2020), and half-precision bfloat1 6 to efficiently keep our model's evolution, we use batch
a larger
weights on device. For the small model used during SHINKAEVOLVE size of slightly over 1M tokens, for 2K steps. For the larger MoE used double the batch size and seven times the total number of steps. After training, we benchmark against the global-batch LBL baseline in terms of perplexity (Figure 7 left) and downstream performance across seven standard evaluations: CommonSense QA (Talmor et al. 2018). HellaSwag (Zellers et al. 2019), OpenBook QA (Mihaylov al.) 2018). PIQA (Bisk
2020 SIQA (Sap et al.) 2019), WinoGrande (Sak-) truncating the number of questions to 1000 for
aguchi et al., 1). and ARC (Clark et al. 2018),
large benchmarks done by (Penedo et al.
2024
As described in Section 4 and detailed in Appendix D SHINKAEVOLVE discovers a new twist on the global-batch LBL from Equation 3 which was used for seeding evolutionary search. SHINKAEVOLVE discovers an augmentation of this loss with an additional regularization term to target under-specialized experts. As defined in Equation let fr, and Pr., denote the se- lection frequency and average router probabilities for expert H(P,)
Uiaud buton Ut. Shedutvshee chooeered
23
4.7
in layer& f. Furthermore, define s s(Pr) = 0.5 + (1
Iog
0.9
1.2
21
Figure 12: LBL loss comparison.

---

Published as a conference paper at ICLR 2026
normalized complement of the routing entropy, and 0.064/Ng as a minimum usage threshold. The final discovered LBL is:
NE EΣ Pest t=
N
0.1
LLBL = NE L
((P) t=1
Σ
- Se,s)
Global-batch LBL
SHINKAEVOLVE now regularization
Seasuering actunaty vs. coeficanti
Tirewets: linal perpree LBL cow lisaen
Tirsswebr HElsattuled (obers, cosfficant
1,00
0.36
L4925
3,000
1.05
0.30
1,1990
3,05
3,000
0.00
0.56
Meduutdee of
13375
1.05
1.00
00011
0121
Juollay codeiiee Dag canteed
Gia Mallery cottiiee (nwetec)
Figure 13: Sexture-of-Expettt LBL design additional results.
Task
Global LBL
ShinkaEvolve
Loss Type
X
CE Loss
Accuracy
HellaSwag
0.391
0.379
Global LBL
0.375
0.357
CQA
0.192
0.192
ShinkaEvolve
0.373
0.366
PIQA
0,688
0.684
Winogrande
0.524
0.549
Global LBL
0.367
0.362
ARC
0.207
0.214
ShinkaEvolve
0.365
0.368
OpenBookQA
0.170
0.192
Global LBL
0.363
0.367
0.001
Mean
0.362
0.368
ShinkaEvolve
0.363
0.37
Figure 14: Comparison load balancing loss variants across downstream tasks with 0.01 (left) and across LBL. coefficients (right).
In addition the results from Section Figure we provide additional results comparing the global-batch LBL and SHINKAEVOLVE discovered LBL. In particular, report the average task performance, final perplexity, and the fraction of missrouted tokens, as a function of the LBL co- efficient À used for training the MoEs. Consistent with our previous analysis, SHINK A LBI. appears to improve from the original LBI. across both axes. Moreover, the tables shown in Figure [4] provide tables with details for the downstream task performance across over sidered benchmarks, as summarized in the center subplot Figure [3] However, we also note that the architecture used for evolving and testing the employed LBL was quite similar, and the training budget was still limited. However, the consistent generalization results across training budgets and coefficients À provide optimistic outlook for future extensions much longer training regimes, where even small efficiency gains could scale to significant cost savings.
22

---

Published as a conference paper at ICLR 2026
SHINKAEVOLVE'S Hyperparameter Configuration.
Parameter
Value
Parameter
Value
Database configuration
Archive size
Elite selection ratio
0.3
Archive inspirations
4
Top-k inspirations
2
Migration interval
10
Migration rate
0.1
Island elitism
Parent selection strategy
weighted
Parent selection À
10.0
Number of islands
Evolution configuration
Patch types
[diff, full]
Patch type probs
[0.5, 0.5]
Generations
Max parallel jobs
Max patch resamples
10
Max patch attempts
Meta recommendation interval
10
Max meta recommendations
5
Embedding model
text-embedding 3-small
Max novelty attempts
Code embed threshold
0.95
Problem implementation
Python
LLM dynamic selection
ucb1
Exploration coefficient
1.0
LLM models
gemini-2.5-pro
gemini-2.5-flash
claude-sonnet-4
04-mini
gpt-5
gpt-S-nano
gpt-4.1
ept-4.1-mint
LLM settings
Temperatures
[0.0, 0.5, 1.0] [gpt-4.1] [gpt-4.1]
Max tokens
16,384
Meta models
Meta temperatures
[0.0]
Novelty models
Novelty temperatures
[0.0]
Table SHINKAENOLVE Hyperparameter Configuration for the MoE LBI. Discovery.
23

---

Published as a conference paper at ICLR 2026
C ADDITIONAL RESULTS
C.1 CIRCLE PACKING: ROBUSTNESS ACROSS 3 INDEPENDENT RUNS
Circle Packing: Programs
Circle Packing: API Cost
Cirde Packing: Runtime
Evateed Performance Score
Evelroa Porformance Score
emitecner 28 creer certerrees
propeiale cropeette
cropeet2 and natern
Dralusted Pregrama
Cumulitive Total Cost (6)
Elapaed Shintafveive Runtins
Figure 15: Circle Packing results across independent runs. Two out of three runs discover solutions that outperform perform par with AlphaEvolve, demonstrating the reliability and effectiveness of our approach. We also compare different settings of asynchronous evaluation and program pro- posal workers for ShinkaEvolve.
C.2 CIRCLE PACKING: API COST BREAKDOWN
Cost Breakdown: Proposal Eval
Cost Breakdown: 10 Proposal Eval
Cost Breakdown: 20 Proposal 20 Eval
Pog Casls jEaree wiedo Emaadting
Taaal i Pregrum Orenerattiii Prrtaalem $$
Poppar tark 1E25
Emeediing 53
Emasdding
Mik Evct (8 (0))
2.10)
Mocatboos (euc 1.993
T0bei Progmim
Evalucted Pregrams
Evalurted Programo
bralusted Programs
Figure 16: API cost breakdown for Cirele Packing across different parallclization configurations. Approximately 97% of the budget is used program generation, while embedding, novelty check- ing, and meta-recoommeddttion generation take up the remaining 3%.
C.3 CIRCLE PACKING: ASYNCHRONOUS THROUGHPUT SCALING
Number of Evaluated Programs Over Time
Number of Evaluated Programs
250
150
50
5 proposal 5 eval workers
10 proposal 10 eval workers
proposal workers
05
14.4m
28.0m
43.2m
57.6m
1:2h
1.4h
1.7h
Elapsed ShinkaEvolve Runtime
Figure 17: Throughput scaling for Cirele Packing with different numbers of proposal and evaluation workers. The speedup is almost linear for fast-to-evaluate problems like Circle Packing, demon- strating efficient parallelization.
24

---

Published as a conference paper at ICLR 2026
C.4
CIRCLE PACKING: ROBUSTNESS ACROSS CODE EMBEDDING THRESHOLDS
Packing: Programs
Packing:
Packing:
744
241
Evolvved Porrhor menance Score
Parformance
0.4
Eeankle Sedee113 Exaxsorp Parkel
Exoaddrn ny Tarcids
Erandöry Taatad
Aphadrshe Bourd
Aptacrave Boand
Aptaoi es Boand
Cumulative
21:0
Figure 18: Performance comparison of different code embedding thresholds for Circle Packing. We compare thresholds of 1.0 (no rejection), 0.995, 0.9, and 0.5 (heavily rejecting similar programs). The larger values perform better, indicating that conservatively rejecting similar programs performs well for this domain.
C.5 CIRCLE PACKING: ROBUSTNESS ACROSS LLM PRIORITIZATION APPROACHES
Circle Packing: Programs
Circla
Cirdl Packing: Runtime
Desived Parformann Score
brelvcd Porformunce Score
2.00
nad
Padt uCst AsruCrckesound
Tesd
(EST
UC8T Aar.tacckses Bound
AsTaCciive Doand
Evalueted Programa
Th
Cumulutive Total Cout 15)
Shinkatvelve Runtine
Figure 19: Performance comparison of different LLM prioritization approaches for Circle Pack- ing. We compare UCB1 (our proposed approach), Thompson sampling, fixed (uniformly sampling models) strategies. While all approaches show similar asymptotic performance, UCB1 performs the most sample efficient.
25

---

Published as a conference paper at ICLR 2026
D SHINKAEVOLVE DISCOVERED SOLUTIONS
D.1
CIRCLE PACKING PROBLEM
regortt nonpy as "p Crom acipy optinise ingoct nininise, Bounda
def construct packing
arrangement circlex conbining heurist search with powertul SLS0F optimizer for recinement. 26
Helger Funct lons the opt
del object lee_ Fune (X] **rhh sanction minsmized: necative ""d -p,
set constraince_tunoe :
Computes ccnstraint violasions, SL30P, redii x(sn]
x[n:]. rechape
containment op.concatenatel
centersi racil, conters(i, rodil, contersliy (t, radii, centere ft 1| radii,
overlap in rango a):
dist np ng..innig..emmmccmeeee
conters(1])
overiap. operiap.oppenatciitt (radii(i] [j]1
wp.connatenatcc (fentsaannntccntttsmmmm. ap.arrzy (overlap)])
daf wwtpput__intiill_rdateee.
given centers to creste foasible starting point 1X3) for the optinizer.
Computes
radii ap.ninE [sontoro[1, D1, cantors 21, coaters|:, 01, conters[:, 111,
improved Palse
for in range (n)
foz in ranez nl:
dist www.iinll..oonnttetioo
conteral]])
sadii(i) zadii(1]
excess [zadi1[1] [1]] rodii(1] dist) 0.301
Lotal_r radii[i] [i]] sadii(]]
1e-5:
radii excess (radii cotal_xi
radiilj] [ijl excesa (sadii(f] cotal_s)
Improved True
ingroved:
return no mow.iinnu 16-5)
Gonerate high-quality initial
conters_ ap.20ros 21) insel 0.06 centers_init
[inset, inset],
[1 inset, inset],
linset, Insetl, 11 inset, inset]
centers_init [4:88 110.5, Inastl, (0.5, inset], linset, 0.5], 11 inset, 0.511 innt [8] 10.5, 0.51
golden angle ap.pi ex, oy 0.5, 0.5 inmes_e, outsssr 6.23, 0.48
151)
inner odter_idx mp.arange 19, 15), (laarane 26)
Fox idx sounesate (innes_idk)
angle = golden ang centerx init [idk] [ex inner_r (op.oox/angle) inner op.ain(sngl1))
1ex in enurerateiours angie e golden angi e 1.003
26

---

Published as a conference paper at ICLR 2026
c0nte:s_t011(1400 [ax ouCRE_ op.cos (angle), by ouser_s ap.ain(aaggeo)
centers_ init
Incrassed initial sitter
ientors_init (p.ccippcenseer__tig 0.01, 0.99)
2. Jefine bounds constraints for solver
bounda Bounda [[0.0] constraints (*typa": "Ines", "Funt: constraicta_
(2 ot, [C.5] a [1.0]
--- Initial baseliag upt-nization
sadii_init _oomatt talt x0 ng. np.concatenate innd contera_init iit.tttteettt... (1]tten
mininize(
objjective_fang
x0, nethed="SLSQP",
houndvebaunds,
conat
optionse ("maxiter;; 600, *Itol": 1e-8, "dispfs Palss),
Increased initial maxiter
Initialize current
solutions
best_x wea.lt.x..og... (I
curzent_x reqult, cxspy
cutcent fus
---- 4. simulated Anneal ing Perturb and refine with acoeptance criberion se_ilezetions
Signif increased iserat lona for SA Initial tomporature
tamperatuse
tempirarre temperscure 4 Preserve for potent ial reheat ing
couling_rate = 0.995
Slover cueling rate for broader awarch perturbations
perturo step
scep Preserve pertorbaaceg
initiel pertaall
potient ial releatiing
steg_ieccy 0.999
Decay sale for step sixe
last imgrove Len_lation__innee
Tteration of Tast best inprovement
Tterat fors triggering rebesting
for iter ids in range las. ittrat ionsl: candidat=__cmnle centeess cursent_xini zwwpette c1)_copy()
Start From current state
Select
rp.randon.rard 708 local, global ring rotation
looal noves parturb [ew circles
nun to nowe car.aaaooaraniiiii (2, 6)
indiices mp.randon, choice mun condidato_centere [indicee) ng.rorrson.ocmml1
replace=Palae)
3, perturb st step, size" frum to, nove,
rirgs rotate inner_ rp.randon.rard 0.5 elae outer_ide conter_point - candisate aandidate__cntteee conters(]] center of the overall pattern nerronldon.
Angular perturbacion (can be sixed or scaled)
rel. candidate centers (ix to rotatel center_ point rotates ap.cooumm_sseee (pgcin)
roi_pos 0] sia_a rol_posts, 11y rol
roi
Sencidate.conterssl.co tot ceater_point rotated
candidate_cenee ceattte_eeetesseeeeee np.clip( cancidate_cenet centers, 0,01, 0.99 ci19 stay within beunds
starting point
optinization
x0_candidate -g ns.consatenate
__Comprre_instiil__eee. wtw.:eeeicccdddddcooooocoeaa
rodino_result minimize
cafectivo_tune,
xt_candidats,
method-*SLS22
bounde-bounas.
options ("mxxito""" 150, "scol": 16-6, "disp": Falsel,
Redaced maxiter,
Simulated Annealing Accoptance Critericn Accopt bester, oz probability
tomperacure)
27

---

Published as a conference paper at ICLR 2026
aez_acoze cursent__soore
tamperazure 1c-7 and sp.ctndom.sondd (1ooX_c((oK__ccO cuerent_pcore) tomperature)
cursont_scoze pav_5cGEe
cuszent_x rotinsrroout...coo
Update current stato
if nov_score besi_score:
besl_x tefine,wwwil a.eggyl Updaae global Swat
inst_inprove iter_iex Reset atagracion counter on inprovenent
If not sccopted, current_x zenains uncharged for the next itcration (implicit)
down tomporature decay parturbation. atop somperaturs * cooling_aats
pezturk_atep >- ateg_decay
10-7:
temperature
Prevent division by seco
if pesturb_step < 1u-5;
parturt_stop = le-5
Prevent stop from bacoming too small
lwbeat stagneted
stagnation,,ini:
iter_idk iaat_improve stagration_
tamporature initial tamperatue
perturb_atep initial uniiisl_.ecturrt_tt iter_idx
5. Final Dulishing Run un the beat found solucion
Final_ result minimize
objective__fot
bext_x,
nethod="SL8gP*,
boundsebounds,
optionse ("axicer"; 1000, "Ecol"; 1a-9, "diap": Falsel,
Incressed maxiter For Final poliish
Einal, pollishing inproved
rinal_result, boot_
best_x finel_ oaaal__ oup
Make suce Lo copy
the reault redal_redil best_x]an]
Ihpaakk
final sinal_center centers best -[nncl-reshae (In, 21) swourn penter,, Finel_redil
def comput rad_l (cenbera):
function
struourra compat lity
Tranwwork
used by new 'oonatruct pock...ckiin logio.
It conputes meximun radst for tixes set at centers. nex
10
radis in.enptyin]
for i in range(n1:
contersii] redsi
vI
2or in (60)
ingroved Felse range (n)
for 3 in conge 1, n):
dist linl (cnetcetters) ccnters((])
radii rad:i dist:
excess (radil radsild]
total radii radiilj]
i2 total > C:
[radis(i] totall
ros:l[:] 10.00. [a] rroucc__)
rad:l151 m0x00.001, redii [3] reeacce_)
improved
not improved:
break
seturn radii
EVOLVE-BLOCK-END
part zenains (not evolved) det con_packing(): (
***Run the circle packing constructoz for a*26ane
centers, reail Calculate the sun of radil
construct_pockingt
sun_radii sun (radis)
radii, aun
cencera, radii, sun packing
28

---

Published as a conference paper at ICLR 2026
Listing 2: SHINKAEVOLVE Discovered Circle Packing Solution.
29

---

Published as a conference paper at ICLR 2026
D.2 AIME MATH REASONING AGENTIC HARNESS
eneAgent dexigg eve Toat fon math taoks,
inport ze
from typing import Callabley fest, Opt ional, Tuple, niet fron cullections lngurt Counter, de Cauludiel.
import agent_ sent_evvluaatio
WNOLVE-BLOCX-STEE
Ieport
tzom collestions Import Counter
Agent:
def init
self,
Cellable,
tergeraturre0..0
):
selt.query, lim query_
self.ootput fornat inst inst ions *Gn the Finel Line the digits of the answer (6-999).
Provido your ansver enclosed LaIex Waooodd command."
Paraneters
selt. imerartin_terperattie 0.7
selt.revien tenperrateeeee
self, synthess baacheesss__eeppeeeee temperatore 0.0
Use oelp-re
within 10-call limit
reviev
calla)
selt. poxpert_pereenae =
"You are meticulous and cautious machenstician. Your guiding principle se 'slox and steady wine smallest possible proceeding
solve preblens brezking them verity step tunzamental principles.
based
leaps legic
"You are brillisnt and incuitive mechemsticien know for finding elegant, non-obrious solations You look for symettries, invericnte, or change of perspective that radically simpliries the problen. insigats expisin strong backgzound comauter science. approach problens by trying to franc then sigorithmicallp, You think in torms of statas, cransitions, and zecurreacz relations, and you analyze the retavior ot these systeme to rind the colution.",
You
siearly.",
"You are nachonatisian
set _extract (sele,, text: stel +> Optionsl
**"Extracta the final answer from (1oxed]) envircnnent. t9P
return None
matchas fo.dinda11 (e"V (1d1) text)
it matches:
natches[-1]
None
def foovard(aolC,, preblen: stx) -> cuple[str, float]:
e*.
Solves problem using nulci parsona enasable with piuz revies and syathes total_ccst 0.0
Diverso Solutiors Expest. Porsonas
solutions
fox 1 in sange wtw._f.un_eeeeeateeeoee
self, exprrtttrrsssa
pronpe s*Soive the follewing problom stop-by-stop. (solt. outpat_ output__ossat___________________ Cosnat_instrustee Lonia NeYxPPOBLEE: (prebienn) NaYaSOLUTION:
tzy:
reagonse, self.query_Ile eprontt
systan-pezsons,
Lumpwraluzwwgell E.g.neaaiionnnnooooooooo
Lutai_coat i- cos.
exceat Exceptisn:
query fails, proceed wich
sulationa. apanaaa.ppppdddd (("Aapee
1] failed Lo generate solutionn")
sew STAGE 2: Indegenden: Peer Devinw Sel Folf--Corrtioon
iliques
"You are skeptical pear zeviover exanining proposed solution AIME problem, Your task is to be ext critical. insl. 3n not sccept any statenent at faom value, hhe read the uriginel problem carefully. Check calculat luns. Serut the logical flow. oPaatar Veci Lionsss solutior relies elearly explas air the flaw provide corrected Line reasoning and final ope corrected answer, solutioa in cungletely sound, state that and cu-scate the final answes,"
coviener_syston_eree
pattern, you
exargl
you find
For soll in solutions:
prongt Revieu Corsected sonution?"
Problens infprobled YakaPraposed Solution Deviswclnisd Ankakour Gritioal
try:
revies, cost self..uury__lnn prongtepranpt.
aystenerev: ever systen systeenprompt,
30

---

Published as a conference paper at ICLR 2026
Comporatuio-selc.oo wtw.:aaaeciiiee...ooooooooeeeeee
critiques, (pecnc
cHoupE Excoption:
critiques, app:nd wpwpacpp ("Reviover Soiled to provids critique.")
Syathesiza Final
synthasi s prssep
totea are the Editor-in-Chiet of presticious nathenatics journat, saaponsible for pubtiahiag the final, canonical solution to this AINS prablon. Yeu have reczived jecir.nen_expere indopendent deii correspondng uritical seviess. oProhions Va(oroblon)"
produce deCinative solut
for (sol, erit) in ununerati (zip (solcttio oxiciquea); aynthesis_preont__ apppa..aadd AnSolution (sol Andritiques (erit)a
El ARTEMPT [a
synthesi proept pwr.s..ppeeppep.p..
nunerical anavez propoaed by each of the reviewed attonpts. laz, Basad an the critiques, deteznine which appreach is the most reliable, if all flaved, Replain ceasuning An3, Comstrue. the final, cleas, step correct
(" PINAL OLUGEMENT: Arl. Firss, beietly atate
Leverage insights from the valid ozcoEs. wself.ou:pu:_ee........ iottrcettctttttooonn
the actenpta
any idantified
synt ser, prongt "in".join laynt heais promp prompt..prrss. synthesi aes aes_aya pyyatttennonnnnnn. "You ase meaker ician and editor, syothes ixing multigle sevieved solutions inco one canonicsl, cosrect ansver."
txy:
Final mool_reeee response,, cost self iulreyuery__lm promplesytthes. .xe. proppp, syetereyytheeseee systen pronpt, Lengerat ureazel btr.heeeeetttteettrrrr
total
except Exuegtioon
pasa Pallback loçic handle this.
-.w Pallback logie
selt, extract insveritsnal__eeeee response)
Pirst, trust the revieved anexers revissedd
(6) for in gritiques]
valid revieved reviaved anawers
IF val id www.rrreeeeeeeeeeeeee.eeee ansuers:
most poot__comoo_anaae Counter www.rrroeddoeeeeeeeecooooeeeseee incst_commnnnn [0][
*"intn[FsLiback Majority Revieved Solutions; An' Anboboor
common anewerl:1>
else:
It reviens dien't produce ansvere, check origina.. solutions original LiLid_original_annee II
[self,
in sclutions]
and for ans in originsl it ans is not None
if valii_original pott_comnon_nneee Counter(ellaaooosge Lanoeeel Lnnwers)) moott_ccmooooC
[10]
tinal e*Inin/Folibeee Rajority Original Solutionsl \noxeo
cise:
Ultimete taaksack
"laln/Pallback) Could dosernino final from ArV
bexo
retura Fospooe, tosal_cost
EVOLVE-BLOCK-END
experincentttteeeecccce (+=xva from utils impert query create_coil Linte__ccl_Liiittos_peo.... from functosls inport partial
a5se query basq_quory_lln partial lquery_
with liniting model_aane-kveet "aodel__ame"" "]]
forward
Linited_cuery_lin anato_oil_iitttetoeeey basc_qucry_litt, max_oallsekvargs (ariiigssaaaaaaaa (ala""
31

---

Published as a conference paper at ICLR 2026
accurasy, cost_total, prosessed, tanaaan agenc_evatuation Agant, suettot_ueey__inn koargs" ["yoa=")
accuracy, cost_total, processed, nun_lingoslis, de
Listing 3: SHINKAEVOLVE Discovered AIME Agent Scaffold Design.
32

---

Published as a conference paper at ICLR 2026
D.3
PROBLEMS
D.3.1
ALE-BENCI LITE TASK: AHC039
EVCIVE BLOCK STARE
Finclude <lostream
#include Coector>
innclde Salgoritlas
#incluee Krandono
iincluee <auL>
Finclude cunordered, set>
finclude <ionanig>
#include <nunerics // For atdirioza
#include <string?
<map>
// -.- RACROS AND CONSTANTS -.-
int WWK.COOR,CC
10000C;
1000;
opnst int PEX_PERTMETRR 400000;
const dooble TIME LIMIT SMMTT_SSCOODSSS SAFETY SARETY_ MARSIN 0,1g // Increased satety margin double ACTUAT, 7THE LIMET SECONNE 2.0;
1/ -.- BANTOM NUNAFR CINFRATTOO -*-
struct NorShict
uinto4_t
KorShi (t
setedssehronosseeeee clocks s (1 iinee 0) << 321 i (1) (1
seceeehhooeepochh epoch count (foint 64_ stds devico
uint64_5 next.l)
x >> 77
x << 17;
int next int Cint nl 1 if On de 01 return 0z returr next () 9 nz
int next_int (int int b) [ > b) retura return next_intt 237 (oxt_doubie rebarn
(deubleiU1NTSS_HGG
XorShirt rng
struct htt.:c/roooottteeooccoooooeee clock:itine point start_timer
std:
[inar reset
double elapsed() conat
auto now std: wew.ooosssssadyy.ooooo rnow
return std::chrome: couaaticn_cssttettttt.. ichrono: :drratioocooobll>> inow sstarttimme........t___......to) countt
Timer timbslttterr
GEONITRI SIRUCTURES
atzuct
int 8, yJ
bool operater<<conet Points othor) const other..s
if othez.y)
bool opesatorme (cona) Pointa othez) conat y othes.y/
Point opezator (oonst Points othes) conat return [x other.X, other.yl:
suruct PuintBash
std:ssize_E operator auto std:shash<inn>> (p.x)]
Points
aulu h2 sids classiiin 11 (p-yl:
// Combining hashess simple XG8 might not best, but often good enough.
Point,
way
chash,
1) connon way Lhelfss okay. return hl 1h2 1)
//
long long cro.s product (Point Point b) swlurn Llong long)
(lung longlaxy b.xt
abeuct Fiah: [
Point
sypes
nackerel, serdine
addi all, Fi st ructss
33

---

Published as a conference paper at ICLR 2026
atruct XDNade
Foint yt.
int 2x15;
KDNlode +laft aulipts,
stat_stract__da -21
7/ Subtres bounding box
İnc nin_x, max_,, mingy, mex
Subtree counts
inc ngant D, *Lant
11 SDModda Fish_kdtteos_root neliptr)
buiid_kdtree www.:eeeeacceeeeoooc........... pndites 2, int E, int axis) 12 12 2) setuzn peliptry
inc mid
stdeenth elmentt ipoint sediiit_idddesseoo_ cedices.
point_indioss. mid, point__ ons oes.gng
[6] lint anida inc h_ids) conat Poincá
all_tiah_atructa (dx1d)))pr
ail_ (b_
retuzn pa.x pb.ss setuen Pa.y < pb.yr
(axis
KDHade+ new (D) node aisstaatruet idx point posint_idiienn Indions Inid]; node-2ot = ali_claa_ (noda sodte---llan ataaaaataattt
// Recursa
rode 3left huild tee (point ind ces, mid
axia):
beight build_ddtzes spo.net indiows,
1/ Tnitsalize rubt blox to this point node Sningx node rode-2min.g node-brrxx nose->pt.yy (y3 1/ Init lalise counte with nodels if fish__ish else node->a
mude
moode->fiah attctttttt__dddd Lype -n 1) nade->in PutLaa 1;
1/ Berge shildzen 1F (node->left)) node snin_x
andn frode bmin,,, node sleft amin
node-3nax_x
madeeede-- node-blett->mox..8)
node-2nin sttd: trode -omin y. rode-bleft-bmiit yl
mode 2max_y
atdd smaxtnode mode bnesays node blaft )nex_y)
node->lett-on. cntz
node->left-os,
it (node->right]
code-2ni- stds oede--nnnn,,
mode--riigt bmmin__))
node-2max_x - node->right-omaa
node-3nin_ y
std: inod y> node-bright-omtt
node 2max
std: snax bnex
node Mode-Sright t-mmxx.yys
node-vn_ent
node->esght--n
node-3s_ant
node-aeighs-be _ntt ontz
seturn node)
void delete kdt ree (Xhlloeee node) // Recursively delete XD-tree nodes if (Inadc) solete_xatres inode=blett);
de delete ret brigh))) solete nodo;
11 --- POLYGON UTILITIBS -..
parrinster otd:ivestor+Pooncc poly)
sioly. resurn
long Long perimater 0r
for (sizc_t 1 0j 1 soly. ++1)
Pcints polylili
p2 poly
sollyssizeel
perinster scd:aabs (pl.x p2.xl std:ichslpl.y p2-y):
bool ie_on__eemeat (Point Point seg_a, Point seg_b! ccrass_prodicttssa seturn std:iminiceq__o. seg_b.xi pix p.x std:imaisseg...k set_b.xi
collingor
std: (soo_a.y, sec_b.yl <e p.v. as P.y <e atd::makisoQ_a.yy sea_b.y)
inc. h polygon.eizocl const std: voccoorooootS polygon)
12 (a seturn falser
boundary
34

---

Published as a conference paper at ICLR 2026
lint
+141
12 1es_en_ (p, polygcn(i), polyger/ 11 6 a])) zezuen trues
vn // Winding
for lint 07 1 mi ++1
Point pl polygen[H]s
Point polyren[11
ipl.y p.y) { // Btart y P.y
12 (o2.y > P.y prodictt (p2 pi, P p2) 0) // An upward crossing, ia lede of edge MG++)
1/7 Stazt y 7 P.y 12 (22.y <n F-Y ás cross_product (p2 ph, p1) 0) downword crossing, 1o rigse of
edge
insidee
// Calculate Crom sccell ch by checking all Fish seni___eeeee__isssooo_ long lang de, dyj
Foint Foint
if (e.x =- b.x) t/// Vertical segnent dx
a.x:
Ip.y std::min buylt
dy p.y aidernialayy, bayle
taa 3 elsa i2 (p.y std: ind ta.ys b.y02
p-y seditmax bighz
wlaw { Buz isontal
dy p-y a.yi
if Ip.x std stdr (evx, bodk
dx p.a sudrrnialass, boads elee if (p.x stds b.a0) p.x
ex 0;
return de dy
dy1
etdsventorroinnts poly, cocou s_counc)
aLoount Oz s_epunt
it (poly.size 1) < 31 returny // Net valid polygon for containment for loonet wutes fish_a Fixh ructa)
www.aaidd__poyooot.c. S. poly!) {
(tieh_s.ttp s.type -- 1) n. count++*
else s_sbint
given rectangle using X0-tree !/ Calculate flsn cocltts_ro_oottnnniieeeo aode, int sunin_x, int r_nax_x, int r_nin_y, ELMAXLY, ints delta_n, int4 delta_s) !.
caloulato_ccoroddett cowoo_oeiit_tooo___ooooooooooeee
delta.m = 0z delta.s = 0;
(Inode return:
r_nin_x F_MoX E_min_y tumexyy
rectangle
proning whole-suberee aggregation.
ved:: stack;
ceserv 16617 // Reasorable zeserve size for typical XD-tree depth
stack.
while (lstack.empty(1
RDNode+ cozrent_node stack.back())
1bokkppp__tack11 11sorrent_nee
// Disicint?
carrent_ood-xxiix s_nax carvent Kuniayy coxeent_nodz--nae E_naK_) continues
if lcursent_nedeee curzent__edd=>2axx
// Pully inside?
ir_nia_x parsent_rade-snih.
aczrent_nose-mmax r_neX_K T_nin_y current_nede-Smia.
64 cozront_noda-maau_ <a (_rAR_))
doita_n - cursent_ood=-m_cntt
della_s
continuej
// Pastial overlap: ascount this node's poins, then travezse children
Peints
ipt.x x_nia_x pt.x x_nax_x pt.y r_nin_y pt.y E_nex_y)
35

---

Published as a conference paper at ICLR 2026
(at1) cia__rialsttusssa fourrens_node aara
Hddelcamm
c1se -tdolca_e)
if loursent_jed=>letti stack, peack.pust (aatort_ooddddddltt (cursont_nod--924400 baack.push_baaee (or.
Chack intecsection beiveen Lwo orchogonal segnenta pia-ple and p2a-p2e bool segments_interantt (Point pls, Point ple, Point p2s, Point p2al
// Sormelize segnents (sort entpoincs to simplify overiap checks) ipla.a
(pla.y pla.y) (pdpssepp)..... gle.y) Vertical, by if ipls.x ple.0) atdersvap x, ple.xis } Hozizontal, sest by i2 (p25.x - p2e.x) I (p25.y > p2c.y) (p2op..) 920.9)) else (. 1p2s.x > p2e.x) auderswap 1p2s.., pla.xls
bool =egl_ (pla.y =* pla.yl: bool aeg2__a_] (p2a.y -- p2a.y12
(xeg)_in_ i
borizonal bath vertinal if [asol_ia_8) ( /1 Boch herizontal
If Check foz y-anigtment and x-overiap
reburn pla-y p2a.y as sidrena(ppaae pla.xt o sidemminppeees pže.x);
alse Both vartical
Caock x-aligmment
y-overlap
seburn pla.x =* pla.x as andennappla.y playyl on stde p2e.y):
// borisontal, Point ILx segl_ 2 pla glsz Puint fue segi_in ple pžez
vertinal (potertial F-junct fon
Point 92S a seel_is_ 2 p2a : play Point 9Le segi_ing B. p2e : play // Check if Interseat fon point (9.a,s hutryl lies on both segrents
fueix y_intersest within
within hos iscoaal segrent's
bas.y se vaa.y bua.y vLeves
secment's y-ranos
beal check_xell interreett Full Iconst atdreventorohhinbe poly) ini. N (oly.siae();
if (M return Falser
Point pla polylålr
Point ple - pollyli + M
for (int 1
skip checking adjacent edges.
Edge ie Ipoly Ifl, poly p (N))) Edge 1 la tooly di,, (311)19)))
1/ Ie 1-0 and J-M 5, shen edge i is (poly(0), polyl113 and wdige y La (polyDM 11, poly(31). Theae adjacent.
Point pãe polyld
Point ple poly
MI: (soamonc__intesserr (pic, ple, pče, p(c1) seturn true;
17 local colt-iintrsecciinn chack: checks edges starting critico___dge_sttee indices_conss against all others
bool oes_eeit_iaccrocciooooooaaa
otd::veccoorooontty poly, const otd:ivectorcintt critical odge sdgs_etart. start staart_nniices...ccciiitii wwndicee_eoosaeee const) inc N pol y.size();
falser
etd: svectorcints critical indices critical Legee start wwt.sattttiiioeeeeeeeeee it (criticel ccritistl_indioosscoo peddices.eepyyy)
indices indicess.com consty Make copy to nodifyy
std::sort (critionl ieritiiaiiiiiiieeeeeeeeeeeeeeeee indices indices.begint)) critical, ceittcal__irdinnn www.iiis.iinniiii.....e
critical incisliiniiiiisssseoee untiiruniqus cestiiaa__ndieeee indices.beeiaff begia(), aritleat_indiosseeelll Eetllcsi_indicee end 1913
for Lint adgei_a_ paoi_____di__aa_tttt Lndiccs edpsL___to__vll need
// Ensure positive nodulo 8-1]
sigel____ee.___ bounds,
Point pls @olylessel____io..ve
Point pely
for (int esge2_ six 07 edge2_ iox M: #4edge2_s_ion bool sa__dd_or__ame_tto_oo.ppp (edge2_a_idx en edael II
//
Sano
edde2_e_idx ledgel___idd_vall
edge2 stacte
where edesl ands
(ddac2_o_idx + 1) U idave__ // odes2 cnds shore adgel starts continaeg
(is_ad]_or_eam__e___
Point pžs poly[sdes2___toee s_ixx];;
Point pže polyí Saudqe2____idd
(segmencs_inteee sintessss_nttteeeseeeeeee_ (pis, ple, p25, p20))
return tree;
36

---

Published as a conference paper at ICLR 2026
bool has velorinct_eertieeeeee wor.toor...aarrrrdcooooo endivecttrrssint poly)
(poly.eng soppyy (1) retusa Lruer std: sunordored wedddoorddddddeeeeeeeeeeeeeeeeee sei-teint, PointHash? distinct_pts/
distinet reservo (psyy
// Pre-allocate for africiency
poly)
if lddiatinet insart (p) aecond) retura false; // Insertion failed, duplicate
zwcurn Laues
// Chack basid atructural vai iyity of the polygon, usea cached pecinater bool sarpaaacccrttrrllyyooooooee (const stds veetor-ooottt paly, long long cachad_pozinsted] inc poly.aiaam)
(a
NAM_VERTICES)) secLEd falaes
12 (a an 01 rotarn truRy
toached_perinnte: FEX_FERINETER)
for Isise_t 6; mz 1111 const Points p1 polylil;
g² polyl
// Cleck courdinate bounda
if 1pl.x < 0 II p1.x COORDO II pl.y < pl.y > WWV_COCRD_ return Zaioes
// The endpoiin golyf 6:111m will be checked in Sts iteration,
explicit
berw
Hine xXX_cOORD_VAE 1I polyI by (oly polyt
alightly redundant.
if ipaly 11442 km].x
MAX WAX_COORD_ COLRD__ODV) VAI.) return falsm;
exia-paralllel ipl.x p2.x pl-y l- p2-y) returr false; exix parallel
lengtà edges
if ipl.s -- pa.x 46 pl.y -- p2-y) subuer. falaw; // Buro Bezo-length wdge (duplicate conawcul ive verticesl
trum;
// Initial polygon generat ian using Kadane's wlgoritim std:/vestorPPonnt
grld
pattsal_pooyyoo po_.yoon_kadaeee(
const int GR1D ST8R KADANE. 350;
Tunable parenecer
const int NIN VALURE WAAUURS_KADANE KADANR CAX_CDORD, VAL 1 1: // Ensure ACTULL CESL. KADANE
Least
std: owt.roorttte 'ongg> grid acores (GRTD_AFER, KADANF, atd:svectard longo (GRTD_ S122,, KADANE, D)17
for Iconet autes tish_8 tish rtuutt: KADANE;
int Fiah.s.p.y ACTUAT,
ACTUAL DIN KADANE;
std:iminle, STPR_MADANE 11; andienex
d atd stinsninje, GRIn_819X_ [c] + tiep_a.cype/ // Sackerel +2, Sardine -1
long Long max_so_tsr tor -3e18; // Sutsiciently small number int best_rl 0, best 0, best -1, best_od o2 -1;
Kecane's aigorithr. for lint of idx 01 of idx GRTD, STAF, RADANY; 44a idx)
std: veccoorccin long> col__strip_sum www.Sut........ SIZE KADANE, 017
(int o2_idx cl_1d; cd_ (ERRE_SSIE__Eaaa
SI2E KADANE; +4o2_tex|
KANANK;
col_strip_cmmir_d00 grid_scores [t_iddd [=_]]]]
10 Kadane's on col_strip_eom long Long ouerent strip_val Int ri_iont_ri_id = r2_idx_1d
rd_iox_1d RIDENEE -+ri_idk_1d)
long long if (carsent_atris.va: D. carsort_strip_vet vol_bare D1
tol_atrippeemii22.coo idk
Extend 15 sun rensins
pesitive
val_herer /// Subaresy
current_strig_vee herey curvent_rl_1d 12_16x_d)
if (carrent_atrie_val nax_so_far) nox_so_fas curreac__ttip_rre
best_rl
best_r2 12_16x_1d
best_el cl_scki best_e2 c2_sdx:
37

---

Published as a conference paper at ICLR 2026
std::eettar2oinc> pplyy ((0,0), 11,31, 10,211: Minimal walid polygon
// It no positive our found, or Lesoc, :ind best singie col1 if (best_:2 ex II nax_so_faz <=o )
naR_so_far -3618) Raset seazch for single cel1
bool Sound_oell falsw;
tint z=0; (CRRI_ATTE__AOMEE +*2) Zoz (inz andy EOGRID_ITRR_AADEEE tea!
12lgct@_ecozeett] [c] mex_ec_(oz)
Has_so_fas [ilLaoosea(s]]ee [elz
beat_ri best_22 xy // Single cell
best_sl best_c2
Cound_eell Lruer
1f colo II fax_so_far (o0) sobarn polauit__poyy // BL111 no good pell, cuturn defaall
1/ Convext grid call so actual
inz K_stazt best_el
ACTUAL DEBL__PHLAAAMME
ins y-slact beat_.r ACTUAL CELL,CEEL_LLMLL AIMLLAANEE,,, KADANE;
(beat_o2
ACTOAL_CEL: CE
y_and (bast_r2
-17
// Clamp socrdinates valld zange
stdrsmin(MAY y-slast sids aidremia (NAX, cooRE y_slart]1;
s_start]];
A_end atd: std::nax max.xaastara, atdimmin (MAX (HAL COORD_VALL VAL, k_andi 12 // Basuze a_and >e K_acars
stds ty.xyy.ttrrt, stdermin cnoan__o___ y_endi Resure y.and 3- yuscart
1/ Ensure nen-zere dinensions
polygon,
area
if (u.tart -- x.end)
if Ixstaai HAX_ccoRO_VALL x_and xasaast 12
expand right, try expard wlaw return pelault_polyy // Single point MAX_cooRR_ VAL, cannot form
end) if ly.start MAx__conn__eee yuend yustart slaw (ysstart > y_a.ack y_stast else return default poly:
adjastment, etsll segenerate, detault, (x. start xnend yustart y.end) return default popultppplll polyy
rare.
std:cvettorcPaints initial_ poly--!
(axtart, y_stast), (X_end, y_xtarth, Ixaed,, y_endl, basttrt, y_end)
1:
return inibial_ponyy
1/ --- STRULATEE AKNPALING ---
struct stdi:veatoocPPintt poly?
inc n_count;
int s_count)
long perimeter
Added perineter
11 nLcount (0), s_count (0), perineter_cocte10) U Initialize perinster_cacht
std: (Long longlm_count e_count
couble wt__jao_ojoctti__cooo const used for SX aczoptance prebability return (douslelz_ count
11
Calculates signed
(shoclace formula)
long long polygea_nignes signes_sroa__inme (const redeoorecree poly)
it (poly. size
return
long long zzoz_pur.
isize_t
poly..izo ++1)
pl poly
const Pcints F2 polyl [1 1) o) 1)])
area_sum = [1ong longl (pi.x p2.x) ipl.y p2-9)7 // (x1x22 ty1+92) variant
aros_pun)
CCN, negative
Cocho local intersection
// Guida coordinates for SA noves
std: ivestor<int> stalic___puldeee]
statie_y_gui atd: ivsttooozzint jolldo) std: :ed:vvectoriint best_poly_y__ut33er
void
best_paly___0uu www.ccicsc...rr()).............. StState4 nex_bett_stata)
38

---

Published as a conference paper at ICLR 2026
poat__poyy___uueeee clear
12
securny
std::set<int>
for (canst aates F nowpper__attto.pp4 hip_x__eet.nnseee (p.x)
tenp_y_aet. insert (p.y]7
poly assign (Lerp best_poll._2_uuddes... ansin wtt.aagcttto.........o.... (nd
and
vold
SAStata quzzent_atates
cursent_state.
culeulate aeroroorreooootceeeeee fronuscratch reuuree polly, our pursent oone ouzrent watts...e..e...oo...ooooo
geleulate_ imster toarssnt taapept_aallee.olllll // Calculate initial perineces
stdhsvedtorOoinl iny. H0,01, 11,0%, (1,1), 10,1;1;
// Ensure initial polyzon is valls, etherwise use default boul in parineter_cache)
in
curremi_atate..
curreat paate__tttcpppyy patee.pooy..i.zef.. size()
has ins_iistionn in ver mor.mmnedddddeeeeee fewdddddeeee pldl...dyy 66
lcheck_sel interasttiio lon (ouzrent_
inli cursent cursent_state staate.pcly tetauii__tin__ooi
oa caleulate soore From ch (ourrent stw.s.pooyy current wtw.atttatennoo. countt, ourrert statt, count curzent wwwpaaeeeeeieeeeoooooo dafault
calculate ineler teseeent_staaa.peee Opdate par insles
SAState
current state;
update post gugides
1/ Prepare static guide coordinaces from fish locations stdresetiints sxuset, sy.sel (oonat sutos [aa (il_cislua {
sx set sxpox); insset (std::mex (0, F_r.po- ax. set.sett.isee cineet (aseeerrttaeeeeeee men COORn, VA (app-xtb);
sp.ot..neerttt_..p.. sy_set.insers (std: 11 sy..ee. iinsert WAX_COORD_VVM Espp-y91)1
sen.esssrtt insert COORD, VAL // Boundary guides ay
static guideee assigg (ex set beginn, ex set end:)); static.y wwg.ge.ddsiiiggeee. beginn,, and 1)
double start temp 150.0;
long long wirreent_xigned_.ar polygon area inees Ieturrent_atate.ppll it (cuzrent signed =- 6 56 current_statt wtt.sstttttttt...ooooo wopyyooyyyyaaa sizesi am3) current signed
// Avoid issues with
sign logie
86. cr.rriiical adge_indioes indices cache, reserve (101; // Bax expected critical edges for current noves
while (gisbal Laabel_ttneredte ()ner.elapeed)) ACTUAL LIMPLLLLSSBCCCOSS)
double tine ratio globsl timer.el (ppere / ACTUAL, TIME 1.M1" SECONNS;
double tomperature start_tomp sodd:poowedd_darg start_terp, time_ratio); // Pine-tune
itenperatore
terp
tergereture tempz
if itinc_ratio 0.95 45 comperature end_terp 0.1) semperature end_tenp 0.11 // Lover temp eggreseively at the very end
jeursent_stace htt.__ttttt.poyyy.e.. current strent_etate.poly detault sttauit_tiny_po0 poly;
happen Legic correct, but as sacoguaed
current_state, .ocuutt current_stato. s_connz)) htt.:/ttttt.prrnntttcoommm calcuisto_pesinns petp:att__ssssttteeeereeeee
// Update porincter
current serentt__ieeddddee area pol.yon__eieeee signed times 2awes_2222rreee staye.pooyll
12 (ourrent_stmet__i
44 current_stats. wttpaatpttttttt.toaoeoeeee soly..ieed >-3) currant_cignad_are 1/
SAStato candidate_state carsent_etstee Copy current state
novs_type_roll (ng.noxr_int(1190)
// Base prebabilities for noves int targeted_nove__pe 35) nove_edge_prch add___ooe__zeb // simplity gets 205
bosi nes__perinete__iintt
candiatt__eato.ppyy..aa VEX_VERT
39

---

Published as a conference paper at ICLR 2026
17 Chack parineter using candidato cached
1f stt.aaacc_eatapps........ 200 14 cad.dae..ttteeeeesssee.o.ooo POLIEEREEEER 0.3) nozz pear_perimettr_iiit truej
1/ Adjest nove protobiitties based on polyeen size/porineter
if inear_ parto_x marrpeeiinter__inig
add_bclae_preb
40;
nove seve__dde_prea 40; simplity la 20
cise it wtw.ddddtt_satt..oo....ooo
(c0)
targetad
move nave_csge_prob 351 // simplity is 25
Putargeted Largesed provp inb eddge palargesed t nove_adge_prchy int buige Punove_odge bdi_balca_prob/
bool nade falser
// Probabilicies for snapping guide coordinates double grob_dyaarissqu.de double attp
0.20 cime_ration
0.73)
if Eype__ty putargeced as
>- 4) Targeted Edge Hove
target_necterre wng. rng.next doublee 0.7;
int lali ait
Int fiakLidx = target_nackese 7 ane sng.next_int (iafistchee1)) nufishJJatt sog.next__nt11 hiahh la_insido htg.a:...........oooaoaaaoeeeeee
stadddare_tttt..ooyy
15 ( fish =- -- isginaide]
falee; goto atterpt Jabel;
long long nin dist best_
(siaatt 02 candidata__taen att.eaaatteeppo..... poly.iiie 113)
long long d sq = point segnent dist itthhetarget........ Flah.ps candidate statee.etttttttllil poy.l (olly(((in hoandidate ate. pol..oly..aaee 1)11
candidat wtw.dddttttttteeepoo....
_egge_ee min dist sq wgr
dueq min_dist_erg
bwst__dgee__d 66
(dest_.ndee_idk 1) nove_nede falawz golo aa
Iin edg best bdge edge__ddde ide;
Foint pl_orig pereddatt_ppat..polll....
Point pl_orig cancidate polyl. redge_
candidate stwpeessstttttsetste..o.
int now_csord_vval.
orig.x på orig.x) coordo target_ Fish.p.r else new_poord target terget_fish.p.s> fish.p.ys
cocrd. stdeimaxi0, stdrsmir (MAX GCORD VAl, cww_coord.vve vall);
int cur jur_deitt_mrop cur del_t_lia_
18 (pl orig.x p2 orig.8) 1/77 Vertical edge
(nov_coord_val pl_srig.x)
eos_novo_attems_iaabll
int query min x, query. nax x: it (ncy_coord_val val pl_orig.x quary_nia_x pl_orig.x pacry_nox_ nok_coord_vall query_mirxx nev_coors_yalj
pl_origxx
for rortt_tor__eetsraao rectargie(
tist_Katree_ee rost, query nia.x, query max.y_
std::iinip_aarra.y pi_oriq.Vl, std:maxioLorreee p2_orig.y), cur_deita_n, cur_seita_sl)
int sion (oav_pocrd_val pi_oric.2) 2:1:: (plorrity pl carrent_eigred area sign
condidate sttiidat__statt_ppe poly cdgg__ixx_ nex_coort_vvil (adre_id
aand nex_osord_val)
Landiaate_stato.n_ccom sim cur_deita_nj
wttiiistt__ttttta__coo + sim cur_delta_si
else Horizantal edge
(ncv_coord_val pl_crig.y)
int merv_nin_y, quary_Max_]
if cocy_coord_val pl_orig.)) quary_nin_y pl_orig.y pacry_nox_y nok_coord_yall }
quesy_minly nev_csord_vall query_mary pl_orig.y
silculsts_scoro_dee for roctooroai
fial_kdtrae atdrminnpLorrss.. pl_orlg.x), atd:snax oo oriii..))) query_nin_y, cur_dcita_n, cur_coita_ol)
40

---

Published as a conference paper at ICLR 2026
int siar toav__ocrd_val < pi_oric.3) 2 -1;
if (pLorri.xx p2oorig.8] siga * -1]
(eursent_ignaaaaaa
sien
ctndiaste__ttate
www.:tttt.oollcooo..o...... cddy_edg__oolll 1ox] .y new colcoorr
candi (edge_ idx cur_delta_r cunddatt__taat.on.cco
nex_esord_yal)
siga cur_dellaaar
int RLeand candldate_orate..epoo size!))
mueritical inwiiiiiiiieeeeeeo bask (dddg__dd Moannd) KLoand])
aaarritie iaciees_cccheeeeeeessscceceeeeee caceaeeccccccccaecceae.ee back (edo
sacriticai_sdpe wwccicee__iiisssee___ooo sachee back lodeo_idx 11 (Leand) Lzues
(ynve_type_roll pu as cardidate ataat pol.la.aol...iieee 5- Hove Rdge
int idge_ids = sog.next lsand aattessttn pol.te.ply..iaee.e.
Foint pl_oriq candidate poly [edge_ide]) aea.aap.lyy........ (edge_idx
pl_orig
Lnt aes_ccord_val a -1)
int our der_della__ee, cur_della__ee; bool seledd
If beternine which guides are relevani (X or V]
conat atd: vedttorccr deigiat_ddrrgiidda (pl_orig.x plLorig.x) 3 sbeat__poly__.guide poly-o-yyyylldee conat swectortt.. selemnt (sl_orig.x pRLorig.x) Relalii
v
snapping dynanic poly! guides
ayneeeant__yy_guuie saddaasa--ammptyy () sa req.taxt_deaablff prob_dynanic sawnanioogcidd__noeo [
new poord (erelevant dyw.nt.dynnnuuu dyn_guides) next int trelevant dyy.ggu quides 2wi.e
Liows
not, try snapping ing to stat in (fish) guides
12 (luoord sellet oi ed Luscessfully)
if (rrelevant stacic dez--eeeppty 66 rag.next doublee e
prob snage io_not_dyyanni hrelesant_atatic.quu [sng.next coord sel ected successfully trueg
cwv_ovord
still not se lecee, use randon displ aceeentt
15 sellerd suc
double tactor std: (0.1, 1.0 time_ratio step
// size decreases time VAI/150000 step_.accto stdecmax 11, lat btse_atspp base_xteg egg_nx)))) sandon dindonddisplooo aplanettt eng.nexii
it ttine ratie > 9, 66 rng.next dosble 0.9 // Very snall stape near end randon acement rng.next_ (-2,2);
11 trandon, splaceenttt
candon randon_diepleene dieplacenent
hetp:eeet_touuuoeeeeeeeeeee < 0.5) 7 -1:1;
(pl_origxx pl_orig.x) nex_coorr_vvl pl_orig.x sonssendispisemmmnnt Vertionl
new__oord_vv) ploorig-y randon_diepl diapleeennnnl acement; // lorizonts edge, nove
now_cocrd_val sta::max stdi MAX__CORD__AA nov_oorrd_val))> Clamp to bounds
16 (pl orig.x orig.s) 1. // Vertical edges ix orig, Y to oX Y.)) (ncv_coorc_val pl_crig.x) (nove_nade falses aas_nov_stteeee__aaee //
int query min x, query. nax XI
it incy_coord_val val ploorig.x) ( // Hoved right
query_min_j pl_orig.x
query
cise ( // Hoved left [now_coord_val pl_orig.))
query_min_ new, new_coorsl_vo vall query_лox_X
scleelata_score, Saltt__fo=_rettttaea
tist_katrse_ro query_nin_k, query_max_X,
std::minipp__rro.. pl_orig.yl, star:makipl.orig... pl_orig.y), car_deita_n, cur_deita_9))
sion (na__socrdvall piLorica) 21: Noving vicht posicive chance (pl_oriz.y 92_oriq.yl siga -1) Correct edge Y-direstion (pl_ozig.y to pa_orio.y
if coursent_saanadaaraa 0) sicn -1; // Corrent for oK polygon (area < 0)
iindidate_ctato.ppo rdge
new_coort_valj
candidata_statee poly. (odge idd +) 3 oand
nex_ocord_val)
condidato_sraate count + sim cur_dcita_mj
candidata_statte s_nount
cur_delta
clse 1 // Horisontal adges (Ls, Y_oria) (LLs, (_orio)
if incv_coord_val - plarii-y) inove_mado faisei goto cnt_nove_attemss__aaee // change
query_nin_y, quary_nax_V) (ns__coord_val pl_ozig.9)
up incresses)
41

---

Published as a conference paper at ICLR 2026
quezy_itn_y pl_orig-y
query_ nav_cocrd_valj
clse ( // Hoved covn IX sccresset, pov_cosrd_val pl_orig.))
quezy_minyy vav_coord_vaa)
quezy_nox_ pl_criq-y
scleulata_score fotror___eott_ooo_eeeeeeeee rectrarrric
ri sudemin pl_orlg,), aidrenaapplorrign (2_orig.x) query_nin_y quary_nax_y,
cur_delta_t, cur_delta_s))
sion (oav_socrd pi_oric.)) 2:1 -1 // Noving "doxn" (X decreases) means positive expands area sign 12
if (pl_orig.x plooig..x sign -1 // Correct for edge X-direation (ploosig.x to pi_orig.x
Liggeaae 0) sign 1; Cocrect for 58 polygon
candidate_ statt..ppo... poly nex_csord_vai)
candidal w.s.aa...pollll....aaaa. ( (edge_
de pal nes_ppord__vll
candidate staaeeesttteeeeeeeee coount siga cur_della_ng
cendidata_statee statdattssstttts_ccooo s_count +* sign cur_delta__)
RLeand candidate pol..eepppo.....o....o..oo..l... sollyyaaell)
so_eritical__dee_ aases_sooodd_eeeeeeeeeeeeeeeeeee incceaiciiiissseeeoeeeeeoe cache wwc.e.ccsh. back [jddo__dd (Leand) (Laand))
sn wdgee andioes,,,a tache puche back (ddge_idx))
decritiial__ddp_iiee indiess cacho, push [ddge_idx 11 KLeand) true;
eise i2 (nove_type_
baige as atrde
WAX_VERTICES 46
candidate stace peree.pol.siioe
aw4) ( Add belge
int idge_idz ang.nest__ne lsandidat sttate poly.
Point PLS candi data_atate state.poll fedce_
Stazt edge
Point p. candi date e_atate.po poly iidge_ids a 11 cand (ttee.ttttt..ol..aaae(1111 // Xnd point of
edge
Int new poord val boul swlrds and falsey
delevant,dyr.guii (pux.x (Leix) po
poly_p qugidess
const std veditvoeetrrirtt. relewent statin grides (p p.e.x) Astatic guides : stat yquiiguddss;
11 Try snapping ge coord
15 (frelevant, Seeean__dynua dynuguides zemply 56 rrg.nest (bubbll) x wroluudyneiis.gu.i gidde..se
guidesi (ing int (relevant dyppent______oeeeeee der----eee- coord val (erelevant cerettdynnnnueeeeeeeeee soccessso
true;
15 (locord selected btteected_ccccceeeeeeeeee eaccesstullyl
if ('relen crelevent.... wtw.s.................. get.e..gi-ee--eepei
66 neg.next_doubll
prob_static__utee ptt___f_oot_yyeeaa_aee
static.guidees guides) (sng.next_ int trelevant_ scatle, acord aer selectededeeeee...... successsall truez
new coord val strelevant_etatic. static
tew. (1
not snapped, randon depth for bulge 15. selord_eeloctedd double depth factor stdsimax
cime ratie 0.91;
bass_dapth_nox (td: (inE) WNM__C0RD__WL/300 int rondon_abs aasso__bbs_epph eapth rng.next iag (1, base degth_naxiz
dapth_factor
if itine ratio > 0,75 64 ing.nene next double!) () < 0.7. iag.
ronson_abs_ccpte
int bulge dir sign (rng.next derebll 0.5) 7 -17 // Randonly outwards invards
relative adga 1ine it
nev_coord_yvil
bulge_dir, _ign
// Vertical
edge, bul in cise new_coori_vvl PLPIY buige_dir_cton sandon_sts_deptia // Eorizontal edge, balge in Y
now_cocrd_val mta:
NAX__CORDDVAL nov_oorrd_vsl))
Foint vl_nod, v2_nod) // Xou vertices for the bulgo int cur_dbita_srge cur_dolta__"D;;
12 (2_s.X en P_e.xl // Griginal edre is vestical it coey_coord_val - P_6.X) (move made ralsey gote (nev_coard_val,
// Bulge is clst
(new_ecord_val, pla.y)s
Restancle for scoze between X-p_o.x noooo_ooor over Y-span oz criginal
odge
catoolats_eocoo_ootta tor
rist_kmtrosroctt stdriminio_s.kk nor_csors_vas), std:rmaxip_sxx rav_coord_vall, etdi itd::nin/pp..g// p.._)))) maaimonpp.../.......
deltain,,, our cur_daita_g)) int sign cos___ocrd__all PLS.X: 71 -1) // Bulge to the right of odgs is positive
change
(R_s.V pLe.yl sign -1) if (current_sigrae slradd 0) sien * -l: cocrest foz on polygon candidate_stade account to siga cur_delta_n candidata_state
ades Y-diroction
cur_delta_s)
cise Original esge horizontal
42

---

R. candl: Published as a conference paper at ICLR 2026
(oav_coord_val PLa,y) tnove_nade falaey gase att_aooettttttt___.. Balge V. yioood a (RL5,), nex vell) vilned = (R_6.X, cov_coord_val)
// Rectangle for delta scoze i5 between TrpLoyy and >enne__oorr_Pssy over X-span oz original
aclcolaca_soor__d011 sateo__dtttt_tooretaaaaaa kist_kamrre_roct, (p.
ind std::nin/ppa... nev_coord_val,, atd::max(p_A.) aes_ocord_val),
cur_delta_n, cur_deita_a))
sign fown_ PLk-y) -1 // Bulge "downarda"" (X decresness menn positáve
aign 10 1t expands area
if (p_5.x P_e.it sign + -11 // Corroct for adge X-diroction
Cosseai Cor 5X pelygon sano_aate__iatteaacooo aiga cur_delta_ry
ctndiaato_statte a_cou + sign cur_deita_s)
1
Towert new wert into polygon
auto ppaer__pos_l = candidate stateet___teppoooee___eeeeee poly begia() + redpe_ids 1) insert_pos_iter candidate statesssttt..tttt.t..to.. insert (Lnaert_noa__tor, vi_mod) candidate polyy.
v2_nod)
1/ Yark affected adeas/vertices as critical for loss1 intersoction chack sererition edge, indices cachee puatt (wdge_idx)) sncrritica_edg indicss back (edea_idx Lesrittial_edre_nnditee cacho, pws.eeccccccc...c....peee.e back (edoe_idx nove_nadee Lrum;
2)1
Singl ify Polygon int. iitt reg.next foandi d pow.. paly.aise (1) // Randon steet for search bool (in kofffee=00; KLoffee: candi date staat.pply ai [ik_offaes]
if (candidate sy- pta.e.poly..iieeeee........
talses
pucceet__poly_aiee www.aaa._wttooeeeeee. candidala wcl...pcly.....o...... www.y.iaatll
41 breaky //
simplity furthor
ink pl_ids idd (Raaaasi_iik RLoffaut] cursent wiw.y_aoo bwwoo p0 idx ipl
ourrent polly before eresel
purrent ae for..
ind p2_ids_old = (p]_ids 1) padeent Cow.weeaaaa
p6 candidate sttelettsstttttooooeoeo poly|p0_iddx_oaal
const. Points pi
candidat a_sada waa.aappplllll..... pplyipt_ids]]
const Points p2
candidate state pop.pppppppppppp idx__io
2001
(pc.x pl.x pl.x p2.00;
bne lineer (p0-y -- play 58 pl.y p2.217
it foollineer_x collinear_y:
w.w..........seee.... (candidate www.teeppll.bgiiin.. ppll. pl_jide); simplified purn
Lroe;
(nt K. K_eand candidate wot..gool.ssieel.
crtticol_ htwpr/c___o_n__os_____
// Vertex pi lat 10x oldi torne the new corner, Ite index new poly:
1f [el_1ex 8) I 77
was polyl01, p0 was poly la p0 is now poly[new_last critical_svree peettex_ixx_nne tnw.snnnnn__ooooooeeeoeeeoe Osherxise, pors iadex pixiex-1 preserved,
MLeand
criticel setiiell..eeeee.... vercex, inurex_po) pl_idx
(teandidsto_pcatte watatt.poly.cppyyl... {
sa_crisical, wtw.criiiilleeee__tieoooo esge_inoices anccccs_cccceeee cacao.ppsh_baa back (orsttiai_.erttxxeeee newlew_poooyy Maaadd
ss_eritical_dda
sa_critical www.rrittaa_eeee_____ Lagg__i____dd_e__eeee ses_cccae.ppshheeeeeeeeeeeeee (oritiiaa
M. oooandi;
breaks // Simplitied
this
i5 Disimplitiess_hheeeoue imove_nade talse; goto end end stte__ // No simplitication reund/possible novc_made true;
// Miter candidate wtate.pessneeer..... calculate, perineter (tandicaae, cetanddcte_eetteepppeee poltt.
recolculate perimeter for candidata_stene
candidate.
end ond_novc_ttterp__itae labell; // label for goto it move is azorted. leig. no change)
if Haove_raad) continuey //
// Validate condidate polygon using the cached perimeter
foadd sata_ddata__apoooo sandidata_stato. por.sttoooocisstttoccccddae II if wtw.olyyooa_trcturrorrooooo candidate_ctats. size() ses_ddisiicc__eette uncrdered wew.rciiooo_ettts..po. continues // Invalid basic structure or duplicate vertices
ihas_solf htt_oooo__Lttrrcccttooooooooo wttpyyyccaaacctttttottoooooo aaerittiell_edp_tidee inc.oo____iccccccccccchc
continuey // Solf-inscrssetion round
Aczept refect
crsteris
43

---

Published as a conference paper at ICLR 2026
double candidace rav__a acore atate, wawee.get_raae_eeeeeeee www.aaaeeeteeeeoooooooooo
double saventt_a___o___oo current_stata wtt.ttttttttattteeeeeeoooee wttpo_ooeerrivooccrraaaa
double scoro_ditt cancidato_ oe Dosront_Fax_001_cc00
1a20zo_air: (tenocrature
Eng.noxc_doubee atd::coo comperatazal))
cuttent_state snoee atttt) Accapt neve (parinater_cadle la noved as welll
cursont_eigned_ara aolyoon_iinnct_ooaeeee 2 (tursent cursent siguo_ssgrdddd 1 Bardle degenerate
Updato signed
as www.eenn......oooy....... ss wat.en._.aaw.ooly...o. 5-3)
beat_atate surcent best solution cound (parinater_cant copied heze)
peaat__post_psly_auee (best_state) // Updato dynemic guides
1 17 loop
// Final velidation of tha bast Iound state: Recalculace parineter explicitly for sarety bool to poia_po wtt.oooosutuuurlalll............ aoandd (bast_state..olly caloulate_perintte (iatt_saate.ooll) parr_ssate.poly poly. < &
Hhax distiiiine inctatinott veet loek unarderdd (bent tatk...py II
interreee_ttteteleee.oooooeeee full atateet.
Pull Intersection chack
neads_reset_ to_ootttt____uut 2200)
invalid,
default
te defaull Lny iny_poly;
calculate secott____oo_____e sesncsesacch Bost bbast_statee statt.. poly, bost_state. best_ata:e.__conc)) best_statw..eer perieeeeeeee
cel callaaak..eeeinette perineter (best statt_gtatt.oolyy Updace for default
1/ If best score is 0, check of default polygor gives o0. (nax10, vallll))
1f wtw.aaaaaaiegii...... oojj ject veeaaoore (1
sastate terp default state;
terporary
to
teng stle default t inyypolyy
calculate, acuee_ fron sera.ch Hommp_aefaalll stat ptats. bungudefaul wtwaeettssstttteeoooooooo Lengude aaabe. count);
terg dengldefuull wtw.aapeeeeeee.......... www.neeeeeeeeeeee.m necee calealase (Lerg defall statte.poyy // Updat for detault
if (beat staat..ttttee... wtw..aattte.eee..ooooo.... jeectt xcure Lamppdeeaalle atte... ject soure
sest_ temp_ wtt.eeettttttteeeeeeeeeeeeeeeeee
I/ Outipt best polygon stdi:cout <e sta.tt.pply.sszee se "An"s for (conet wutes best stace-poly) stdi:zout p.x
p.y 13a7
irt meintint argo, char rargv())
staisios__aser ttt.://ss_ssseoyee__eeeo.o etdiscin.tie (MU1)))
1/ Allow overriding time lsniz via command line arg, for local testing if (argo >
ACTUAL LIMIT
std::atodiasyy (112]
catch lcenet atd: stdisexcepcions
keep defaule if parse fails
ACTUAL TIME LIME SECONDS TINE LIMIT SECONDS SAFETY MARGIN;
Minimon sensible limit
// query_rec wndiciss.ccoiecocccco cache, kdtree, reserve + 5000 + 5001; // Renoveds unused b_aaitiicl_edpettaiiicaa
Snall,
critical
int (Lhold) // Nunber of nackerois (and sardiaes!
stdiicin N_halt;
wwL.Eioh_ttrrcto..esszz 3.hald)i
stdi:vectoriints tien_indioes_tor_te tottrre N_holtl;
R_bair aod::oocattaaa_dddcccoottt bocttcccc_tt_ktttoobeeehhh) tan__addeco__for_ddteee 0)7
#/ Road nackersls
for lint 0f N_holt; ++)
atdircin >> susttshh (ta.f
ail_tton_ctrcccsll...pg
Road sardines
07 for lint - 1 &Lhaifi +-1)
atdescin >> fil_fislaatrrett (NJaar -1.p.x >> att_ciat A1-poy
sil_fish_streca
(Bchae (Rhaat 11.typs -17
44

---

Published as a conference paper at ICLR 2026
// Bulld KD-tase if there are zish
it staustetssstrretss... impty risl ot tangaal
up monayy
12 rdca fil reoo__roor)
BPOLYB-BLOCK-300
Listing 4: SHINKAEVOLVE Discovered ahc039 Solution.
45

---

Published as a conference paper at ICLR 2026
D.3.2 ALE-BENCE LITE TASK: AECO25
f/ EVCIVE BLACK-BCASE
#inclade reant
#include
#include <string>
iincluee Copnerig>
incllde Calgoritlas
<ionanip>
#include Konatho
iinclude <auL>
rinclude
#include
Finclude <zandon>
#include cunordered naps
rdd:ichongsssteet clocksttine point progran start timez
std: tehronos ami seponds Lime_linito ins (18501;
prosl paraneters
K_itemn_globel, Dugroupe_globll, Lglobll int queries_nade = 0;
std:1m:19937 eng_ongine)
// Doery Kanager with optimized eechinng QueryNanzger
private: inc 0:
ints queries__adc_ree
tlass // cnрiн2) // comparisons
191 comparisons
stdi:umordereeennn-iiieee std::nt119975 tag
inline uint32_t (int
ebdesmialb, the
0)
return (static cast tal <c 363 lstatic cast (mn) <c 8) (Xx))
chaz perform_query qucrry_ccoooo actual (const otd:ivestorciae> Littens, const resetoraad R_items) queriee_nase mase _et____t____r_e__
atdiicout L_itens (int iten_iax (_stons)
(Litens
sodut
item_idx;
(int iten_idx RLstoms) stdut
idxn_idx)
std::cout << std:tondl;
char resuit_chazz
stdirtin 35 resuit_char) return zosult_chary
publio:
Quesylanager (int N.,, int 2. int4 qn, std::mt119376 EBL), QIGLI, paerics_nadd_rcffooo (nd 10);
ond Lool__las
anolv2.rosarve
b) recern t-r;
int na std::niala, bt, as scds inax b) char szched cmpl_fla:[an x mx]; nx] if teached 0)
(a az) zecuzn eached;
seturn (cached au fer 1st (ssched
if Iqueries_nade_ref
chat cws gez www.Corn..parry..cuulllll. llml, (bl) if we nn)
capl_ [mpl_fllttin
mxx
15 (rea wu ret) empl_fta: ton X mx] 721)
elae if fres (yt) cegl [f flltt (an N. mx] 1it
ingi_flat
return res;
then comparelyk (int itee_cure, iter,prev, Inc isen_a_aux)
if Lous =- Sten II icen an issn suauk IIl pewn Hemesseass (iten
item auaux return comparel tibem sten previ; isen_prev)
comparel luten iue]_ return comparel cuban iteruprev);
32 1. key keyle2 (uben,ouse, Sten,prev, iten_x_aux]s cmplv2, rind
lit coply2.endd return It-bswoordy
46

---

Published as a conference paper at ICLR 2026
iqueriee re return "w";
char zea wow.eoooaayyyttoaaaae (1teoaallltttnnearrr (dten_prev, 1 cmp-v2.cmplace (key, ra5),
vold exhaust_ querriss
int shile fquaries_mado_ref <
porconn_uuay__ectalll1. (2))
++b
[b R)
b- D;
11
o1
11
Reight intatiion module class MaightEstinator
privale:
static constexpe long long BASE_HEIBEE HEIGH? 13C00Cy constexpr IACTOR
stabic consieape PACTOR_12 50;
static constexpe lnt PACTOR_KO_FALLLE 100;
QuezyHanegess
D,
double watinate aa 2oo22 (double val)
stdeslogg (vall;
int calculate query Lint val, int kupivots
B2 if Pk_pivots zebazn std MLval 312
Ik-pivota
double cost 0; cost 1- k_iivess wnt.ineee (k.iooot
3 k_pivots: +-31
(3 cost i- inate. logtteloo9 (3 1)z
val pivots) estinate_ ltg.:k_ppvotoo
void pivota deseetrccoor pivote, Tic left, Snt rights right] return;
int mid (lett right) 2:
pot mosge_cort_ptrots
left, midi;
rigat);
mid std stdirvectorcines L(ml), Rin21;
1, right mid;
(int - 0,
+-13 blll pivots(lett + i1z
(int
+-1) RIS] pivots(mid 11:
int i 3, 00 k- leftz while 11 56 erp gr.conpe (D. RigDT (onp
cmp rwt) pivote(<e)) b114+)
clse pivoto(kee] 815++17
while pivote(it4)) b/1441
while 11 < a2) pivots(stt) RIs++]7
public:
WeightEsttimsooo (QueryManageré gL int X. int D. int Q.) gn(ggu RID, DIDLI, 050.)
vecttrecooo ostimate ostamsse_wecohted () std::vectorc.oog Long> wesgnce NEIGHNT
// Determine pivot count k_pivots
11 for (int Hj 22 --kI
if (calculate_quar__ccoo K_pivots
X_oivats udd::ninn__iives, N11
1f (k_pivot = return weighear
pivots
47

---

Published as a conference paper at ICLR 2026
atd:vectoreence pivota (K.Pvettt
std; =vvivooooeinn indices (N)
std::lota (indicssdsssss.ooeo begin indiccs.cnd(), 0);
stu::shutrle wtw.serieeiiiiiaaeeee...... beecitt,,, indicas.erá0) =og_enginal)
(int
R_pivots: ++1 siveta[L] indisea[-ly
1f Ik_pivota >u 2) perse_sort_pivote (pivots, R.sivats
1/ Retimate pivor weights
10 tplgaca
BASR_MEIGHT;
for (int 1- 0J 1 M +-1)
if (1 -= pivota(0)) concinus;
en.corparel pivota101);
frex f=f] (eightx(i) BAGR_ME
else if (rea ret) weighta[s] std::max (1LL, BASE SASE_NEIGHT PACTORLLT / 1001;
eise weighta[1] atd: BASE_MEICHT FACTOR_OI 1601)
Muiti-pivet ostinatioon veight [pivols[0]] BAGR_HEIGHT;
Bandic pl
thet reapel = gr.comparel [1l,, [C]l)
15 (rea_pl es (ur) veighca [pivots weights [eivoss:
tres_pl
veightslpi
stdirmex weights FACTOR_
else highhalpivvtaat]]
stds weightsfpivots
FACTORLGT / 1001;
if (reaupl fsr 66 veightzfpi vot ee weights (ptttots seights (pivotaa seightalppboiss11]
If Handll cenaining puoousa with binacy swarch bzacketing long Long
stdrimsx(1, 1012
(int. = 1 kupivotez 113) int was = pavols [Jl, powe = pivoLatj-1]; char qn.corgarel tour, prev);
(sea twr]
veighta [cur] - wpights
wlae if (res (et)
veighte [cur] (LLL weightslprev! FACTOR_ST 1001;
1/ Binsry search to bracket X_]
Long long 1ox X_nign bound; bool
high.set fal
int ldw 6, high idx Int trims s061smex fta cest cines (atds (ext iwate, 1og? (stids smax high_idx
lev_idx 2331)33
For Cint - 02 < tries 96 low low.ids de high ds queriee made G: 44t) int mid_idx fiov_idx aiga_idk) / pavoce Inid idxis char rea_lv2 wgn.oonpeeelv22 fenr,, prewy 831
tres 1v2 (wf)
X_iox X_high wclgats(e]p
lew_set high_set true]
break;;
elee (res_iv2 rer!
X_high weights(el;
high set truez
high_ick mid_idx
weightslslp
1aw_sct trucs lou_idk iid
long 10ng est_Xi
[low_set !high_set)
X_lov #ACTOR_GT
else itlow_res high_sett est Xigggh FACTOR 109;
clss if (low_act is higl_sct) est_X (KL1ow K_hiah) / 2)
else est_X - veightolprev] FACTOR_KA FALtaBB / 190;
est_x itdi:naxiil est_x)) ceights/cur] beights(preev est_X)
Snouze monstenicicy
1f. (woiches/cue]] weights(srevi) woiches/cus weights(pravl)
if. (xes - 15r is veights|cur] - seichte [prev]] reights(cuzs] waschce [pzer] + +
Estinate non-pivot woights atd: tyectersbool>> is_pivot (6, falsel; pivots) is_pivotip)
48

---

Published as a conference paper at ICLR 2026
1-1 ir (29_pivo=(4)) consinus)
'_iivots found quaries_nade Q) int mid 11aw hight / 27
while
chaz rea en.conparelle sivota ( slae jeus terr high else low mid 17
found midy breaky 1
(Cound
wcirhcela] wecontoiporroesttoonnl] cont inuns
int. pea law;
if (pos 0)
long long (nightss
(k_pivoss 2)
long lona xi waights (pivots
if (el wi &s wa oy seightsli] andd v0 wo w3)
seighta(k]
(112,
else weighta(i) stdr (1ll,, wd 21:
(pos k.pivots) Lang long weights (pi (h 1117
12 (K_pavats >- 2)
long long wk2 (eights(pivoee [R. pivats 211:
ok2 () swightsli] [ill
okl w22)
neighta(1]
maa 1112, xk1 213
} =lae weighta(1) aids zmax (11,,, wal 212
Lang long wl wwightts (pávola Ipoa 111;
long long weights (pivots (posi];
Lf weighta(]] statio_ lungo (atds sqet Ja caat sdoubles (u13 wal)
3 ellee weightx(1) (vl we)
we weightall) stdd ii a [Hl) wiir weightsll] = atids omin beelght [ill wei7
weights(s)
wiights(1))1
Finel validation
tor (int - ++3) IF (xsights(s] oo d0 we lightslfi] WATGHW
return weighte
Aesignment optimizer clase Assi gpt inizer
private:
atd: orecoorcooo long>é wenghte;
ctd::nt199377 zagz
rvectorcogg lorg2s sums, Long "ong total] if ID <- 0) return 1c18;
double mean
double staric_cattcoouleeetttat / D;
long pums) sun_eq patic_casttccublee.o
double var sum ag / mean mean; return ind: vaz);
public:
hacigmmentoprrisserriii R., int D., std::vectorciong long>s atd:: XIRJ,, D(D)), weights
vectrrectsssttts optinize 1
atd::vectorcines assignnant (N,, 0)
std::vectorecon group_suns
std: stdi/vectorsetd: ivectarciness group_itens
std: o:d::voctorcin iten_pos (K)
initialisation
scdiivecioreet:: spaireioppiiiion long, itars
for (int 0; 1 ++3)
strted_itens htw.odiitessseelll..eooo poolaace_ackk-weaa
41
1sorted b)ggint), cortos_itons.cddd11
49

---

Published as a conference paper at ICLR 2026
long long total_pum
roz (3uto [acg_X, 1sem) coxted_itcms)
int
g +-3)
if (group_cuns [e] group_cund [b:st_group]] best_greup ar
ascignment
iten_pea(iier] group_ groap saise group stons [bost_aroup] back qroup_sund [best_sroup) + weights
Lot veighis [=tem];
double carzent_yar calo_vari vancce agnn, Lotal_aun),
// Rehanced search with best
if ID > 11
conat int HAX_ITERS 400g
K_TTENS
for (int icer Gj itez NAKLITERS) ++itor)
if (fiter 311 01
isteady elooks snow
chrone www.onnnndddaattaooooooooooaaaae ddratiion castatiionnneaeeeeeeeeeeeeeeeeee ichrono Ind-iiccoodd Licccodd>> (now progran_atars_ttin
Lin_linntt_mm breeks
int mangg C, minyy 0z
foz Hat q 1 a < Dj +10)
I8 (gronp.xuna(g)
sons
10 (gnoup
grouppannaaaiit.a mingy 97
if (nwxgg -- minug II proup_items (nx..g) ceppt (1) break;
Rind relocate
nax g among top-X
vedeotttorttdd spaeortttddraaarddde spaidiiaaine plairclog long, intoo candidates;
Cue Hal item itemp [nax_a]] candidates. empllee back (weighte [itenl, item);
(candidates... emply (1 breaks
stdessort leand: beges. candidates.ens
(1 iconst autos a, const autos b) recurn
first b. fieat; 1):
(lint) conts//ccitttss.iioe
KLITEMS candidates, (K_TTE
domble best_var = currsett_var
int best_iten- -11
candidates)
lang long nexunex group [nax__g
Long long nex_min group sumsimin. M double (new_var 1e-12 best_var) best ver nex vari best_iten iteny
cal vavovariaac Heee new group [nax.g] group. suns (min_g))
it (best_iten -- -1) breaky
Apply nove long long x veighte(bert_itene group sums g) -- 87 creap_ours(tin___ current_ver cale__variancceprrrrpoooo totsi_puu);
// Update tracking
int tten_paslaest_ct
group. Inax glw.ee
if (best_iton last)
group_itensine ite.ssmnnnsa [pos] last; [ten_pos(last]
group iiteeeteeeeee max_ ppop. httppppcckk...pppppoooo.oooo..kp back (1)
stcn (bost_ areup_itens Inia_g) greup_itone inin_]) pack__osck ibest_iten);
aesignment (best_isen min_g:
1/ Tarosted Sinclsted Arnealing 1t 11
double 7 std::nax (1.0, cursont_var 0.251)
dauble htt.:rm_rroooooossiiiiie... std::unitorn_ree
0.95985;
10.1 1.017
Lnt iterations 0, no_imp
while (true)
+-iterations) if (litorations & 253) 0)
auto now std: chhonno sabeady clooks snow iatdicchrone won. chrroa ind-1ssccodds>
cimo_limit_ncs breake
50

---

Published as a conference paper at ICLR 2026
cool_rater
12 (I 12-121 bresk)
Targoted noves: baavy-to-lichh rolocate, SNap 11 (lenge) 81 1-
/7 Targetad relocate
mAx
(ini g 1 9 < rig)
tezocs_auns [o] azocp_suns [nax_a]) nax_s
(group_sune [g] ezoup_sune (min_a]) min_g
12 (group_atoms [nax_a] cmppyy()) ++po_irp/ continuey
Fick iten iteng [n)x (rngt) group_ (1 for (int Oy a e 2, rea)
(best samples)
int cand arcup_itens [nax_a] (eng() group_itans
(veighus [cand] veights iten candy
Long long [iithh:[item);
long
[sax_e]
long lone acn_min group_ [mir_o]
deuble nex_var curzent_vary
cest
(group (max.g]1 group
ven [scatic oas able (group [min_9]] ggoonp (man
nev_vaz +* [scatic] cast cbuuble> (aex_nax) nex_ Dj
Iscat ca ddoubled (nex_min) nex_nin)
double
nex_var cursent_var)
If (delta < 0. 11 uni uni (trng) (tdicesp(-dell delte T11
Accept move
varj
group (max_g] nevineep
geoup_ [minng]] menaning
int ios (itein
int laat geoop_itemm (nax_g).back if riten te lass)
group_itens itens (nex_g] [pos] last;
iten_pes last] posg
group it ena [nax_g] poo_bback (1)
liten] group itens_itens inin. ...izgee) group [nin.g] puan (ftem);
axsugnmenn [iven] [n] minnge
rdelte te -1e-12) inging Oz elze +4no. elle
clse =+no_imp?
7/ Randon ssep
zag $
[g? gl3 rng
Igroup_ (g emptyy ( 11 irempp.i (emp) 1 Hino_ing cont inoez
inc group items gl) (regt) 8 itens (gl ssl
@coup_itens [02] (zng!) group_itens (ett s2)
Long long wа weights (a), Mb weightslble
Long
Long Long nex_g2 group_eume
double nex_var cursont_var)
isratic_cast-ddune s...sttccuublle _ums group_ suns (g1))
cloubles (group sunelg?11 group suns[g21) (21)) D;
ner_ver + cot.r:/ccccttceelleeeca...
now_gll gll Di
ney_ +- (scatic wetettc_casttcconeee cawbllcttttteeeeecccccooooeeeeee (nex_g21 new_g2t 22 /
double nex_var cursort_varj
it (delta < unitlrag) std:texpi-selte T1
cuzreni_vaz nex_var)
group_sunsig.j group 1repp_sumsig11 nex_g2j
// Svap items int int back_a group_itsess itome [Ql] back back_b sroup_itsmsidd (a2] (back())
iten_pos(a],
itan_
it ta back_at ai group stens (gl) (poc_a] back_ar iton_por (back_a] pos_ss group_itans hopptalllpppppckeee.
stemp
back_bi greup_itans/ee orcco
back_t) iton (back[b]
greep_itene ppp pop_bask(()
[bs atenp_itens (i groap_iteme (ttpellltpppppppppee (ack__b ascignment
[cs]] aroup_itona 912). atoup_itams (02) back assicmmen:
(doita -1e-12) no_ioe +*po_ir0) ++no
51

---

Published as a conference paper at ICLR 2026
11 (nc_imp X 12) breaks
return assignment)
int. main
atd: tii. (HUL2)
progran Lime std: rehronor cotooooooeeaiie raceady slow 13
cint64_t seed ichrono: duration_castestee
shdzrehronessee geat eatly ellcy noo () since (1) count 1)
snggeng Lin, seed (seed)
stdrscin NLitensgllbba Bugroupeuglobb Q_iotel_glabal
QuezyWanager qu clobba, Aitotal_olobal, quaries_rade, rnq_eneins)) Weight Fat inalus was inttter (qp, KLibemn_global, begroupe_gleell Q.icctelllooblly
std:: vactorsiion long> weights cediatoor..rrmmmeeeeeeeeee))
kss AwwiganentOpliniin intinisee (2 (lLitayy D_groupa_glebbl, neighta, eng_angime); std: vedccvrciiiin assionment opc ont.iiee..otinneee))
fink N_ileme globee 191)
acdarcout assionnen: [1] (L X_itena_plobal 2 Oaa ')
8VC1VE BLOCK 3ND
Listing 5: SHINKAEVOLVE Discovered ahc025 Solution.
52

---

Published as a conference paper at ICLR 2026
D.4 MIXTURE-OF- LOAD BALANCING LOsS
gace_logite, tuploitorch. run expertei int,
top 9,
atzencion_mask: Optional Tensor) Nona,
+ tonch,Teneors
Goad balancing loss Bixture-ot-Bxpett models.
parametors
1sycr_logits:
1ist wita shape (8, T, tocal_experesl per Layer.
total_oxperts:
number
incide roed-forward sub-block.
tep_e_ext
numbez of experts chesen per boken (k in zop-k gating)..
atsention_nack:
optional
marks padded
rotuERS
torch.
training objactive.
determine device flat token count
devize tun_layers len saaigat__ogiiaa) b52, seqion sscontion_naak.hhapp n_lokenn bax seglen
sevice
narge layers into (coxens, layozs, experte) stacked Lorch, stack Igat logita, din- Lo logits stacked. tokenn,,, nin_layers, nxn_experts)
Lo (device)
obtain souting information
zoutina_probs, sel_idx zoute coot (logita, too_k) swl_mask F. F.one_hot [sel_idk, nun_waperts)
attantion_nask None:
average over all Lokens
avg_ael nel_mask, Cleat (dizz0))
avg_pzob routine_prabs
elwes
expand apply maak
nLoxp {
ion_nesk, !
unaqueeze (-1)
unnauuenee [-1]
rsspadd (laes, seglen, oun Layers, Lop_k, aun_experLs)
reshapp [-1, sun_layers, top_k, cun_exparta!
evg_aet mei_mask, Clowt (fauul (naepp) (din==)))) / sunsp.
attent ion unsqueeze
unaqueene [-11
respand (hes, seglen, num_ layers, nimeexperta)
ceshape 1-l, cun_layers, nun_expezls)
prob rout pro.s corooossmml and (panask) (p.nnss) (um(din=))) / sun
misnatch penalty
per pay_l avg_ael anggueeeeeequueee
lase per leye..mannn (a)annt)..umn ceu(() nun exn_exx
Mininun usege aegularisess ariser: saftly penslize underused
avg_sel: (layers, top experte)
For each expert, sun over top to get botal selection per expert per layer avg_sel aaunellaunnlaa 21 4 (layers, experis) Nornalize that sun over experts avg_sel norm sog_sel__on / lavg_sel sel, zum, sunteineell keepdi 1e-8)
per layer
of
trouting distribation)
copy (avg prob
leg leglavg_rres prob 1e-81) Idim-11- (layers,)
nax nax_ontrogy torch, www.torch..tneeeeeee.. tensor (oum experts, srppesss__pooddttpp device-avg corccb preb. wtw.:_..c.cccecc/
entropy scele = 1.5 entropy max inex_ entr 1e-B1 ranges from 0.5. conitorn) to 1.5 teoncentrated)
Penalty: eaccurage min threshold 0.01 164.0 nom experts;
expert
min_thresheid
min_usage_ peosity torch worch.reiiiiennchreeeeoo avg_sel__omm .smm (din=-1)) penalty.
Llayers,
Final loss: main entrapy-scalee ed min usage pensity nain. loss penality coeff inin pensity entrogy scale).meent
Listing 6: SHINKAEVOLVE Discovered Mixture of Experts Load Balancing Loss.
53


Reviews:
[{"review_id": "28inQADNrO", "reviewer": "Reviewer_R7yb", "summary": "This paper introduces ShinkaEvolve, an evolutionary framework to overcome the sample efficiency problems in prior works with three synergistic pieces: Parent sampling, code-novelty rejection sampling, and Bandit-based LLM ensemble selection. Experiments on several benchmarks and ablations prove its sample efficiency and broad utility.", "questions": "1. Could you explain why it claims the bandit ensemble “significantly outperforms” both baselines (line 455), yet also notes it only “slightly improves” (Figure 8) over a fixed uniform ensemble? Quantitative deltas are not explicit.\n\n2. What’s the exact parent-selection formula? The ablation plot labels “Novelty Weighted,” but the description elsewhere emphasizes fitness and offspring-count weighting—does novelty enter the score, and how?\n\n3. Why choose a 0.95 embedding-similarity threshold—and how sensitive are results to it? The threshold is fixed for several tasks without a sweep or rationale.\n\n4. Why is novelty filtering disabled on ALE-Bench but enabled on AIME/circle-packing? What trade-offs dictated this per-domain choice?", "limitations": "", "rating": 4, "confidence": 2, "soundness": 2, "presentation": 2, "contribution": 2, "strengths": "1. **Clear Motivation**: The paper targets sample inefficiency in LLM-driven program evolution and proposes three synergistic components:  novelty-weighted parent selection, code-novelty rejection sampling, and bandit-based LLM ensemble selection—all described with algorithmic detail.\n\n2. **Concrete Reproducibility Details**: The paper includes hyperparameters, task harness details, and states that anonymized code is provided with plans to open-source.\n\n3. **Multi-domain Evidence**: Extends beyond a single toy task: evolves AIME reasoning scaffolds, improves ALE-Bench solutions, and proposes an MoE load-balancing regularizer for training—broadening the paper’s relevance.", "weaknesses": "**Heavy System Complexity and Tuning without Sufficient Sensitivity Analysis**: The framework has many moving parts and hyperparameters (islands, migration, thresholds, patch types, UCB1, etc.), increasing the risk that performance depends on careful engineering. Specifically, a fixed embedding-similarity cutoff (0.95) is used; aside from showing it helps, there’s little analysis of the sensitivity or cross-task robustness of that threshold.\n\n**Modest Gains without Statistical Significance**: Average improvement for ALE-Bench is about 2.3% over a strong baseline across 10 tasks—useful but relatively small; variance or statistical significance isn’t discussed. The SOTA claim for Circle-packing comparisons is presented mainly relative to AlphaEvolve; the breadth of baselines in this domain isn’t deeply examined. \n\n**Effect-size Ambiguity for Ensembling**: Text/figure messaging is inconsistent, see question 1.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "muuHAFhTSN", "reviewer": "Reviewer_fDBZ", "summary": "This paper proposes ShinkaEvolve, a framework that addresses sample inefficiency in LLM-driven program evolution through three key innovations: adaptive parent sampling balancing exploration and exploitation, code novelty rejection-sampling to avoid redundant mutations, and bandit-based LLM ensemble selection. The approach is validated across four domains including circle packing, mathematical reasoning, competitive programming, and neural architecture design, achieving state-of-the-art results with orders of magnitude fewer evaluations than existing methods.\n\nStrengths:\n1. The paper successfully demonstrates improvements across four diverse domains: geometric optimization, mathematical reasoning, competitive programming, and neural architecture design. It shows consistent performance gains with proper ablation studies validating each algorithmic component's contribution, and includes generalization experiments such as the AIME scaffold working across different LLMs that strengthen the practical applicability claims.\n2. The work introduces a well-integrated three-component system combining adaptive parent sampling, embedding-based novelty rejection, and bandit-based LLM selection that addresses real limitations in existing approaches. The framework produces immediately applicable results like the discovered MoE load balancing loss for training large language models and competitive programming solutions that outperform expert baselines, effectively bridging evolutionary computation and modern AI research with both principled algorithmic design and strong empirical validation.\n\nHowever, the bandit-based LLM ensemble approach uses a relatively simple UCB1 variant. More sophisticated multi-armed bandit algorithms or contextual bandits that consider the current state of the search could potentially yield better results. The paper doesn't justify why this approach was chosen.\nIn addition, this study is an applied engineering method of LLMs, the innovation of technical theory is relatively general.", "questions": "the bandit-based LLM ensemble approach uses a relatively simple UCB1 variant. More sophisticated multi-armed bandit algorithms or contextual bandits that consider the current state of the search could potentially yield better results. The paper doesn't justify why this approach was chosen.", "limitations": "", "rating": 6, "confidence": 4, "soundness": 2, "presentation": 3, "contribution": 2, "strengths": "1.\tThe study successfully demonstrates improvements across four diverse domains: geometric optimization, mathematical reasoning, competitive programming, and neural architecture design. It shows consistent performance gains with proper ablation studies validating each algorithmic component's contribution, and includes generalization experiments such as the AIME scaffold working across different LLMs that strengthen the practical applicability claims.\n2.\tThe work introduces a well-integrated three-component system combining adaptive parent sampling, embedding-based novelty rejection, and bandit-based LLM selection that addresses real limitations in existing approaches. The framework produces immediately applicable results like the discovered MoE load balancing loss for training large language models and competitive programming solutions that outperform expert baselines, effectively bridging evolutionary computation and modern AI research with both principled algorithmic design and strong empirical validation.", "weaknesses": "the bandit-based LLM ensemble approach uses a relatively simple UCB1 variant. More sophisticated multi-armed bandit algorithms or contextual bandits that consider the current state of the search could potentially yield better results. The paper doesn't justify why this approach was chosen.\nIn addition, this study is an applied engineering method of LLMs, the innovation of technical theory is relatively general.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "NlMXlhCBdg", "reviewer": "Reviewer_6V9n", "summary": "The paper introduces ShinkaEvolve, a method that uses LLMs in a sample-efficient way to generate code and algorithms for scientific discovery. The system is built to improve sample inefficiency by guiding the LLMs to only pursue promising ideas through three key steps: adaptive parent sampling, code novelty rejection-sampling and a bandit-based LLM selection strategy. The authors demonstrate their results on four scientific and engineering tasks.", "questions": "1. Could you provide an estimate of the system's sensitivity across domains? Does the performance observed in one domain generalize to a new one without requiring extensive retuning of the system’s parameters?\n2. Could you please elaborate on the limitations of using an embedding model for code novelty rejection-sampling? Also, in Table 3 (ALE-Bench config) it seems like it’s not being used.\n3. Could you further clarify the core technical novelty of ShinkaEvolve and how it distinguishes itself form existing state-of-the-art evolutionary-based methods for LLM scientific discovery (e.g. AlphaEvolve [1])?\n\n[1] Novikov et al. \"AlphaEvolve: A coding agent for scientific and algorithmic discovery.\" (2025).", "limitations": "", "rating": 6, "confidence": 3, "soundness": 2, "presentation": 4, "contribution": 3, "strengths": "- The paper aims to establish the building blocks for efficient agentic scientific discovery, which is a potentially high impact problem across multiple fields.\n- The paper is well-structured, demonstrating clear explanations and principled ablations supporting its key contributions.\n- The experiments cover four diverse and relevant domains, including an MoE architectural design challenge which is more open-ended. The results seem convincing and the discovered LBL regularization term found through this method is interesting (at the very least).\n- The authors have shared their code and scripts for all experiments.", "weaknesses": "- The system is relatively complex, raising concerns that it may require quite different configurations across tasks or domains, which could limit its generalizability.\n- A potential concern with using embedding similarity for code novelty rejection-sampling is that it may favor semantic or structural similarity, overlooking small but critical code modifications. Also, the LLM-as-a-judge component seems redundant with only marginal improvements at a high cost.\n- The paper claims \"order of magnitudes\" fewer iterations compared to baselines for the circle packing task. However, it seems like the observed efficiency is at least partially an artifact of optimizing a surrogate objective of a relaxed task (Section B.1, Figure 10).", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "V94KTancmJ", "reviewer": "Reviewer_Smk8", "summary": "This paper claims to introduce a new method that leverages LLMs to perform evolutionary algorithm search for the benefit of scientific discovery. Empirical results across a handful of domains are presented.", "questions": "Unfortunately, even if the authors can prove there are no ethical issues, I cannot understand the novelty of the contributions from the writing.", "limitations": "", "rating": null, "confidence": 4, "soundness": 1, "presentation": 1, "contribution": 1, "strengths": "The setting is promising and timely. Generally, the text was typo-free.", "weaknesses": "The paper is not coherently written, and I suspect it is entirely generated by an LLM. A (very non-exhaustive) list of suspicious features include the following.\n- Introduction is mostly the abstract repeated verbatim.\n- Paragraph starting line 110 is suspicious. Many terms are imprecisely used or not defined, e.g. “elite size,” “mutation context,” “primary parent,” “archive samples.” I can’t imagine a human writing “diverse exemplars for creative recombination.” The rest of the paragraph is similarly flowery language while not being quite precise enough for an ML audience.\n-The overall problem is not defined anywhere\n- Line 129: F, P_i are not defined before use. p_i is defined twice, differently. \n- r_i is both used for the rank (line 124) and for fitness value (line 210)\n- The name ShinkaEvolve is never explained. \n\nEven if the paper was not LLM generated, it does a poor job of explaining the concepts with enough details that I would be able to reconstruct the algorithm or convince me that the authors understand the novelty and components.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "fOSYNhgdK1", "reviewer": "Reviewer_nTzs", "summary": "SHINKAEVOLVE is a framework that uses LLMs to evolve programs efficiently for scientific and engineering discovery. It addresses a major limitation of prior systems—sample inefficiency—by introducing three innovations: novelty-aware parent selection, code novelty rejection sampling, and a bandit-based strategy to choose the most effective LLMs during evolution. These components work together to dramatically reduce the number of evaluations needed to find high-quality solutions. On the classic circle packing optimization task, SHINKAEVOLVE achieves state-of-the-art results in only 150 program evaluations, orders of magnitude fewer than previous methods. It also generalizes across domains, improving math reasoning agents (AIME), competitive programming solutions (ALE-Bench), and even discovering a new load-balancing loss for training mixture-of-experts models. The system demonstrates that LLM-driven evolutionary search can be both powerful and sample-efficient, advancing progress toward open-ended automated discovery. However, it still relies on human-defined fitness functions and structured problem objectives, leaving full autonomy as future work.", "questions": "N/A", "limitations": "", "rating": 6, "confidence": 2, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "SHINKAEVOLVE’s key strength is its high sample efficiency, achieving state-of-the-art results in as few as 150 iterations, which is orders of magnitude faster than prior evolutionary LLM systems. It also demonstrates generalization across domains, improving solutions in optimization, mathematical reasoning, competitive programming, and even neural network training. Additionally, it introduces reasonable mechanisms—like novelty-aware sampling and adaptive LLM selection—that make the search process both effective and scalable, setting a foundation for more open-ended AI discovery systems.", "weaknesses": "1. #1 claim (sample efficiency) is shown on one canonical task with incomplete fairness controls. They highlight “SOTA in <150 evaluations” on circle packing and show an evolution tree and cost curve (Fig. 4), but I don’t see: multiple seeds, wall-clock comparisons, or matched compute/budget against the strongest recent baselines. The paper states 150 generations and that it “outperforms AlphaEvolve in less than 150 evaluations,” but it seems not to report variance or rigorous ablation under equalized budgets. That makes the “orders-of-magnitude fewer iterations” headline hard to audit.\n\n2. Every domain here is driven by an explicit numeric fitness (packing objective; CE+load-balance proxy for MoE; AIME accuracy under a fixed query budget). That’s fine for optimization, but the paper’s “towards open-ended discovery” framing isn’t backed by tasks where the objective is underspecified or emergent. \n\n3. For the MoE study, SHINKAEVOLVE runs only 30 iterations during pretraining and optimizes a fitness that is the sum of CE and a load-imbalance term (L1 distance to uniform), with downstream generalization only implied. They later “scale up” to 2.7B parameters, but again emphasize CE/LBL trade-offs rather than end-task metrics; this makes it unclear whether the new regularizer robustly improves model quality beyond balancing tokens.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Poster)