cs.LGFeb 25, 2026

Code World Models for Parameter Control in Evolutionary Algorithms

Authors: Camilo Chacón Sartori, Guillem Rodríguez Corominas

Organizations: ICN2 – Catalan Institute of Nanoscience and Nanotechnology, Barcelona, Spain · Artificial Intelligence Research Institute (IIIA-CSIC), Barcelona, Spain · Universitat Politècnica de Catalunya (UPC), Barcelona, Spain

Abstract

Can an LLM learn how an optimizer behaves -- and use that knowledge to control it? We extend Code World Models (CWMs), LLM-synthesized Python programs that predict environment dynamics, from deterministic games to stochastic combinatorial optimization. Given suboptimal trajectories of (1+1)(1{+}1)-RLSk\text{RLS}_k, the LLM synthesizes a simulator of the optimizer's dynamics; greedy planning over this simulator then selects the mutation strength kk at each step. On \lo{} and \onemax{}, CWM-greedy performs within 6% of the theoretically optimal policy -- without ever seeing optimal-policy trajectories. On \jump{k_k}, where a deceptive valley causes all adaptive baselines to fail (0% success rate), CWM-greedy achieves 100% success rate -- without any collection policy using oracle knowledge of the gap parameter. On the NK-Landscape, where no closed-form model exists, CWM-greedy outperforms all baselines across fifteen independently generated instances (36.9436.94 vs.\ 36.3236.32; p<0.001p<0.001) when the prompt includes empirical transition statistics. The CWM also outperforms DQN in sample efficiency (200 offline trajectories vs.\ 500 online episodes), success rate (100% vs.\ 58%), and generalization (k=3k{=}3: 78% vs.\ 0%). Robustness experiments confirm stable synthesis across 5 independent runs.

Figures & tables

Explore similar work

CardsList
  1. SeaEvo: Advancing Algorithm Discovery with Strategy Space Evolution

    Apr 27, 2026Sichun Luo, Yi Huang, Haochen Luo +7Automated Algorithm DiscoveryEvolutionary Optimization

  2. Relay, Don't Route: Adaptive Population Handoff for Cost-Efficient LLM-Driven Evolution

    Aug 6, 2026Sichun Luo, Yi Huang, Guanzhi Deng +6Multi-Fidelity OptimizationEvolutionary Optimization